aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBastien Guerry2013-02-20 14:05:24 +0100
committerBastien Guerry2013-02-20 14:05:24 +0100
commitd8d2d18a7d85663f42d9d6f9859079e629428913 (patch)
treec993b6a2a03582bd7f6701b3835f9746ef7a5a8c
parent1e56f8ef3495d015ee992930da1d6cc76532de68 (diff)
downloademacs-d8d2d18a7d85663f42d9d6f9859079e629428913.tar.gz
emacs-d8d2d18a7d85663f42d9d6f9859079e629428913.zip
* outline.el (outline-regexp, outline-heading-end-regexp): Use
variables, not options (bug#13731). Setting this as a global option is likely to be useless, because it is unlikely that all outline file will use the modified regexp. Additionnally, if one of these variables if set through customize and the outline keybindings don't work in a standard outline file, it is hard to know why. Thanks to T. V. Raman for reporting this.
-rw-r--r--lisp/ChangeLog5
-rw-r--r--lisp/outline.el12
2 files changed, 9 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8b8f724da55..c9568981b6a 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,8 @@
12013-02-20 Bastien Guerry <bzg@gnu.org>
2
3 * outline.el (outline-regexp, outline-heading-end-regexp): Make
4 variables, not options (bug#13731).
5
12013-02-20 Glenn Morris <rgm@gnu.org> 62013-02-20 Glenn Morris <rgm@gnu.org>
2 7
3 * image.el (image-current-frame): Change from variable to function. 8 * image.el (image-current-frame): Change from variable to function.
diff --git a/lisp/outline.el b/lisp/outline.el
index 24f25fd2fb7..0ec5227a286 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -43,25 +43,21 @@
43 :prefix "outline-" 43 :prefix "outline-"
44 :group 'wp) 44 :group 'wp)
45 45
46(defcustom outline-regexp "[*\^L]+" 46(defvar outline-regexp "[*\^L]+"
47 "Regular expression to match the beginning of a heading. 47 "Regular expression to match the beginning of a heading.
48Any line whose beginning matches this regexp is considered to start a heading. 48Any line whose beginning matches this regexp is considered to start a heading.
49Note that Outline mode only checks this regexp at the start of a line, 49Note that Outline mode only checks this regexp at the start of a line,
50so the regexp need not (and usually does not) start with `^'. 50so the regexp need not (and usually does not) start with `^'.
51The recommended way to set this is with a Local Variables: list 51The recommended way to set this is with a Local Variables: list
52in the file it applies to. See also `outline-heading-end-regexp'." 52in the file it applies to. See also `outline-heading-end-regexp'.")
53 :type 'regexp
54 :group 'outlines)
55;;;###autoload(put 'outline-regexp 'safe-local-variable 'stringp) 53;;;###autoload(put 'outline-regexp 'safe-local-variable 'stringp)
56 54
57(defcustom outline-heading-end-regexp "\n" 55(defvar outline-heading-end-regexp "\n"
58 "Regular expression to match the end of a heading line. 56 "Regular expression to match the end of a heading line.
59You can assume that point is at the beginning of a heading when this 57You can assume that point is at the beginning of a heading when this
60regexp is searched for. The heading ends at the end of the match. 58regexp is searched for. The heading ends at the end of the match.
61The recommended way to set this is with a `Local Variables:' list 59The recommended way to set this is with a `Local Variables:' list
62in the file it applies to." 60in the file it applies to.")
63 :type 'regexp
64 :group 'outlines)
65;;;###autoload(put 'outline-heading-end-regexp 'safe-local-variable 'stringp) 61;;;###autoload(put 'outline-heading-end-regexp 'safe-local-variable 'stringp)
66 62
67(defvar outline-mode-prefix-map 63(defvar outline-mode-prefix-map