Mercurial > emacs
comparison lisp/newcomment.el @ 39486:54fe59ee8057
(comment-normalize-vars): Use " \t" rather than
"\\s-" when defining comment-end-skip.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Thu, 27 Sep 2001 21:13:44 +0000 |
parents | fc69197cb76d |
children | 1cf8ddfb831f |
comparison
equal
deleted
inserted
replaced
39485:5e20b8bbcc45 | 39486:54fe59ee8057 |
---|---|
3 ;; Copyright (C) 1999, 2000 Free Software Foundation Inc. | 3 ;; Copyright (C) 1999, 2000 Free Software Foundation Inc. |
4 | 4 |
5 ;; Author: code extracted from Emacs-20's simple.el | 5 ;; Author: code extracted from Emacs-20's simple.el |
6 ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> | 6 ;; Maintainer: Stefan Monnier <monnier@cs.yale.edu> |
7 ;; Keywords: comment uncomment | 7 ;; Keywords: comment uncomment |
8 ;; Revision: $Id: newcomment.el,v 1.33 2001/09/01 21:19:45 monnier Exp $ | 8 ;; Revision: $Id: newcomment.el,v 1.34 2001/09/01 21:23:17 monnier Exp $ |
9 | 9 |
10 ;; This file is part of GNU Emacs. | 10 ;; This file is part of GNU Emacs. |
11 | 11 |
12 ;; GNU Emacs is free software; you can redistribute it and/or modify | 12 ;; GNU Emacs is free software; you can redistribute it and/or modify |
13 ;; it under the terms of the GNU General Public License as published by | 13 ;; it under the terms of the GNU General Public License as published by |
239 "+\\)[ \t]*"))) | 239 "+\\)[ \t]*"))) |
240 (unless comment-end-skip | 240 (unless comment-end-skip |
241 (let ((ce (if (string= "" comment-end) "\n" | 241 (let ((ce (if (string= "" comment-end) "\n" |
242 (comment-string-strip comment-end t t)))) | 242 (comment-string-strip comment-end t t)))) |
243 (set (make-local-variable 'comment-end-skip) | 243 (set (make-local-variable 'comment-end-skip) |
244 (concat "\\s-*\\(\\s>" (if comment-quote-nested "" "+") | 244 ;; We use [ \t] rather than \s- because we don't want to |
245 ;; remove ^L in C mode when uncommenting. | |
246 (concat "[ \t]*\\(\\s>" (if comment-quote-nested "" "+") | |
245 "\\|" (regexp-quote (substring ce 0 1)) | 247 "\\|" (regexp-quote (substring ce 0 1)) |
246 (if (and comment-quote-nested (<= (length ce) 1)) "" "+") | 248 (if (and comment-quote-nested (<= (length ce) 1)) "" "+") |
247 (regexp-quote (substring ce 1)) | 249 (regexp-quote (substring ce 1)) |
248 "\\)")))))) | 250 "\\)")))))) |
249 | 251 |