]> code.delx.au - gnu-emacs/commitdiff
outline.el fix for bug#7619.
authorGlenn Morris <rgm@gnu.org>
Fri, 4 Mar 2011 08:40:00 +0000 (00:40 -0800)
committerGlenn Morris <rgm@gnu.org>
Fri, 4 Mar 2011 08:40:00 +0000 (00:40 -0800)
It turns out the use of nil in the :type of outline regexp was for
very hysterical raisons.  Prior to 2001-09-12T20:42:08Z!rms@gnu.org, the
default value was nil, then it was initialized afterwards.
Everywhere in the code assumes it cannot be nil, so no need to allow
that any more.

* lisp/outline.el (outline-regexp): No longer allow nil.
(outline-heading-end-regexp): Add safety predicate.

lisp/ChangeLog
lisp/outline.el

index c550cd4e85231121ec04d32144cdb18008c5e4e2..094143343fb5db338b44ff9cc2aa1b95f190d7ad 100644 (file)
@@ -1,5 +1,8 @@
 2011-03-04  Glenn Morris  <rgm@gnu.org>
 
+       * outline.el (outline-regexp): No longer allow nil.
+       (outline-heading-end-regexp): Add safety predicate.  (Bug#7619)
+
        * net/browse-url.el (browse-url):
        Handle deleted default-directory.  (Bug#6077)
 
index d43afd94a3c78bf889fd31eb8aa1c469d95c978d..cedc55b33368d570fc3b3229240ec262d8c92cea 100644 (file)
@@ -50,9 +50,9 @@ Note that Outline mode only checks this regexp at the start of a line,
 so the regexp need not (and usually does not) start with `^'.
 The recommended way to set this is with a Local Variables: list
 in the file it applies to.  See also `outline-heading-end-regexp'."
-  :type '(choice regexp (const nil))
+  :type 'regexp
   :group 'outlines)
-;;;###autoload(put 'outline-regexp 'safe-local-variable 'string-or-null-p)
+;;;###autoload(put 'outline-regexp 'safe-local-variable 'stringp)
 
 (defcustom outline-heading-end-regexp "\n"
   "Regular expression to match the end of a heading line.
@@ -62,6 +62,7 @@ The recommended way to set this is with a `Local Variables:' list
 in the file it applies to."
   :type 'regexp
   :group 'outlines)
+;;;###autoload(put 'outline-heading-end-regexp 'safe-local-variable 'stringp)
 
 (defvar outline-mode-prefix-map
   (let ((map (make-sparse-keymap)))