emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/newcomment.el


From: Stefan Monnier
Subject: [Emacs-diffs] Changes to emacs/lisp/newcomment.el
Date: Fri, 30 May 2003 16:06:40 -0400

Index: emacs/lisp/newcomment.el
diff -c emacs/lisp/newcomment.el:1.65 emacs/lisp/newcomment.el:1.66
*** emacs/lisp/newcomment.el:1.65       Sat May 10 18:54:35 2003
--- emacs/lisp/newcomment.el    Fri May 30 16:06:40 2003
***************
*** 194,199 ****
--- 194,208 ----
  This is obsolete because you might as well use \\[newline-and-indent]."
    :type 'boolean)
  
+ (defcustom comment-empty-lines nil
+   "If nil, `comment-region' does not comment out empty lines.
+ If t, it always comments out empty lines.
+ if `eol' it only comments out empty lines if comments are
+ terminated by the end of line (i.e. `comment-end' is empty)."
+   :type '(choice (const :tag "Never" nil)
+         (const :tag "Always" t)
+         (const :tag "EOl-terminated" 'eol)))
+ 
  ;;;;
  ;;;; Helpers
  ;;;;
***************
*** 821,827 ****
  INDENT indicates to put CS and CCS at the current indentation of the region
  rather than at left margin."
    ;;(assert (< beg end))
!   (let ((no-empty t))
      ;; Sanitize CE and CCE.
      (if (and (stringp ce) (string= "" ce)) (setq ce nil))
      (if (and (stringp cce) (string= "" cce)) (setq cce nil))
--- 830,837 ----
  INDENT indicates to put CS and CCS at the current indentation of the region
  rather than at left margin."
    ;;(assert (< beg end))
!   (let ((no-empty (not (or (eq comment-empty-lines t)
!                          (and comment-empty-lines (zerop (length ce)))))))
      ;; Sanitize CE and CCE.
      (if (and (stringp ce) (string= "" ce)) (setq ce nil))
      (if (and (stringp cce) (string= "" cce)) (setq cce nil))




reply via email to

[Prev in Thread] Current Thread [Next in Thread]