diff options
| author | Reiner Steib | 2006-04-06 19:20:38 +0000 |
|---|---|---|
| committer | Reiner Steib | 2006-04-06 19:20:38 +0000 |
| commit | 3e45722587c5b1e9ccd306d073a1141e44a98263 (patch) | |
| tree | 0735f29ab4af6d32b8004cac6a365645495701c4 /lisp | |
| parent | 077b72a485911714fc9b30fd7f76e8ffc6b3842e (diff) | |
| download | emacs-3e45722587c5b1e9ccd306d073a1141e44a98263.tar.gz emacs-3e45722587c5b1e9ccd306d073a1141e44a98263.zip | |
* subr.el (string-or-null-p): New function.
* textmodes/paragraphs.el (sentence-end): Use string-or-null-p.
* textmodes/ispell.el (ispell-local-dictionary): Use
string-or-null-p.
* files.el: Update comment about safe-local-variable declarations.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 11 | ||||
| -rw-r--r-- | lisp/files.el | 27 | ||||
| -rw-r--r-- | lisp/subr.el | 6 | ||||
| -rw-r--r-- | lisp/textmodes/ispell.el | 2 | ||||
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 2 |
5 files changed, 37 insertions, 11 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index a0d8e64a1fc..f914e5dbc48 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,14 @@ | |||
| 1 | 2006-04-06 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 2 | |||
| 3 | * subr.el (string-or-null-p): New function. | ||
| 4 | |||
| 5 | * textmodes/paragraphs.el (sentence-end): Use string-or-null-p. | ||
| 6 | |||
| 7 | * textmodes/ispell.el (ispell-local-dictionary): Use | ||
| 8 | string-or-null-p. | ||
| 9 | |||
| 10 | * files.el: Update comment about safe-local-variable declarations. | ||
| 11 | |||
| 1 | 2006-04-06 J.D. Smith <jdsmith@as.arizona.edu> | 12 | 2006-04-06 J.D. Smith <jdsmith@as.arizona.edu> |
| 2 | 13 | ||
| 3 | * progmodes/idlwave.el: Updated to IDLWAVE version 6.0. See | 14 | * progmodes/idlwave.el: Updated to IDLWAVE version 6.0. See |
diff --git a/lisp/files.el b/lisp/files.el index 7ab7d593e4c..2ca497e09b1 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2322,13 +2322,22 @@ asking you for confirmation." | |||
| 2322 | 2322 | ||
| 2323 | ;; Safe local variables: | 2323 | ;; Safe local variables: |
| 2324 | ;; | 2324 | ;; |
| 2325 | ;; For variables defined by minor modes, put the safety declarations | 2325 | ;; For variables defined by major modes, the safety declarations can go into |
| 2326 | ;; here, not in the file defining the minor mode (when Emacs visits a | 2326 | ;; the major mode's file, since that will be loaded before file variables are |
| 2327 | ;; file specifying that local variable, the minor mode file may not be | 2327 | ;; processed. |
| 2328 | ;; loaded yet). For variables defined by major modes, the safety | 2328 | ;; |
| 2329 | ;; declarations can go into the major mode's file, since that will be | 2329 | ;; For variables defined by minor modes, put the safety declarations in the |
| 2330 | ;; loaded before file variables are processed. | 2330 | ;; file defining the minor mode after the defcustom/defvar using an autoload |
| 2331 | ;; cookie, e.g.: | ||
| 2332 | ;; | ||
| 2333 | ;; ;;;###autoload(put 'variable 'safe-local-variable 'stringp) | ||
| 2334 | ;; | ||
| 2335 | ;; Otherwise, when Emacs visits a file specifying that local variable, the | ||
| 2336 | ;; minor mode file may not be loaded yet. | ||
| 2337 | ;; | ||
| 2338 | ;; For variables defined in the C source code the declaration should go here: | ||
| 2331 | 2339 | ||
| 2340 | ;; FIXME: Some variables should be moved according to the rules above. | ||
| 2332 | (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) | 2341 | (let ((string-or-null (lambda (a) (or (stringp a) (null a))))) |
| 2333 | (eval | 2342 | (eval |
| 2334 | `(mapc (lambda (pair) | 2343 | `(mapc (lambda (pair) |
| @@ -2340,15 +2349,15 @@ asking you for confirmation." | |||
| 2340 | (c-file-style . stringp) | 2349 | (c-file-style . stringp) |
| 2341 | (c-indent-level . integerp) | 2350 | (c-indent-level . integerp) |
| 2342 | (comment-column . integerp) | 2351 | (comment-column . integerp) |
| 2343 | (compile-command . ,string-or-null) | 2352 | (compile-command . string-or-null-p) |
| 2344 | (fill-column . integerp) | 2353 | (fill-column . integerp) |
| 2345 | (fill-prefix . ,string-or-null) | 2354 | (fill-prefix . string-or-null-p) |
| 2346 | (indent-tabs-mode . t) | 2355 | (indent-tabs-mode . t) |
| 2347 | (kept-new-versions . integerp) | 2356 | (kept-new-versions . integerp) |
| 2348 | (left-margin . t) | 2357 | (left-margin . t) |
| 2349 | (no-byte-compile . t) | 2358 | (no-byte-compile . t) |
| 2350 | (no-update-autoloads . t) | 2359 | (no-update-autoloads . t) |
| 2351 | (outline-regexp . ,string-or-null) | 2360 | (outline-regexp . string-or-null-p) |
| 2352 | (tab-width . integerp) ;; C source code | 2361 | (tab-width . integerp) ;; C source code |
| 2353 | (truncate-lines . t) ;; C source code | 2362 | (truncate-lines . t) ;; C source code |
| 2354 | (version-control . t))))) | 2363 | (version-control . t))))) |
diff --git a/lisp/subr.el b/lisp/subr.el index f515b6b3753..9aba6195816 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1916,6 +1916,12 @@ a system-dependent default device name is used." | |||
| 1916 | "\\" (substring argument end (1+ end))) | 1916 | "\\" (substring argument end (1+ end))) |
| 1917 | start (1+ end))) | 1917 | start (1+ end))) |
| 1918 | (concat result (substring argument start))))))) | 1918 | (concat result (substring argument start))))))) |
| 1919 | |||
| 1920 | (defun string-or-null-p (object) | ||
| 1921 | "Return t if OBJECT is a string or nil. | ||
| 1922 | Otherwise, return nil." | ||
| 1923 | (or (stringp object) (null object))) | ||
| 1924 | |||
| 1919 | 1925 | ||
| 1920 | ;;;; Support for yanking and text properties. | 1926 | ;;;; Support for yanking and text properties. |
| 1921 | 1927 | ||
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index 8a08f9dd078..da77508dce3 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -462,7 +462,7 @@ is automatically set when defined in the file with either | |||
| 462 | :type '(choice string | 462 | :type '(choice string |
| 463 | (const :tag "default" nil)) | 463 | (const :tag "default" nil)) |
| 464 | :group 'ispell) | 464 | :group 'ispell) |
| 465 | ;;;###autoload(put 'ispell-local-dictionary 'safe-local-variable (lambda (a) (or (stringp a) (null a)))) | 465 | ;;;###autoload(put 'ispell-local-dictionary 'safe-local-variable 'string-or-null-p) |
| 466 | 466 | ||
| 467 | (make-variable-buffer-local 'ispell-local-dictionary) | 467 | (make-variable-buffer-local 'ispell-local-dictionary) |
| 468 | 468 | ||
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index c62f337e456..6693be4e0c9 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -163,7 +163,7 @@ function `sentence-end'. You should always use this function | |||
| 163 | to obtain the value of this variable." | 163 | to obtain the value of this variable." |
| 164 | :group 'paragraphs | 164 | :group 'paragraphs |
| 165 | :type '(choice regexp (const :tag "Use default value" nil))) | 165 | :type '(choice regexp (const :tag "Use default value" nil))) |
| 166 | ;;;###autoload(put 'sentence-end 'safe-local-variable (lambda (a) (or (stringp a) (null a)))) | 166 | ;;;###autoload(put 'sentence-end 'safe-local-variable 'string-or-null-p) |
| 167 | 167 | ||
| 168 | (defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*" | 168 | (defcustom sentence-end-base "[.?!][]\"'$B!I$,1r}(B)}]*" |
| 169 | "*Regexp matching the basic end of a sentence, not including following space." | 169 | "*Regexp matching the basic end of a sentence, not including following space." |