diff options
author | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-11-14 10:04:20 +0000 |
---|---|---|
committer | Stefan Monnier <monnier@iro.umontreal.ca> | 2000-11-14 10:04:20 +0000 |
commit | d3fcda2278c4546002d00524d02570e7c2b27128 (patch) | |
tree | da5b86b61b90b73dfe61938d7d85d0b7289a3a2d | |
parent | 1594a23a930fda645452eb02d480bb61091cdf65 (diff) | |
download | emacs-d3fcda2278c4546002d00524d02570e7c2b27128.tar.gz |
(comment-indent-default): Stick \s<\s< to the left
when it follows non-comment text on the line.
-rw-r--r-- | lisp/ChangeLog | 11 | ||||
-rw-r--r-- | lisp/newcomment.el | 6 |
2 files changed, 15 insertions, 2 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 04ff21d2e7d..296133f9afb 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -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. diff --git a/lisp/newcomment.el b/lisp/newcomment.el index b4bdc16ba2c..4675370fdf7 100644 --- a/lisp/newcomment.el +++ b/lisp/newcomment.el @@ -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))) |