* lisp/newcomment.el (comment-dwim): Use `use-region-p'
When the region is active, but is empty (length 0), act as though the region was not active; that is, put a comment at the end of the line. (Bug#21119)
This commit is contained in:
parent
9004011ec0
commit
4a703c7330
1 changed files with 1 additions and 1 deletions
|
|
@ -1266,7 +1266,7 @@ Else, call `comment-indent'.
|
|||
You can configure `comment-style' to change the way regions are commented."
|
||||
(interactive "*P")
|
||||
(comment-normalize-vars)
|
||||
(if (and mark-active transient-mark-mode)
|
||||
(if (use-region-p)
|
||||
(comment-or-uncomment-region (region-beginning) (region-end) arg)
|
||||
(if (save-excursion (beginning-of-line) (not (looking-at "\\s-*$")))
|
||||
;; FIXME: If there's no comment to kill on this line and ARG is
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue