]> git.eshelyaron.com Git - emacs.git/commitdiff
(comment-indent-default): Stick \s<\s< to the left
authorStefan Monnier <monnier@iro.umontreal.ca>
Tue, 14 Nov 2000 10:04:20 +0000 (10:04 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Tue, 14 Nov 2000 10:04:20 +0000 (10:04 +0000)
when it follows non-comment text on the line.

lisp/ChangeLog
lisp/newcomment.el

index 04ff21d2e7dfe55a8991e6f41bf30f05be78c1fc..296133f9afb6fd569796d47a12490100d111e1b6 100644 (file)
@@ -1,3 +1,14 @@
+2000-11-14  Stefan Monnier  <monnier@cs.yale.edu>
+
+       * newcomment.el (comment-indent-default): Stick \s<\s< to the left
+       when it follows non-comment text on the line.
+
+       * emacs-lisp/lisp-mode.el (lisp-mode-variables):
+       Set font-lock-defaults.
+       (lisp-mode-shared-map): Init inside the defvar.
+       (emacs-lisp-mode, lisp-mode, lisp-interaction-mode):
+       Use define-derived-mode.
+
 2000-11-14  Miles Bader  <miles@lsi.nec.co.jp>
 
        * faces.el (header-line): Use `:box nil' for color/gs displays too.
index b4bdc16ba2c62bc0a3f823ad68e519b0d3b5720e..4675370fdf73a658d4803e8236248dc94cda2a0a 100644 (file)
@@ -6,7 +6,7 @@
 ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu>
 ;; Keywords: comment uncomment
 ;; Version: $Name:  $
-;; Revision: $Id: newcomment.el,v 1.21 2000/10/05 22:43:22 monnier Exp $
+;; Revision: $Id: newcomment.el,v 1.22 2000/10/08 19:07:41 monnier Exp $
 
 ;; This file is part of GNU Emacs.
 
@@ -399,7 +399,9 @@ Point is assumed to be just at the end of a comment."
 ;;;###autoload
 (defun comment-indent-default ()
   "Default for `comment-indent-function'."
-  (if (looking-at "\\s<\\s<\\s<") 0
+  (if (and (looking-at "\\s<\\s<\\(\\s<\\)?")
+          (or (match-end 1) (/= (current-column) (current-indentation))))
+      0
     (when (or (/= (current-column) (current-indentation))
              (and (> comment-add 0) (looking-at "\\s<\\S<")))
       comment-column)))