commit 492ab1136860ef41c33a5e35a85fb721693f892b (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Sun Dec 23 09:51:22 2018 +0100 ; Add +++ to recent entry in etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index c546f22844..a018bc3956 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1428,6 +1428,7 @@ un-obsoleting it. +++ ** New function 'group-name' returns a group name corresponding to GID. ++++ ** 'make-process' now takes a keyword argument ':file-handler'; if that is non-nil, it will look for a file name handler for the current buffer's 'default-directory' and invoke that file name handler to make commit 04c768b95b846b5f356ae4cdd7c2597ad1f90475 Author: Michael Albinus Date: Sun Dec 23 09:50:27 2018 +0100 ; Fix wording in etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 253edd593e..c546f22844 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1430,8 +1430,8 @@ un-obsoleting it. ** 'make-process' now takes a keyword argument ':file-handler'; if that is non-nil, it will look for a file name handler for the current -buffer's 'default-directory' and invoke that file handler to make the -process. That way 'make-process' can start remote processes. +buffer's 'default-directory' and invoke that file name handler to make +the process. That way 'make-process' can start remote processes. * Changes in Emacs 27.1 on Non-Free Operating Systems commit 3ea89acac24149a06746740785906f56c89eaf1f Author: Michael Albinus Date: Sun Dec 23 09:48:05 2018 +0100 Handle `make-process' in Tramp and ange-ftp * doc/lispref/processes.texi (Asynchronous Processes): Explain, that not all file name handlers support `make-process'. * lisp/net/ange-ftp.el: * lisp/net/tramp-adb.el (tramp-adb-file-name-handler-alist): * lisp/net/tramp-archive.el (tramp-archive-file-name-handler-alist): * lisp/net/tramp-gvfs.el (tramp-gvfs-file-name-handler-alist): * lisp/net/tramp-rclone.el (tramp-rclone-file-name-handler-alist): * lisp/net/tramp-sh.el (tramp-sh-file-name-handler-alist): * lisp/net/tramp-smb.el (tramp-smb-file-name-handler-alist): * lisp/net/tramp-sudoedit.el (tramp-sudoedit-file-name-handler-alist): * lisp/net/tramp.el (tramp-file-name-for-operation): Add `make-process'. * lisp/vc/ediff-util.el: * src/process.c: * test/src/process-tests.el: Use "file name handler" consequently. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index d72f5b880a..c6ffb2815e 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -700,8 +700,8 @@ output, and both are sent to @var{buffer} or @var{filter}. @item :file-handler @var{file-handler} If @var{file-handler} is non-@code{nil}, then look for a file name handler for the current buffer's @code{default-directory}, and invoke -that file handler to make the process. If there is no such handler, -proceed as if @var{file-handler} were @code{nil}. +that file name handler to make the process. If there is no such +handler, proceed as if @var{file-handler} were @code{nil}. @end table The original argument list, modified with the actual connection @@ -709,9 +709,18 @@ information, is available via the @code{process-contact} function. The current working directory of the subprocess is set to the current buffer's value of @code{default-directory} if that is local (as -determined by `unhandled-file-name-directory'), or "~" otherwise. If -you want to run a process in a remote directory, pass -@code{:file-handler t} to @code{make-process}. +determined by @code{unhandled-file-name-directory}), or @file{~} +otherwise. If you want to run a process in a remote directory, pass +@code{:file-handler t} to @code{make-process}. In that case, the +current working directory is the local name component of +@code{default-directory} (as determined by @code{file-local-name}). + +Depending on the implementation of the file name handler, it might not +be possible to apply @var{filter} or @var{sentinel} to the resulting +process object. @xref{Filter Functions}, and @ref{Sentinels}. + +Some file name handlers may not support @code{make-process}. In such +cases, this function does nothing and returns @code{nil}. @end defun @defun make-pipe-process &rest args diff --git a/lisp/net/ange-ftp.el b/lisp/net/ange-ftp.el index 37df793046..8828010ab4 100644 --- a/lisp/net/ange-ftp.el +++ b/lisp/net/ange-ftp.el @@ -4441,10 +4441,11 @@ NEWNAME should be the name to give the new compressed or uncompressed file.") ;; We can handle process-file in a restricted way (just for chown). ;; Nothing possible for `start-file-process'. +(put 'exec-path 'ange-ftp 'ignore) +(put 'make-process 'ange-ftp 'ignore) (put 'process-file 'ange-ftp 'ange-ftp-process-file) (put 'start-file-process 'ange-ftp 'ignore) (put 'shell-command 'ange-ftp 'ange-ftp-shell-command) -(put 'exec-path 'ange-ftp 'ignore) ;;; Define ways of getting at unmodified Emacs primitives, ;;; turning off our handler. diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el index 4d92ae91fa..5f0b9dad31 100644 --- a/lisp/net/tramp-adb.el +++ b/lisp/net/tramp-adb.el @@ -144,6 +144,7 @@ It is used for TCP/IP devices." (make-directory . tramp-adb-handle-make-directory) (make-directory-internal . ignore) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-handle-make-symbolic-link) (process-file . tramp-adb-handle-process-file) (rename-file . tramp-adb-handle-rename-file) diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 02580359f7..03b1eed970 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -261,6 +261,7 @@ It must be supported by libarchive(3).") (make-directory . tramp-archive-handle-not-implemented) (make-directory-internal . tramp-archive-handle-not-implemented) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-archive-handle-not-implemented) (process-file . ignore) (rename-file . tramp-archive-handle-not-implemented) diff --git a/lisp/net/tramp-gvfs.el b/lisp/net/tramp-gvfs.el index 2321617b0a..718db34f26 100644 --- a/lisp/net/tramp-gvfs.el +++ b/lisp/net/tramp-gvfs.el @@ -578,6 +578,7 @@ It has been changed in GVFS 1.14.") (make-directory . tramp-gvfs-handle-make-directory) (make-directory-internal . ignore) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-handle-make-symbolic-link) (process-file . ignore) (rename-file . tramp-gvfs-handle-rename-file) diff --git a/lisp/net/tramp-rclone.el b/lisp/net/tramp-rclone.el index f1a2cd81c6..d5e268eb20 100644 --- a/lisp/net/tramp-rclone.el +++ b/lisp/net/tramp-rclone.el @@ -122,6 +122,7 @@ (make-directory . tramp-rclone-handle-make-directory) (make-directory-internal . ignore) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-handle-make-symbolic-link) (process-file . ignore) (rename-file . tramp-rclone-handle-rename-file) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index ba652bddd3..308f33896c 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -995,6 +995,7 @@ of command line.") (make-directory . tramp-sh-handle-make-directory) ;; `make-directory-internal' performed by default handler. (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-sh-handle-make-symbolic-link) (process-file . tramp-sh-handle-process-file) (rename-file . tramp-sh-handle-rename-file) diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index ee19f9859f..c9f23afecc 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el @@ -268,6 +268,7 @@ See `tramp-actions-before-shell' for more info.") (make-directory . tramp-smb-handle-make-directory) (make-directory-internal . tramp-smb-handle-make-directory-internal) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-smb-handle-make-symbolic-link) (process-file . tramp-smb-handle-process-file) (rename-file . tramp-smb-handle-rename-file) diff --git a/lisp/net/tramp-sudoedit.el b/lisp/net/tramp-sudoedit.el index 3d25e13073..f7a3b30ffc 100644 --- a/lisp/net/tramp-sudoedit.el +++ b/lisp/net/tramp-sudoedit.el @@ -119,6 +119,7 @@ See `tramp-actions-before-shell' for more info.") (make-directory . tramp-sudoedit-handle-make-directory) (make-directory-internal . ignore) (make-nearby-temp-file . tramp-handle-make-nearby-temp-file) + (make-process . ignore) (make-symbolic-link . tramp-sudoedit-handle-make-symbolic-link) (process-file . ignore) (rename-file . tramp-sudoedit-handle-rename-file) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index cf7c51fec1..757f90061c 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2278,7 +2278,7 @@ ARGS are the arguments OPERATION has been called with." ;; Emacs 26+ only. make-nearby-temp-file temporary-file-directory ;; Emacs 27+ only. - exec-path)) + exec-path make-process)) default-directory) ;; PROC. ((member operation diff --git a/lisp/vc/ediff-util.el b/lisp/vc/ediff-util.el index b1652e7efd..a70fd0a97a 100644 --- a/lisp/vc/ediff-util.el +++ b/lisp/vc/ediff-util.el @@ -3221,9 +3221,9 @@ Hit \\[ediff-recenter] to reset the windows afterward." short-f (concat ediff-temp-file-prefix short-p) f (cond (given-file) ((find-file-name-handler f 'insert-file-contents) - ;; to thwart file handlers in write-region, e.g., if file - ;; name ends with .Z or .gz - ;; This is needed so that patches produced by ediff will + ;; to thwart file name handlers in write-region, + ;; e.g., if file name ends with .Z or .gz + ;; This is needed so that patches produced by ediff will ;; have more meaningful names (ediff-make-empty-tmp-file short-f)) (prefix diff --git a/src/process.c b/src/process.c index 5895f77446..34045b4977 100644 --- a/src/process.c +++ b/src/process.c @@ -1663,7 +1663,7 @@ is mixed with standard output and sent to BUFFER or FILTER. :file-handler FILE-HANDLER -- If FILE-HANDLER is non-nil, then look for a file name handler for the current buffer's `default-directory' -and invoke that file handler to make the process. If there is no +and invoke that file name handler to make the process. If there is no such handler, proceed as if FILE-HANDLER were nil. usage: (make-process &rest ARGS) */) diff --git a/test/src/process-tests.el b/test/src/process-tests.el index af5bc73757..35890af482 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -217,7 +217,7 @@ (ert-deftest make-process/file-handler/found () "Check that the ‘:file-handler’ argument of ‘make-process’ -works as expected if a file handler is found." +works as expected if a file name handler is found." (let ((file-handler-calls 0)) (cl-flet ((file-handler (&rest args) @@ -238,7 +238,7 @@ works as expected if a file handler is found." (ert-deftest make-process/file-handler/not-found () "Check that the ‘:file-handler’ argument of ‘make-process’ -works as expected if no file handler is found." +works as expected if no file name handler is found." (let ((file-name-handler-alist ()) (default-directory invocation-directory) (program (expand-file-name invocation-name invocation-directory))) @@ -248,7 +248,7 @@ works as expected if no file handler is found." (ert-deftest make-process/file-handler/disable () "Check ‘make-process’ works as expected if it shouldn’t use the -file handler." +file name handler." (let ((file-name-handler-alist (list (cons (rx bos "test-handler:") #'process-tests--file-handler))) (default-directory "test-handler:/dir/") @@ -259,7 +259,7 @@ file handler." (defun process-tests--file-handler (operation &rest _args) (cl-ecase operation (unhandled-file-name-directory "/") - (make-process (ert-fail "file handler called unexpectedly")))) + (make-process (ert-fail "file name handler called unexpectedly")))) (put #'process-tests--file-handler 'operations '(unhandled-file-name-directory make-process)) commit 072b4c679dfd5528e74849cad18246730a991933 Author: Juri Linkov Date: Sun Dec 23 01:52:25 2018 +0200 * lisp/simple.el (next-error-no-select): Use save-selected-window. Let-bind display alist of display-buffer-overriding-action to `(inhibit-same-window . t)'. (Bug#32607) diff --git a/lisp/simple.el b/lisp/simple.el index 905477a142..ab4960dc96 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -383,13 +383,11 @@ backwards, if negative). Finds and highlights the source line like \\[next-error], but does not select the source buffer." (interactive "p") - (let ((next-error-highlight next-error-highlight-no-select)) - (next-error n)) - (let ((display-buffer-overriding-action '(display-buffer-reuse-window))) - ;; Override user customization such as display-buffer-same-window - ;; and use display-buffer-reuse-window to ensure next-error-last-buffer - ;; is displayed somewhere, not necessarily in the same window (bug#32607). - (pop-to-buffer next-error-last-buffer))) + (save-selected-window + (let ((next-error-highlight next-error-highlight-no-select) + (display-buffer-overriding-action + '(nil (inhibit-same-window . t)))) + (next-error n)))) (defun previous-error-no-select (&optional n) "Move point to the previous error in the `next-error' buffer and highlight match. commit 039be4e02513e03ae465efae5694bd4e28a74dbe Author: Philipp Stephani Date: Mon Dec 17 21:47:46 2018 +0100 Add file name handler support for 'make-process' (Bug#28691) * src/process.c (Fmake_process): Add new keyword argument ':file-handler'. (syms_of_process) : Define new symbols. * lisp/files.el (file-name-non-special): Add support for 'make-process'. * test/src/process-tests.el (make-process/file-handler/found) (make-process/file-handler/not-found) (make-process/file-handler/disable): New unit tests. (process-tests--file-handler): New helper function. * test/lisp/files-tests.el (files-tests-file-name-non-special-make-process): New unit test. * doc/lispref/files.texi (Magic File Names): Document that 'make-process' can invoke file name handlers. * doc/lispref/processes.texi (Asynchronous Processes): Document ':file-handlers' argument to 'make-process'. * etc/NEWS (Lisp Changes in Emacs 27.1): Mention new :file-handler argument for 'make-process'. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index 5b428b6205..d929978b6e 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -3171,6 +3171,7 @@ first, before handlers for jobs such as remote file access. @code{make-directory}, @code{make-directory-internal}, @code{make-nearby-temp-file}, +@code{make-process}, @code{make-symbolic-link},@* @code{process-file}, @code{rename-file}, @code{set-file-acl}, @code{set-file-modes}, @@ -3227,6 +3228,7 @@ first, before handlers for jobs such as remote file access. @code{make-auto-save-file-name}, @code{make-direc@discretionary{}{}{}tory}, @code{make-direc@discretionary{}{}{}tory-internal}, +@code{make-process}, @code{make-symbolic-link}, @code{process-file}, @code{rename-file}, @code{set-file-acl}, @code{set-file-modes}, diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index 402691c6bc..d72f5b880a 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -696,6 +696,12 @@ non-@code{nil} value should be either a buffer or a pipe process created with @code{make-pipe-process}, described below. If @var{stderr} is @code{nil}, standard error is mixed with standard output, and both are sent to @var{buffer} or @var{filter}. + +@item :file-handler @var{file-handler} +If @var{file-handler} is non-@code{nil}, then look for a file name +handler for the current buffer's @code{default-directory}, and invoke +that file handler to make the process. If there is no such handler, +proceed as if @var{file-handler} were @code{nil}. @end table The original argument list, modified with the actual connection @@ -704,8 +710,8 @@ information, is available via the @code{process-contact} function. The current working directory of the subprocess is set to the current buffer's value of @code{default-directory} if that is local (as determined by `unhandled-file-name-directory'), or "~" otherwise. If -you want to run a process in a remote directory use -@code{start-file-process}. +you want to run a process in a remote directory, pass +@code{:file-handler t} to @code{make-process}. @end defun @defun make-pipe-process &rest args diff --git a/etc/NEWS b/etc/NEWS index ea3e4d566f..253edd593e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1428,6 +1428,11 @@ un-obsoleting it. +++ ** New function 'group-name' returns a group name corresponding to GID. +** 'make-process' now takes a keyword argument ':file-handler'; if +that is non-nil, it will look for a file name handler for the current +buffer's 'default-directory' and invoke that file handler to make the +process. That way 'make-process' can start remote processes. + * Changes in Emacs 27.1 on Non-Free Operating Systems diff --git a/lisp/files.el b/lisp/files.el index fb6cf0193a..448df62710 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -7103,7 +7103,8 @@ only these files will be asked to be saved." (default-directory (if (memq operation '(insert-directory process-file start-file-process - shell-command temporary-file-directory)) + make-process shell-command + temporary-file-directory)) (directory-file-name (expand-file-name (unhandled-file-name-directory default-directory))) @@ -7151,7 +7152,13 @@ only these files will be asked to be saved." ;; These file-notify-* operations take a ;; descriptor. (file-notify-rm-watch) - (file-notify-valid-p))) + (file-notify-valid-p) + ;; `make-process' uses keyword arguments and + ;; doesn't mangle its filenames in any way. + ;; It already strips /: from the binary + ;; filename, so we don't have to do this + ;; here. + (make-process))) ;; For all other operations, treat the first ;; argument only as the file name. '(nil 0)))) diff --git a/src/process.c b/src/process.c index 8e0b2349f9..5895f77446 100644 --- a/src/process.c +++ b/src/process.c @@ -1661,6 +1661,11 @@ to the standard error of subprocess. Specifying this implies `:connection-type' is set to `pipe'. If STDERR is nil, standard error is mixed with standard output and sent to BUFFER or FILTER. +:file-handler FILE-HANDLER -- If FILE-HANDLER is non-nil, then look +for a file name handler for the current buffer's `default-directory' +and invoke that file handler to make the process. If there is no +such handler, proceed as if FILE-HANDLER were nil. + usage: (make-process &rest ARGS) */) (ptrdiff_t nargs, Lisp_Object *args) { @@ -1674,6 +1679,15 @@ usage: (make-process &rest ARGS) */) /* Save arguments for process-contact and clone-process. */ contact = Flist (nargs, args); + if (!NILP (Fplist_get (contact, QCfile_handler))) + { + Lisp_Object file_handler + = Ffind_file_name_handler (BVAR (current_buffer, directory), + Qmake_process); + if (!NILP (file_handler)) + return CALLN (Fapply, file_handler, Qmake_process, contact); + } + buffer = Fplist_get (contact, QCbuffer); if (!NILP (buffer)) buffer = Fget_buffer_create (buffer); @@ -8098,6 +8112,8 @@ init_process_emacs (int sockfd) void syms_of_process (void) { + DEFSYM (Qmake_process, "make-process"); + #ifdef subprocesses DEFSYM (Qprocessp, "processp"); @@ -8138,6 +8154,7 @@ syms_of_process (void) DEFSYM (Qreal, "real"); DEFSYM (Qnetwork, "network"); DEFSYM (Qserial, "serial"); + DEFSYM (QCfile_handler, ":file-handler"); DEFSYM (QCbuffer, ":buffer"); DEFSYM (QChost, ":host"); DEFSYM (QCservice, ":service"); diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 3b192ee872..9d827e865d 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -1109,6 +1109,16 @@ unquoted file names." (with-temp-buffer (write-region nil nil nospecial nil :visit)))) +(ert-deftest files-tests-file-name-non-special-make-process () + "Check that the ‘:file-handler’ argument of ‘make-process’ +works as expected if the default directory is quoted." + (let ((default-directory (file-name-quote invocation-directory)) + (program (file-name-quote + (expand-file-name invocation-name invocation-directory)))) + (should (processp (make-process :name "name" + :command (list program "--version") + :file-handler t))))) + (ert-deftest files-tests--insert-directory-wildcard-in-dir-p () (let ((alist (list (cons "/home/user/*/.txt" (cons "/home/user/" "*/.txt")) (cons "/home/user/.txt" nil) diff --git a/test/src/process-tests.el b/test/src/process-tests.el index 551b34ff37..af5bc73757 100644 --- a/test/src/process-tests.el +++ b/test/src/process-tests.el @@ -215,5 +215,54 @@ (string-to-list "stdout\n") (string-to-list "stderr\n")))))) +(ert-deftest make-process/file-handler/found () + "Check that the ‘:file-handler’ argument of ‘make-process’ +works as expected if a file handler is found." + (let ((file-handler-calls 0)) + (cl-flet ((file-handler + (&rest args) + (should (equal default-directory "test-handler:/dir/")) + (should (equal args '(make-process :name "name" + :command ("/some/binary") + :file-handler t))) + (cl-incf file-handler-calls) + 'fake-process)) + (let ((file-name-handler-alist (list (cons (rx bos "test-handler:") + #'file-handler))) + (default-directory "test-handler:/dir/")) + (should (eq (make-process :name "name" + :command '("/some/binary") + :file-handler t) + 'fake-process)) + (should (= file-handler-calls 1)))))) + +(ert-deftest make-process/file-handler/not-found () + "Check that the ‘:file-handler’ argument of ‘make-process’ +works as expected if no file handler is found." + (let ((file-name-handler-alist ()) + (default-directory invocation-directory) + (program (expand-file-name invocation-name invocation-directory))) + (should (processp (make-process :name "name" + :command (list program "--version") + :file-handler t))))) + +(ert-deftest make-process/file-handler/disable () + "Check ‘make-process’ works as expected if it shouldn’t use the +file handler." + (let ((file-name-handler-alist (list (cons (rx bos "test-handler:") + #'process-tests--file-handler))) + (default-directory "test-handler:/dir/") + (program (expand-file-name invocation-name invocation-directory))) + (should (processp (make-process :name "name" + :command (list program "--version")))))) + +(defun process-tests--file-handler (operation &rest _args) + (cl-ecase operation + (unhandled-file-name-directory "/") + (make-process (ert-fail "file handler called unexpectedly")))) + +(put #'process-tests--file-handler 'operations + '(unhandled-file-name-directory make-process)) + (provide 'process-tests) ;; process-tests.el ends here. commit b41789f31f2355f6de8c15bbbc10cd6bf3dfe61e Author: Eli Zaretskii Date: Sat Dec 22 22:41:53 2018 +0200 * etc/HELLO: Add missing charset properties for Japanese and Korean. diff --git a/etc/HELLO b/etc/HELLO index db7fd23f1a..7345da0282 100644 --- a/etc/HELLO +++ b/etc/HELLO @@ -88,10 +88,10 @@ Telugu (తెలుగు) నమస్కారం -Japanese (日本語) こんにちは katakana-jisx0201/ コンニチハ +japanese-jisx0208Japanese (日本語) こんにちは katakana-jisx0201/ コンニチハ chinese-gb2312Chinese (中文,普通话,汉语) 你好 chinese-big5-1Cantonese (粵語,廣東話) 早晨, 你好 -Korean (한글) 안녕하세요 / 안녕하십니까 +korean-ksc5601Korean (한글) 안녕하세요 / 안녕하십니까 korean-ksc5601 commit 898a0234c9054c155414dcfac4e3e9565a0b144c Author: Charles A. Roelli Date: Sat Dec 22 17:28:35 2018 +0100 Macroexpand before evaluating in eval-expression (bis) * lisp/simple.el (eval-expression): Macroexpand before evaluating. This repeats the fix made for Bug#20730 in another branch of the code a few lines down. diff --git a/lisp/simple.el b/lisp/simple.el index 6765f1c995..905477a142 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1615,7 +1615,7 @@ this command arranges for all errors to enter the debugger." (eval-expression-get-print-arguments current-prefix-arg))) (if (null eval-expression-debug-on-error) - (push (eval exp lexical-binding) values) + (push (eval (macroexpand-all exp) lexical-binding) values) (let ((old-value (make-symbol "t")) new-value) ;; Bind debug-on-error to something unique so that we can ;; detect when evalled code changes it. commit d2ff6627f9fe0c4de9cf28d489491ef2f6661b69 Author: Thomas Fitzsimmons Date: Sat Dec 22 09:48:27 2018 -0500 ldap.el: Do not set process-connection-type * lisp/net/ldap.el (ldap-search-internal): Leave process-connection-type at its default value. (Bug#33050) diff --git a/lisp/net/ldap.el b/lisp/net/ldap.el index 720c9c178f..4b49f76c3b 100644 --- a/lisp/net/ldap.el +++ b/lisp/net/ldap.el @@ -646,8 +646,9 @@ an alist of attribute/value pairs." (not (equal "" sizelimit))) (setq arglist (nconc arglist (list (format "-z%s" sizelimit))))) (if passwd - (let* ((process-connection-type t) - (proc-args (append arglist ldap-ldapsearch-args + ;; Leave process-connection-type at its default value. See + ;; discussion in Bug#33050. + (let* ((proc-args (append arglist ldap-ldapsearch-args filter)) (proc (apply #'start-process "ldapsearch" buf ldap-ldapsearch-prog commit 36c270daaf7fadc3fd900f28edea7e7a7ca0ddab Author: Michael Albinus Date: Sat Dec 22 14:07:49 2018 +0100 ; Cosmetic changes to etc/NEWS diff --git a/etc/NEWS b/etc/NEWS index 31067c3ff3..ea3e4d566f 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -245,9 +245,9 @@ It reports the git branch from which Emacs was built. +++ ** New user option 'switch-to-buffer-obey-display-actions'. -When non-nil, `switch-to-buffer' uses `pop-to-buffer-same-window' that -respects display actions specified by `display-buffer-alist' and -`display-buffer-overriding-action'. +When non-nil, 'switch-to-buffer' uses 'pop-to-buffer-same-window' that +respects display actions specified by 'display-buffer-alist' and +'display-buffer-overriding-action'. * Editing Changes in Emacs 27.1 @@ -311,8 +311,8 @@ the node "(emacs) Directory Variables" of the user manual. * Changes in Specialized Modes and Packages in Emacs 27.1 ** map.el -*** Now also understands plists -*** Now defined via generic functions that can be extended via cl-defmethod. +*** Now also understands plists. +*** Now defined via generic functions that can be extended via 'cl-defmethod'. *** Deprecate the 'map-put' macro in favor of a new 'map-put!' function. *** 'map-contains-key' now returns a boolean rather than the key. *** Deprecate the 'testfn' args of 'map-elt' and 'map-contains-key'. @@ -343,11 +343,11 @@ displays the *Messages* buffer in the same window. *** Windmove also supports directional window deletion. The new command 'windmove-delete-default-keybindings' binds default -keys with provided prefix (by default, C-x) and modifiers (by default, -Shift) to the commands that delete the window in the specified +keys with provided prefix (by default, 'C-x') and modifiers (by default, +'Shift') to the commands that delete the window in the specified direction. For example, 'C-x S-down' deletes the window below. With a prefix arg 'C-u', also kills the buffer in that window. -With `M-0', deletes the selected window and selects the window +With 'M-0', deletes the selected window and selects the window that was in the specified direction. ** Octave mode @@ -1149,7 +1149,7 @@ removed. * Lisp Changes in Emacs 27.1 +++ -** self-insert-command takes the char to insert as (optional) argument +** 'self-insert-command' takes the char to insert as (optional) argument. ** 'lookup-key' can take a list of keymaps as argument. commit 88b41c40d0ee681af66d11793bb6dd20e3c7826f Author: Michael Albinus Date: Sat Dec 22 13:57:54 2018 +0100 Use "file name handler" consequently * doc/lispref/files.texi: * doc/lispref/processes.texi: * doc/misc/ediff.texi: * lisp/simple.el: * lisp/vc/ediff-ptch.el: * src/buffer.c: * src/dired.c: * src/fileio.c: * src/image.c: * src/insdel.c: * src/w32fns.c: Use "file name handler" consequently. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index b795864815..5b428b6205 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -3067,7 +3067,7 @@ expression to define the class of names (all those that match the regular expression), plus a handler that implements all the primitive Emacs file operations for file names that match. -@cindex file handler +@cindex file name handler @vindex file-name-handler-alist The variable @code{file-name-handler-alist} holds a list of handlers, together with regular expressions that determine when to apply each @@ -3354,8 +3354,8 @@ If @code{file-remote-p} returns the same identifier for two different filenames, that means they are stored on the same file system and can be accessed locally with respect to each other. This means, for example, that it is possible to start a remote process accessing both -files at the same time. Implementers of file handlers need to ensure -this principle is valid. +files at the same time. Implementers of file name handlers need to +ensure this principle is valid. @var{identification} specifies which part of the identifier shall be returned as string. @var{identification} can be the symbol diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index d88c7fbe62..402691c6bc 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -423,27 +423,27 @@ be found in the definition of the @code{insert-directory} function: @defun process-file program &optional infile buffer display &rest args This function processes files synchronously in a separate process. It -is similar to @code{call-process}, but may invoke a file handler based -on the value of the variable @code{default-directory}, which specifies -the current working directory of the subprocess. +is similar to @code{call-process}, but may invoke a file name handler +based on the value of the variable @code{default-directory}, which +specifies the current working directory of the subprocess. The arguments are handled in almost the same way as for @code{call-process}, with the following differences: -Some file handlers may not support all combinations and forms of the +Some file name handlers may not support all combinations and forms of the arguments @var{infile}, @var{buffer}, and @var{display}. For example, -some file handlers might behave as if @var{display} were @code{nil}, +some file name handlers might behave as if @var{display} were @code{nil}, regardless of the value actually passed. As another example, some -file handlers might not support separating standard output and error +file name handlers might not support separating standard output and error output by way of the @var{buffer} argument. -If a file handler is invoked, it determines the program to run based +If a file name handler is invoked, it determines the program to run based on the first argument @var{program}. For instance, suppose that a handler for remote files is invoked. Then the path that is used for searching for the program might be different from @code{exec-path}. -The second argument @var{infile} may invoke a file handler. The file -handler could be different from the handler chosen for the +The second argument @var{infile} may invoke a file name handler. The file +name handler could be different from the handler chosen for the @code{process-file} function itself. (For example, @code{default-directory} could be on one remote host, and @var{infile} on a different remote host. Or @code{default-directory} @@ -468,7 +468,7 @@ remote files. By default, this variable is always set to @code{t}, meaning that a call of @code{process-file} could potentially change any file on a -remote host. When set to @code{nil}, a file handler could optimize +remote host. When set to @code{nil}, a file name handler could optimize its behavior with respect to remote file attribute caching. You should only ever change this variable with a let-binding; never @@ -821,7 +821,7 @@ subprocess running @var{program} in it, and returns its process object. The difference from @code{start-process} is that this function may -invoke a file handler based on the value of @code{default-directory}. +invoke a file name handler based on the value of @code{default-directory}. This handler ought to run @var{program}, perhaps on the local host, perhaps on a remote host that corresponds to @code{default-directory}. In the latter case, the local part of @code{default-directory} becomes @@ -830,13 +830,13 @@ the working directory of the process. This function does not try to invoke file name handlers for @var{program} or for the rest of @var{args}. -Depending on the implementation of the file handler, it might not be +Depending on the implementation of the file name handler, it might not be possible to apply @code{process-filter} or @code{process-sentinel} to the resulting process object. @xref{Filter Functions}, and @ref{Sentinels}. @c FIXME Can we find a better example (i.e., a more modern function @c that is actually documented). -Some file handlers may not support @code{start-file-process} (for +Some file name handlers may not support @code{start-file-process} (for example the function @code{ange-ftp-hook-function}). In such cases, this function does nothing and returns @code{nil}. @end defun diff --git a/doc/misc/ediff.texi b/doc/misc/ediff.texi index cce8321d9e..e07f567e2a 100644 --- a/doc/misc/ediff.texi +++ b/doc/misc/ediff.texi @@ -1147,7 +1147,7 @@ file (unlike what the @code{patch} utility would usually do). Instead, the source file retains its name and the result of applying the patch is placed in a temporary file that has the suffix @file{_patched} attached. Generally, this applies to files that are handled using black magic, such -as special file handlers (ange-ftp and some compression and encryption +as special file name handlers (ange-ftp and some compression and encryption packages also use this method). Regular files are treated by the @code{patch} utility in the usual manner, diff --git a/lisp/simple.el b/lisp/simple.el index 6eb56b73c0..6765f1c995 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3893,17 +3893,17 @@ interactively, this is t." (defun process-file (program &optional infile buffer display &rest args) "Process files synchronously in a separate process. -Similar to `call-process', but may invoke a file handler based on +Similar to `call-process', but may invoke a file name handler based on `default-directory'. The current working directory of the subprocess is `default-directory'. File names in INFILE and BUFFER are handled normally, but file names in ARGS should be relative to `default-directory', as they are passed to the process verbatim. (This is a difference to -`call-process' which does not support file handlers for INFILE +`call-process' which does not support file name handlers for INFILE and BUFFER.) -Some file handlers might not support all variants, for example +Some file name handlers might not support all variants, for example they might behave as if DISPLAY was nil, regardless of the actual value passed." (let ((fh (find-file-name-handler default-directory 'process-file)) @@ -3927,7 +3927,7 @@ value passed." By default, this variable is always set to t, meaning that a call of `process-file' could potentially change any file on a -remote host. When set to nil, a file handler could optimize +remote host. When set to nil, a file name handler could optimize its behavior with respect to remote file attribute caching. You should only ever change this variable with a let-binding; @@ -3936,7 +3936,7 @@ never with `setq'.") (defun start-file-process (name buffer program &rest program-args) "Start a program in a subprocess. Return the process object for it. -Similar to `start-process', but may invoke a file handler based on +Similar to `start-process', but may invoke a file name handler based on `default-directory'. See Info node `(elisp)Magic File Names'. This handler ought to run PROGRAM, perhaps on the local host, @@ -3945,7 +3945,7 @@ In the latter case, the local part of `default-directory' becomes the working directory of the process. PROGRAM and PROGRAM-ARGS might be file names. They are not -objects of file handler invocation. File handlers might not +objects of file name handler invocation. File name handlers might not support pty association, if PROGRAM is nil." (let ((fh (find-file-name-handler default-directory 'start-file-process))) (if fh (apply fh 'start-file-process name buffer program program-args) diff --git a/lisp/vc/ediff-ptch.el b/lisp/vc/ediff-ptch.el index 03f5421913..79d82e30b1 100644 --- a/lisp/vc/ediff-ptch.el +++ b/lisp/vc/ediff-ptch.el @@ -681,7 +681,7 @@ optional argument, then use it." (error "Ediff doesn't take the -V option in `ediff-patch-options'--sorry")) - ;; Make a temp file, if source-filename has a magic file handler (or if + ;; Make a temp file, if source-filename has a magic file name handler (or if ;; it is handled via auto-mode-alist and similar magic). ;; Check if there is a buffer visiting source-filename and if they are in ;; sync; arrange for the deletion of temp file. @@ -691,7 +691,7 @@ optional argument, then use it." ;; Check if source file name has triggered black magic, such as file name ;; handlers or auto mode alist, and make a note of it. ;; true-source-filename should be either the original name or a - ;; temporary file where we put the after-product of the file handler. + ;; temporary file where we put the after-product of the file name handler. (setq file-name-magic-p (not (equal (file-truename true-source-filename) (file-truename source-filename)))) diff --git a/src/buffer.c b/src/buffer.c index a71bd77de9..44884b79ac 100644 --- a/src/buffer.c +++ b/src/buffer.c @@ -466,7 +466,7 @@ See also `find-buffer-visiting'. */) filename = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qget_file_buffer); if (!NILP (handler)) { diff --git a/src/dired.c b/src/dired.c index 7ad401c728..b81e35384e 100644 --- a/src/dired.c +++ b/src/dired.c @@ -333,7 +333,7 @@ If NOSORT is non-nil, the list is not sorted--its order is unpredictable. directory = Fexpand_file_name (directory, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_files); if (!NILP (handler)) return call5 (handler, Qdirectory_files, directory, @@ -368,7 +368,7 @@ which see. */) directory = Fexpand_file_name (directory, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_files_and_attributes); if (!NILP (handler)) return call6 (handler, Qdirectory_files_and_attributes, @@ -403,13 +403,13 @@ is matched against file and directory names relative to DIRECTORY. */) directory = Fexpand_file_name (directory, Qnil); /* If the directory name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qfile_name_completion); if (!NILP (handler)) return call4 (handler, Qfile_name_completion, file, directory, predicate); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qfile_name_completion); if (!NILP (handler)) return call4 (handler, Qfile_name_completion, file, directory, predicate); @@ -431,13 +431,13 @@ is matched against file and directory names relative to DIRECTORY. */) directory = Fexpand_file_name (directory, Qnil); /* If the directory name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qfile_name_all_completions); if (!NILP (handler)) return call3 (handler, Qfile_name_all_completions, file, directory); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qfile_name_all_completions); if (!NILP (handler)) return call3 (handler, Qfile_name_all_completions, file, directory); @@ -901,11 +901,12 @@ so last access time will always be midnight of that day. */) return Qnil; /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_attributes); if (!NILP (handler)) - { /* Only pass the extra arg if it is used to help backward compatibility - with old file handlers which do not implement the new arg. --Stef */ + { /* Only pass the extra arg if it is used to help backward + compatibility with old file name handlers which do not + implement the new arg. --Stef */ if (NILP (id_format)) return call2 (handler, Qfile_attributes, filename); else diff --git a/src/fileio.c b/src/fileio.c index 687f6ec745..0261c20fc3 100644 --- a/src/fileio.c +++ b/src/fileio.c @@ -347,7 +347,7 @@ Given a Unix syntax file name, returns a string ending in slash. */) CHECK_STRING (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_name_directory); if (!NILP (handler)) { @@ -442,7 +442,7 @@ or the entire name if it contains no slash. */) CHECK_STRING (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_name_nondirectory); if (!NILP (handler)) { @@ -473,7 +473,7 @@ DEFUN ("unhandled-file-name-directory", Funhandled_file_name_directory, Sunhandled_file_name_directory, 1, 1, 0, doc: /* Return a directly usable directory name somehow associated with FILENAME. A `directly usable' directory name is one that may be used without the -intervention of any file handler. +intervention of any file name handler. If FILENAME is a directly usable file itself, return \(file-name-as-directory FILENAME). If FILENAME refers to a file which is not accessible from a local process, @@ -485,7 +485,7 @@ get a current directory to run processes in. */) Lisp_Object handler; /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qunhandled_file_name_directory); if (!NILP (handler)) { @@ -547,7 +547,7 @@ is already present. */) CHECK_STRING (file); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qfile_name_as_directory); if (!NILP (handler)) { @@ -638,7 +638,7 @@ In Unix-syntax, this function just removes the final slash. */) CHECK_STRING (directory); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (directory, Qdirectory_file_name); if (!NILP (handler)) { @@ -790,7 +790,7 @@ the root directory. */) CHECK_STRING (name); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (name, Qexpand_file_name); if (!NILP (handler)) { @@ -1447,7 +1447,7 @@ the root directory. */) } /* Again look to see if the file name has special constructs in it - and perhaps call the corresponding file handler. This is needed + and perhaps call the corresponding file name handler. This is needed for filenames such as "/foo/../user@host:/bar/../baz". Expanding the ".." component gives us "/user@host:/bar/../baz" which needs to be expanded again. */ @@ -1800,7 +1800,7 @@ those `/' is discarded. */) multibyte = STRING_MULTIBYTE (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qsubstitute_in_file_name); if (!NILP (handler)) { @@ -2014,7 +2014,7 @@ permissions. */) newname = expand_cp_target (file, newname); /* If the input file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qcopy_file); /* Likewise for output file name. */ if (NILP (handler)) @@ -2375,7 +2375,7 @@ The arg must be a string. */) filename = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_name_case_insensitive_p); if (!NILP (handler)) return call2 (handler, Qfile_name_case_insensitive_p, filename); @@ -2436,7 +2436,7 @@ This is what happens in interactive use with M-x. */) newname = expand_cp_target (Fdirectory_file_name (file), newname); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qrename_file); if (NILP (handler)) handler = Ffind_file_name_handler (newname, Qrename_file); @@ -2538,14 +2538,14 @@ This is what happens in interactive use with M-x. */) newname = expand_cp_target (file, newname); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (file, Qadd_name_to_file); if (!NILP (handler)) return call4 (handler, Qadd_name_to_file, file, newname, ok_if_already_exists); /* If the new name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (newname, Qadd_name_to_file); if (!NILP (handler)) return call4 (handler, Qadd_name_to_file, file, @@ -2598,7 +2598,7 @@ This happens for interactive use with M-x. */) linkname = expand_cp_target (target, linkname); /* If the new link name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (linkname, Qmake_symbolic_link); if (!NILP (handler)) return call4 (handler, Qmake_symbolic_link, target, @@ -2653,7 +2653,7 @@ Use `file-symlink-p' to test for such links. */) absname = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qfile_exists_p); if (!NILP (handler)) { @@ -2681,7 +2681,7 @@ purpose, though.) */) absname = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qfile_executable_p); if (!NILP (handler)) return call2 (handler, Qfile_executable_p, absname); @@ -2703,7 +2703,7 @@ See also `file-exists-p' and `file-attributes'. */) absname = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qfile_readable_p); if (!NILP (handler)) return call2 (handler, Qfile_readable_p, absname); @@ -2724,7 +2724,7 @@ DEFUN ("file-writable-p", Ffile_writable_p, Sfile_writable_p, 1, 1, 0, absname = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qfile_writable_p); if (!NILP (handler)) return call2 (handler, Qfile_writable_p, absname); @@ -2766,7 +2766,7 @@ If there is no error, returns nil. */) CHECK_STRING (string); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qaccess_file); if (!NILP (handler)) return call3 (handler, Qaccess_file, absname, string); @@ -2814,7 +2814,7 @@ This function does not check whether the link target exists. */) filename = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qfile_symlink_p); if (!NILP (handler)) return call2 (handler, Qfile_symlink_p, filename); @@ -2833,7 +2833,7 @@ See `file-symlink-p' to distinguish symlinks. */) Lisp_Object absname = expand_and_dir_to_file (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_directory_p); if (!NILP (handler)) return call2 (handler, Qfile_directory_p, absname); @@ -2902,7 +2902,7 @@ really is a readable and searchable directory. */) absname = Fexpand_file_name (filename, Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qfile_accessible_directory_p); if (!NILP (handler)) { @@ -2993,7 +2993,7 @@ See `file-symlink-p' to distinguish symlinks. */) Lisp_Object absname = expand_and_dir_to_file (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_regular_p); if (!NILP (handler)) return call2 (handler, Qfile_regular_p, absname); @@ -3036,7 +3036,7 @@ or if SELinux is disabled, or if Emacs lacks SELinux support. */) Lisp_Object absname = expand_and_dir_to_file (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_selinux_context); if (!NILP (handler)) @@ -3098,7 +3098,7 @@ or if Emacs was not compiled with SELinux support. */) absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qset_file_selinux_context); if (!NILP (handler)) return call3 (handler, Qset_file_selinux_context, absname, context); @@ -3168,7 +3168,7 @@ was unable to determine the ACL entries. */) Lisp_Object absname = expand_and_dir_to_file (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_acl); if (!NILP (handler)) return call2 (handler, Qfile_acl, absname); @@ -3223,7 +3223,7 @@ support. */) absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qset_file_acl); if (!NILP (handler)) return call3 (handler, Qset_file_acl, absname, acl_string); @@ -3265,7 +3265,7 @@ Return nil, if file does not exist or is not accessible. */) Lisp_Object absname = expand_and_dir_to_file (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname, Qfile_modes); if (!NILP (handler)) return call2 (handler, Qfile_modes, absname); @@ -3295,7 +3295,7 @@ symbolic notation, like the `chmod' command from GNU Coreutils. */) CHECK_FIXNUM (mode); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qset_file_modes); if (!NILP (handler)) return call3 (handler, Qset_file_modes, absname, mode); @@ -3362,7 +3362,7 @@ Use the current time if TIMESTAMP is nil. TIMESTAMP is in the format of absname = Fexpand_file_name (filename, BVAR (current_buffer, directory)); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (absname, Qset_file_times); if (!NILP (handler)) return call3 (handler, Qset_file_times, absname, timestamp); @@ -3410,7 +3410,7 @@ otherwise, if FILE2 does not exist, the answer is t. */) Lisp_Object absname2 = expand_and_dir_to_file (file2); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (absname1, Qfile_newer_than_file_p); if (NILP (handler)) @@ -3686,7 +3686,7 @@ by calling `format-decode', which see. */) coding_system = Qnil; /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qinsert_file_contents); if (!NILP (handler)) { @@ -4957,7 +4957,7 @@ write_region (Lisp_Object start, Lisp_Object end, Lisp_Object filename, annotations = Qnil; /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qwrite_region); /* If FILENAME has no handler, see if VISIT has one. */ if (NILP (handler) && STRINGP (visit)) @@ -5517,7 +5517,7 @@ See Info node `(elisp)Modification Time' for more details. */) if (b->modtime.tv_nsec == UNKNOWN_MODTIME_NSECS) return Qt; /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (BVAR (b, filename), Qverify_visited_file_modtime); if (!NILP (handler)) @@ -5583,7 +5583,7 @@ in `current-time' or an integer flag as returned by `visited-file-modtime'. */) filename = Fexpand_file_name (BVAR (current_buffer, filename), Qnil); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ handler = Ffind_file_name_handler (filename, Qset_visited_file_modtime); if (!NILP (handler)) /* The handler can find the file name the same way we did. */ @@ -6001,7 +6001,7 @@ If the underlying system call fails, value is nil. */) Lisp_Object encoded = ENCODE_FILE (Fexpand_file_name (filename, Qnil)); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (encoded, Qfile_system_info); if (!NILP (handler)) { diff --git a/src/image.c b/src/image.c index b54cd76327..218626f771 100644 --- a/src/image.c +++ b/src/image.c @@ -2340,10 +2340,10 @@ x_find_image_fd (Lisp_Object file, int *pfd) file_found = ENCODE_FILE (file_found); if (fd == -2) { - /* The file exists locally, but has a file handler. (This - happens, e.g., under Auto Image File Mode.) 'openp' - didn't open the file, so we should, because the caller - expects that. */ + /* The file exists locally, but has a file name handler. + (This happens, e.g., under Auto Image File Mode.) + 'openp' didn't open the file, so we should, because the + caller expects that. */ fd = emacs_open (SSDATA (file_found), O_RDONLY, 0); } } diff --git a/src/insdel.c b/src/insdel.c index 70cebc0d2c..10222717d1 100644 --- a/src/insdel.c +++ b/src/insdel.c @@ -2255,7 +2255,7 @@ DEFUN ("combine-after-change-execute", Fcombine_after_change_execute, /* It is rare for combine_after_change_buffer to be invalid, but possible. It can happen when combine-after-change-calls is - non-nil, and insertion calls a file handler (e.g. through + non-nil, and insertion calls a file name handler (e.g. through lock_file) which scribbles into a temp file -- cyd */ if (!BUFFERP (combine_after_change_buffer) || !BUFFER_LIVE_P (XBUFFER (combine_after_change_buffer))) diff --git a/src/w32fns.c b/src/w32fns.c index 9a9789d8af..484e18fd76 100644 --- a/src/w32fns.c +++ b/src/w32fns.c @@ -8219,7 +8219,7 @@ a ShowWindow flag: URL, for example. So we make it absolute only if it is an existing file; if it is a file that does not exist, tough. */ absdoc = Fexpand_file_name (document, Qnil); - /* Don't call file handlers for file-exists-p, since they might + /* Don't call file name handlers for file-exists-p, since they might attempt to access the file, which could fail or produce undesired consequences, see bug#16558 for an example. */ handler = Ffind_file_name_handler (absdoc, Qfile_exists_p); @@ -9097,7 +9097,7 @@ DEFUN ("file-system-info", Ffile_system_info, Sfile_system_info, 1, 1, 0, encoded = ENCODE_FILE (filename); /* If the file name has special constructs in it, - call the corresponding file handler. */ + call the corresponding file name handler. */ Lisp_Object handler = Ffind_file_name_handler (encoded, Qfile_system_info); if (!NILP (handler)) {