diff options
| author | Richard M. Stallman | 1995-06-16 04:39:46 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 1995-06-16 04:39:46 +0000 |
| commit | 7dd1926ebeedeb4e1331ea7e6e982ab061a7de60 (patch) | |
| tree | 91c886870203405bd37a855879151af86e14bd1e | |
| parent | 91a6bc102efbb97df539f48895a97ee75ecb357d (diff) | |
| download | emacs-7dd1926ebeedeb4e1331ea7e6e982ab061a7de60.tar.gz emacs-7dd1926ebeedeb4e1331ea7e6e982ab061a7de60.zip | |
(make-local-hook): Doc fix.
(shell-quote-argument) [WINDOWSNT]: Wrap in quotes only.
| -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 | |||
| 570 | functions listed in *either* the local value *or* the global value | 570 | functions listed in *either* the local value *or* the global value |
| 571 | of the hook variable. | 571 | of the hook variable. |
| 572 | 572 | ||
| 573 | This function does nothing if HOOK is already local in the current buffer. | 573 | This function works by making `t' a member of the buffer-local value, |
| 574 | which acts as a flag to run the hook functions in the default value as | ||
| 575 | well. This works for all normal hooks, but does not work for most | ||
| 576 | non-normal hooks yet. We will be changing the callers of non-normal | ||
| 577 | hooks so that they can handle localness; this has to be done one by | ||
| 578 | one. | ||
| 579 | |||
| 580 | This function does nothing if HOOK is already local in the current | ||
| 581 | buffer. | ||
| 574 | 582 | ||
| 575 | Do not use `make-local-variable' to make a hook variable buffer-local." | 583 | Do not use `make-local-variable' to make a hook variable buffer-local." |
| 576 | (if (local-variable-p hook) | 584 | (if (local-variable-p hook) |
| @@ -856,13 +864,15 @@ STRING should be given if the last search was by `string-match' on STRING." | |||
| 856 | "Quote an argument for passing as argument to an inferior shell." | 864 | "Quote an argument for passing as argument to an inferior shell." |
| 857 | ;; Quote everything except POSIX filename characters. | 865 | ;; Quote everything except POSIX filename characters. |
| 858 | ;; This should be safe enough even for really weird shells. | 866 | ;; This should be safe enough even for really weird shells. |
| 859 | (let ((result "") (start 0) end) | 867 | (if (eq system-type 'windows-nt) |
| 860 | (while (string-match "[^-0-9a-zA-Z_./]" argument start) | 868 | (concat "\"" argument "\"") |
| 861 | (setq end (match-beginning 0) | 869 | (let ((result "") (start 0) end) |
| 862 | result (concat result (substring argument start end) | 870 | (while (string-match "[^-0-9a-zA-Z_./]" argument start) |
| 863 | "\\" (substring argument end (1+ end))) | 871 | (setq end (match-beginning 0) |
| 864 | start (1+ end))) | 872 | result (concat result (substring argument start end) |
| 865 | (concat result (substring argument start)))) | 873 | "\\" (substring argument end (1+ end))) |
| 874 | start (1+ end))) | ||
| 875 | (concat result (substring argument start))))) | ||
| 866 | 876 | ||
| 867 | (defun make-syntax-table (&optional oldtable) | 877 | (defun make-syntax-table (&optional oldtable) |
| 868 | "Return a new syntax table. | 878 | "Return a new syntax table. |