diff options
author | Richard M. Stallman <rms@gnu.org> | 1995-06-16 04:39:46 +0000 |
---|---|---|
committer | Richard M. Stallman <rms@gnu.org> | 1995-06-16 04:39:46 +0000 |
commit | 72bffbf2c40fa6e22872ab4b224d2b314d16cb30 (patch) | |
tree | f97cca2afb2073d3479650cf4d9bfe70159bc5b2 /lisp | |
parent | 345d614fa1501c992e890c3852d394bdc835d9bd (diff) | |
download | emacs-72bffbf2c40fa6e22872ab4b224d2b314d16cb30.tar.gz |
(make-local-hook): Doc fix.
(shell-quote-argument) [WINDOWSNT]: Wrap in quotes only.
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/subr.el | 26 |
1 files changed, 18 insertions, 8 deletions
diff --git a/lisp/subr.el b/lisp/subr.el index 36c61513864..b84e8ffc89b 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -570,7 +570,15 @@ work in concert: running the hook actually runs all the hook functions listed in *either* the local value *or* the global value of the hook variable. -This function does nothing if HOOK is already local in the current buffer. +This function works by making `t' a member of the buffer-local value, +which acts as a flag to run the hook functions in the default value as +well. This works for all normal hooks, but does not work for most +non-normal hooks yet. We will be changing the callers of non-normal +hooks so that they can handle localness; this has to be done one by +one. + +This function does nothing if HOOK is already local in the current +buffer. Do not use `make-local-variable' to make a hook variable buffer-local." (if (local-variable-p hook) @@ -856,13 +864,15 @@ STRING should be given if the last search was by `string-match' on STRING." "Quote an argument for passing as argument to an inferior shell." ;; Quote everything except POSIX filename characters. ;; This should be safe enough even for really weird shells. - (let ((result "") (start 0) end) - (while (string-match "[^-0-9a-zA-Z_./]" argument start) - (setq end (match-beginning 0) - result (concat result (substring argument start end) - "\\" (substring argument end (1+ end))) - start (1+ end))) - (concat result (substring argument start)))) + (if (eq system-type 'windows-nt) + (concat "\"" argument "\"") + (let ((result "") (start 0) end) + (while (string-match "[^-0-9a-zA-Z_./]" argument start) + (setq end (match-beginning 0) + result (concat result (substring argument start end) + "\\" (substring argument end (1+ end))) + start (1+ end))) + (concat result (substring argument start))))) (defun make-syntax-table (&optional oldtable) "Return a new syntax table. |