5 |
;; Author: code extracted from Emacs-20's simple.el |
;; Author: code extracted from Emacs-20's simple.el |
6 |
;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> |
;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> |
7 |
;; Keywords: comment uncomment |
;; Keywords: comment uncomment |
|
;; Revision: $Id$ |
|
8 |
|
|
9 |
;; This file is part of GNU Emacs. |
;; This file is part of GNU Emacs. |
10 |
|
|
239 |
;; (kill-local-variable 'comment-continue)) |
;; (kill-local-variable 'comment-continue)) |
240 |
) |
) |
241 |
;; comment-skip regexps |
;; comment-skip regexps |
242 |
(unless comment-start-skip |
(unless (and comment-start-skip |
243 |
|
;; In case comment-start has changed since last time. |
244 |
|
(string-match comment-start-skip comment-start)) |
245 |
(set (make-local-variable 'comment-start-skip) |
(set (make-local-variable 'comment-start-skip) |
246 |
(concat "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(\\s<+\\|" |
(concat "\\(\\(^\\|[^\\\\\n]\\)\\(\\\\\\\\\\)*\\)\\(\\s<+\\|" |
247 |
(regexp-quote (comment-string-strip comment-start t t)) |
(regexp-quote (comment-string-strip comment-start t t)) |
248 |
;; Let's not allow any \s- but only [ \t] since \n |
;; Let's not allow any \s- but only [ \t] since \n |
249 |
;; might be both a comment-end marker and \s-. |
;; might be both a comment-end marker and \s-. |
250 |
"+\\)[ \t]*"))) |
"+\\)[ \t]*"))) |
251 |
(unless comment-end-skip |
(unless (and comment-end-skip |
252 |
|
;; In case comment-end has changed since last time. |
253 |
|
(string-match comment-end-skip comment-end)) |
254 |
(let ((ce (if (string= "" comment-end) "\n" |
(let ((ce (if (string= "" comment-end) "\n" |
255 |
(comment-string-strip comment-end t t)))) |
(comment-string-strip comment-end t t)))) |
256 |
(set (make-local-variable 'comment-end-skip) |
(set (make-local-variable 'comment-end-skip) |