commit 0e0ad865d49dbcfcebaae9204c52e8632e1e2ddf (HEAD, refs/remotes/origin/master) Author: Glenn Morris Date: Fri Feb 2 20:58:34 2018 -0500 ; * autogen.sh (check_version): Improve previous change. diff --git a/autogen.sh b/autogen.sh index 2e6b62db84..518e5dbe83 100755 --- a/autogen.sh +++ b/autogen.sh @@ -85,7 +85,7 @@ check_version () ## /bin/sh should always define the "command" builtin, but for ## some odd reason sometimes it does not on hydra.nixos.org. ## /bin/sh = "BusyBox v1.27.2", "built-in shell (ash)". ? - if command -v command > /dev/null; then + if command -v command > /dev/null 2>&1; then command -v $uprog > /dev/null || return 1 else $uprog --version > /dev/null 2>&1 || return 1 commit c532a8015e932fa4bee1ed68ce01b3c0b802d09c Author: Glenn Morris Date: Fri Feb 2 20:42:08 2018 -0500 Try to work around intermittent autogen failure on hydra.nixos.org * autogen.sh (check_version): Try to handle odd systems where /bin/sh does not define the "command" builtin. diff --git a/autogen.sh b/autogen.sh index acebc2381a..2e6b62db84 100755 --- a/autogen.sh +++ b/autogen.sh @@ -82,7 +82,14 @@ check_version () printf '%s' "(using $uprog0=$uprog) " fi - command -v $uprog > /dev/null || return 1 + ## /bin/sh should always define the "command" builtin, but for + ## some odd reason sometimes it does not on hydra.nixos.org. + ## /bin/sh = "BusyBox v1.27.2", "built-in shell (ash)". ? + if command -v command > /dev/null; then + command -v $uprog > /dev/null || return 1 + else + $uprog --version > /dev/null 2>&1 || return 1 + fi have_version=`get_version $uprog` || return 4 have_maj=`major_version $have_version` commit 83fc9009c62429501e50d7658e0dc00102aafa74 Author: Glenn Morris Date: Fri Feb 2 19:46:17 2018 -0500 ; * autogen.sh: Remove temporary debug statements. diff --git a/autogen.sh b/autogen.sh index 605deeb9d7..acebc2381a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -137,12 +137,6 @@ if $do_autoconf; then if $do_check; then - if test -n "$NIX_STORE"; then - echo "DEBUG:" - strings /bin/sh - echo "DEBUG" - fi - echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' commit 8298cb41fe59c044719a45cd887f9953961ecf9b Author: Glenn Morris Date: Fri Feb 2 19:45:24 2018 -0500 ; * autogen.sh: Add some temporary debug statements. diff --git a/autogen.sh b/autogen.sh index acebc2381a..605deeb9d7 100755 --- a/autogen.sh +++ b/autogen.sh @@ -137,6 +137,12 @@ if $do_autoconf; then if $do_check; then + if test -n "$NIX_STORE"; then + echo "DEBUG:" + strings /bin/sh + echo "DEBUG" + fi + echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' commit 1360df13af6dbe4d3880149a345766d4e650b612 Author: Glenn Morris Date: Fri Feb 2 19:11:52 2018 -0500 ; * autogen.sh: Remove temporary debug statements. diff --git a/autogen.sh b/autogen.sh index ce622dcf9a..acebc2381a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -137,13 +137,6 @@ if $do_autoconf; then if $do_check; then - if test -n "$NIX_STORE"; then - echo "DEBUG:" - set - ls -l /proc/$$/exe - echo "DEBUG" - fi - echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' commit 028087d9038e0036d1413e333b7a17d9cb510b81 Author: Glenn Morris Date: Fri Feb 2 19:09:49 2018 -0500 ; * autogen.sh: Add some temporary debug statements. diff --git a/autogen.sh b/autogen.sh index acebc2381a..ce622dcf9a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -137,6 +137,13 @@ if $do_autoconf; then if $do_check; then + if test -n "$NIX_STORE"; then + echo "DEBUG:" + set + ls -l /proc/$$/exe + echo "DEBUG" + fi + echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' commit 396ed687399666036477c4ba50329da1f7dbaa5b Author: Glenn Morris Date: Fri Feb 2 18:45:42 2018 -0500 * autogen.sh: Remove temporary debug statements. diff --git a/autogen.sh b/autogen.sh index 3608b2a418..acebc2381a 100755 --- a/autogen.sh +++ b/autogen.sh @@ -137,15 +137,6 @@ if $do_autoconf; then if $do_check; then - if test -n "$NIX_STORE"; then - echo "DEBUG:" - ls -l /bin/sh - /bin/sh --version - type command - command -v ls - set -x - fi - echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' commit b70321ea85ce5ba36efc2f1cc0ddbb9a8f962248 Author: Glenn Morris Date: Fri Feb 2 18:44:36 2018 -0500 * autogen.sh: Add some temporary debug statements, for hydra.nixos.org. diff --git a/autogen.sh b/autogen.sh index acebc2381a..3608b2a418 100755 --- a/autogen.sh +++ b/autogen.sh @@ -137,6 +137,15 @@ if $do_autoconf; then if $do_check; then + if test -n "$NIX_STORE"; then + echo "DEBUG:" + ls -l /bin/sh + /bin/sh --version + type command + command -v ls + set -x + fi + echo 'Checking whether you have the necessary tools... (Read INSTALL.REPO for more details on building Emacs)' commit 2b288eb9006ed897e7323212408bd25b4bfe2230 Merge: d3090a3a3e 4c8157cfe0 Author: Noam Postavsky Date: Fri Feb 2 18:12:00 2018 -0500 ; Merge from emacs-26 4c8157cfe0 ; Let files-tests.el pass multiple times in a session 99251ab62e ; Avoid process kill query during term tests commit 4c8157cfe06ef5715ba8533be164dd9a047711d0 Author: Noam Postavsky Date: Thu Aug 31 04:57:43 2017 -0400 ; Let files-tests.el pass multiple times in a session * test/lisp/files-tests.el (files-test-local-variables): Use `cl-letf' instead of advice. The advice was not being activated on the second run. diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 8dbfc2965c..d51f8bb9f8 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -135,18 +135,16 @@ form.") (ert-deftest files-test-local-variables () "Test the file-local variables implementation." - (unwind-protect - (progn - (defadvice hack-local-variables-confirm (around files-test activate) - (setq files-test-result 'query) - nil) - (dolist (test files-test-local-variable-data) - (let ((str (concat "text\n\n;; Local Variables:\n;; " - (mapconcat 'identity (car test) "\n;; ") - "\n;; End:\n"))) - (dolist (subtest (cdr test)) - (should (file-test--do-local-variables-test str subtest)))))) - (ad-disable-advice 'hack-local-variables-confirm 'around 'files-test))) + (cl-letf (((symbol-function 'hack-local-variables-confirm) + (lambda (&rest _) + (setq files-test-result 'query) + nil))) + (dolist (test files-test-local-variable-data) + (let ((str (concat "text\n\n;; Local Variables:\n;; " + (mapconcat 'identity (car test) "\n;; ") + "\n;; End:\n"))) + (dolist (subtest (cdr test)) + (should (file-test--do-local-variables-test str subtest))))))) (defvar files-test-bug-18141-file (expand-file-name "data/files-bug18141.el.gz" (getenv "EMACS_TEST_DIRECTORY")) commit 99251ab62e8e2796a2ebc486afd7c0faf173a1b6 Author: Noam Postavsky Date: Thu Feb 1 21:12:09 2018 -0500 ; Avoid process kill query during term tests * test/lisp/term-tests.el (term-test-screen-from-input): Just unset the process query-on-exit flag to rather than trying to end the process before the end of test (which is generally unreliable). diff --git a/test/lisp/term-tests.el b/test/lisp/term-tests.el index 16466ea3cd..234dfa1f0d 100644 --- a/test/lisp/term-tests.el +++ b/test/lisp/term-tests.el @@ -42,21 +42,13 @@ ;; control chunking, and we don't have to worry about wrestling ;; with stty settings. (let ((proc (get-buffer-process (current-buffer)))) - (unwind-protect - (prog2 (if (consp input) - (mapc (lambda (input) (term-emulate-terminal proc input)) input) - (term-emulate-terminal proc input)) - (if return-var (buffer-local-value return-var (current-buffer)) - (buffer-substring-no-properties (point-min) (point-max))) - ;; End the process to avoid query on buffer kill. - (process-send-eof proc) - (accept-process-output proc)) - ;; Make extra sure we don't get stuck in case we hit some - ;; error before sending eof. - (when (process-live-p proc) - (kill-process proc) - ;; Let Emacs update process status. - (accept-process-output proc)))))) + ;; Don't get stuck when we close the buffer. + (set-process-query-on-exit-flag proc nil) + (if (consp input) + (mapc (lambda (input) (term-emulate-terminal proc input)) input) + (term-emulate-terminal proc input)) + (if return-var (buffer-local-value return-var (current-buffer)) + (buffer-substring-no-properties (point-min) (point-max)))))) (ert-deftest term-simple-lines () (let ((str "\ commit d3090a3a3e22c4b0f4e0e833942f5942eb392c51 Author: Alan Mackenzie Date: Fri Feb 2 20:46:35 2018 +0000 CC Mode: Fix an enum intro being parsed as defun-block-intro * lisp/progmodes/cc-engine.el (c-inside-bracelist-p): Return a bufpos rather than t for the enum case. (c-add-stmt-syntax, c-guess-continued-construct): Replace c-looking-at-or-maybe-in-bracelist by c-inside-bracelist-p, since the former does not recognize enum brace lists, but the latter does. * lisp/progmodes/cc-fonts.el (c-get-fontification-context): Replace c-looking-at-or-maybe-in-bracelist by c-inside-bracelist-p. diff --git a/lisp/progmodes/cc-engine.el b/lisp/progmodes/cc-engine.el index ceeee6b357..be7e86beef 100644 --- a/lisp/progmodes/cc-engine.el +++ b/lisp/progmodes/cc-engine.el @@ -10665,7 +10665,8 @@ comment at the start of cc-engine.el for more info." ;; This will pick up brace list declarations. (save-excursion (goto-char containing-sexp) - (c-backward-over-enum-header)) + (and (c-backward-over-enum-header) + (point))) ;; this will pick up array/aggregate init lists, even if they are nested. (save-excursion (let ((bufpos t) @@ -11290,9 +11291,7 @@ comment at the start of cc-engine.el for more info." (cdr (assoc (match-string 1) c-other-decl-block-key-in-symbols-alist)) (max (c-point 'boi paren-pos) (point)))) - ((save-excursion - (goto-char paren-pos) - (c-looking-at-or-maybe-in-bracelist containing-sexp)) + ((c-inside-bracelist-p paren-pos paren-state nil) (if (save-excursion (goto-char paren-pos) (c-looking-at-statement-block)) @@ -11384,10 +11383,9 @@ comment at the start of cc-engine.el for more info." ;; CASE B.2: brace-list-open ((or (consp special-brace-list) - (consp - (c-looking-at-or-maybe-in-bracelist - containing-sexp beg-of-same-or-containing-stmt)) - ) + (c-inside-bracelist-p (point) + (cons containing-sexp paren-state) + nil)) ;; The most semantically accurate symbol here is ;; brace-list-open, but we normally report it simply as a ;; statement-cont. The reason is that one normally adjusts diff --git a/lisp/progmodes/cc-fonts.el b/lisp/progmodes/cc-fonts.el index fa9b8f354e..7cac55e057 100644 --- a/lisp/progmodes/cc-fonts.el +++ b/lisp/progmodes/cc-fonts.el @@ -1234,10 +1234,9 @@ casts and declarations are fontified. Used on level 2 and higher." (cons 'decl nil)) ;; We're inside a brace list. ((and (eq (char-before match-pos) ?{) - (save-excursion - (goto-char (1- match-pos)) - (consp - (c-looking-at-or-maybe-in-bracelist)))) + (c-inside-bracelist-p (1- match-pos) + (cdr (c-parse-state)) + nil)) (c-put-char-property (1- match-pos) 'c-type 'c-not-decl) (cons 'not-decl nil)) commit 0443411f5ce2594a6ec092cd96b92d0b920372f5 Author: Philipp Stephani Date: Sun Jan 28 21:36:03 2018 +0100 Properly integrate modules into the loading process (Bug#30164). * src/lread.c (Fload): Don't defer to module-load immediately when encountering a module, but use the normal loading machinery to properly set up load-history, check for recursive loads, print messages, etc. * test/src/emacs-module-tests.el (module/load-history): New test. (module/describe-function-1): Adapt test. * etc/NEWS: Mention fixed behavior. diff --git a/etc/NEWS b/etc/NEWS index b28f284116..afd0fba5a1 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -275,6 +275,10 @@ file name extensions. ** The new function 'read-answer' accepts either long or short answers depending on the new customizable variable 'read-answer-short'. +** The function 'load' now behaves correctly when loading modules. +Specifically, it puts the module name into 'load-history', prints +loading messages if requested, and protects against recursive loads. + * Changes in Emacs 27.1 on Non-Free Operating Systems diff --git a/src/lread.c b/src/lread.c index 3b0a17c90b..1221dc9a05 100644 --- a/src/lread.c +++ b/src/lread.c @@ -164,6 +164,8 @@ static int read_emacs_mule_char (int, int (*) (int, Lisp_Object), static void readevalloop (Lisp_Object, struct infile *, Lisp_Object, bool, Lisp_Object, Lisp_Object, Lisp_Object, Lisp_Object); + +static void build_load_history (Lisp_Object, bool); /* Functions that read one byte from the current source READCHARFUN or unreads one byte. If the integer argument C is -1, it returns @@ -1246,8 +1248,9 @@ Return t if the file exists and loads successfully. */) } #ifdef HAVE_MODULES - if (suffix_p (found, MODULES_SUFFIX)) - return unbind_to (count, Fmodule_load (found)); + bool is_module = suffix_p (found, MODULES_SUFFIX); +#else + bool is_module = false; #endif /* Check if we're stuck in a recursive load cycle. @@ -1348,7 +1351,7 @@ Return t if the file exists and loads successfully. */) } /* !load_prefer_newer */ } } - else + else if (!is_module) { /* We are loading a source file (*.el). */ if (!NILP (Vload_source_file_function)) @@ -1375,7 +1378,7 @@ Return t if the file exists and loads successfully. */) stream = NULL; errno = EINVAL; } - else + else if (!is_module) { #ifdef WINDOWSNT emacs_close (fd); @@ -1386,9 +1389,23 @@ Return t if the file exists and loads successfully. */) stream = fdopen (fd, fmode); #endif } - if (! stream) - report_file_error ("Opening stdio stream", file); - set_unwind_protect_ptr (fd_index, close_infile_unwind, stream); + + if (is_module) + { + /* `module-load' uses the file name, so we can close the stream + now. */ + if (fd >= 0) + { + emacs_close (fd); + clear_unwind_protect (fd_index); + } + } + else + { + if (! stream) + report_file_error ("Opening stdio stream", file); + set_unwind_protect_ptr (fd_index, close_infile_unwind, stream); + } if (! NILP (Vpurify_flag)) Vpreloaded_file_list = Fcons (Fpurecopy (file), Vpreloaded_file_list); @@ -1398,6 +1415,8 @@ Return t if the file exists and loads successfully. */) if (!safe_p) message_with_string ("Loading %s (compiled; note unsafe, not compiled in Emacs)...", file, 1); + else if (is_module) + message_with_string ("Loading %s (module)...", file, 1); else if (!compiled) message_with_string ("Loading %s (source)...", file, 1); else if (newer) @@ -1411,24 +1430,39 @@ Return t if the file exists and loads successfully. */) specbind (Qinhibit_file_name_operation, Qnil); specbind (Qload_in_progress, Qt); - struct infile input; - input.stream = stream; - input.lookahead = 0; - infile = &input; - - if (lisp_file_lexically_bound_p (Qget_file_char)) - Fset (Qlexical_binding, Qt); - - if (! version || version >= 22) - readevalloop (Qget_file_char, &input, hist_file_name, - 0, Qnil, Qnil, Qnil, Qnil); + if (is_module) + { +#ifdef HAVE_MODULES + specbind (Qcurrent_load_list, Qnil); + LOADHIST_ATTACH (found); + Fmodule_load (found); + build_load_history (found, true); +#else + /* This cannot happen. */ + emacs_abort (); +#endif + } else { - /* We can't handle a file which was compiled with - byte-compile-dynamic by older version of Emacs. */ - specbind (Qload_force_doc_strings, Qt); - readevalloop (Qget_emacs_mule_file_char, &input, hist_file_name, - 0, Qnil, Qnil, Qnil, Qnil); + struct infile input; + input.stream = stream; + input.lookahead = 0; + infile = &input; + + if (lisp_file_lexically_bound_p (Qget_file_char)) + Fset (Qlexical_binding, Qt); + + if (! version || version >= 22) + readevalloop (Qget_file_char, &input, hist_file_name, + 0, Qnil, Qnil, Qnil, Qnil); + else + { + /* We can't handle a file which was compiled with + byte-compile-dynamic by older version of Emacs. */ + specbind (Qload_force_doc_strings, Qt); + readevalloop (Qget_emacs_mule_file_char, &input, hist_file_name, + 0, Qnil, Qnil, Qnil, Qnil); + } } unbind_to (count, Qnil); @@ -1449,6 +1483,8 @@ Return t if the file exists and loads successfully. */) if (!safe_p) message_with_string ("Loading %s (compiled; note unsafe, not compiled in Emacs)...done", file, 1); + else if (is_module) + message_with_string ("Loading %s (module)...done", file, 1); else if (!compiled) message_with_string ("Loading %s (source)...done", file, 1); else if (newer) diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 052f5c2f12..4751638968 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -17,6 +17,7 @@ ;; You should have received a copy of the GNU General Public License ;; along with GNU Emacs. If not, see . */ +(require 'cl-lib) (require 'ert) (require 'help-fns) @@ -267,13 +268,21 @@ during garbage collection." (with-temp-buffer (let ((standard-output (current-buffer))) (describe-function-1 #'mod-test-sum) - (should (equal (buffer-substring-no-properties 1 (point-max)) - ;; FIXME: This should print the actual module - ;; filename. - "a module function in `src/emacs-module-tests.el'. + (should (equal + (buffer-substring-no-properties 1 (point-max)) + (format "a module function in `data/emacs-module/mod-test%s'. (mod-test-sum a b) -Return A + B"))))) +Return A + B" + module-file-suffix)))))) + +(ert-deftest module/load-history () + "Check that Bug#30164 is fixed." + (load mod-test-file) + (cl-destructuring-bind (file &rest entries) (car load-history) + (should (equal (file-name-sans-extension file) mod-test-file)) + (should (member '(provide . mod-test) entries)) + (should (member '(defun . mod-test-sum) entries)))) ;;; emacs-module-tests.el ends here commit 75c663f834528c5431973bf8dc6386c327f9fe0f Author: Philipp Stephani Date: Fri Feb 2 20:40:10 2018 +0100 Use 'defalias' in test module instead of 'fset'. This puts functions defined in the module into the 'load-history'. * test/data/emacs-module/mod-test.c (bind_function): Use 'defalias' instead of 'fset'. * test/src/emacs-module-tests.el (module/describe-function-1): Adapt unit test. diff --git a/test/data/emacs-module/mod-test.c b/test/data/emacs-module/mod-test.c index a1c115f00d..db05e90bc4 100644 --- a/test/data/emacs-module/mod-test.c +++ b/test/data/emacs-module/mod-test.c @@ -299,11 +299,11 @@ provide (emacs_env *env, const char *feature) static void bind_function (emacs_env *env, const char *name, emacs_value Sfun) { - emacs_value Qfset = env->intern (env, "fset"); + emacs_value Qdefalias = env->intern (env, "defalias"); emacs_value Qsym = env->intern (env, name); emacs_value args[] = { Qsym, Sfun }; - env->funcall (env, Qfset, 2, args); + env->funcall (env, Qdefalias, 2, args); } /* Module init function. */ diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index 05be8383dc..052f5c2f12 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -268,8 +268,9 @@ during garbage collection." (let ((standard-output (current-buffer))) (describe-function-1 #'mod-test-sum) (should (equal (buffer-substring-no-properties 1 (point-max)) - ;; FIXME: This should print the filename. - "a module function. + ;; FIXME: This should print the actual module + ;; filename. + "a module function in `src/emacs-module-tests.el'. (mod-test-sum a b) commit f3d0db7f0f9639ec0198d4f4f2c3eb9c7b495778 Author: Philipp Stephani Date: Sun Jan 28 21:57:59 2018 +0100 Add support for module functions to C-h f (Bug#30163). * lisp/help-fns.el (help-fns-function-description-header): Handle module functions. * test/src/emacs-module-tests.el (module/describe-function-1): New test. diff --git a/lisp/help-fns.el b/lisp/help-fns.el index 7a94d2f61a..a592809de6 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -642,6 +642,8 @@ Returns a list of the form (REAL-FUNCTION DEF ALIASED REAL-DEF)." (concat beg "Lisp macro")) ((byte-code-function-p def) (concat beg "compiled Lisp function")) + ((module-function-p def) + (concat beg "module function")) ((eq (car-safe def) 'lambda) (concat beg "Lisp function")) ((eq (car-safe def) 'closure) diff --git a/test/src/emacs-module-tests.el b/test/src/emacs-module-tests.el index a6407524ad..05be8383dc 100644 --- a/test/src/emacs-module-tests.el +++ b/test/src/emacs-module-tests.el @@ -18,6 +18,7 @@ ;; along with GNU Emacs. If not, see . */ (require 'ert) +(require 'help-fns) (defconst mod-test-emacs (expand-file-name invocation-name invocation-directory) @@ -261,4 +262,17 @@ during garbage collection." (rx "Module function called during garbage collection\n") (mod-test-invalid-finalizer))) +(ert-deftest module/describe-function-1 () + "Check that Bug#30163 is fixed." + (with-temp-buffer + (let ((standard-output (current-buffer))) + (describe-function-1 #'mod-test-sum) + (should (equal (buffer-substring-no-properties 1 (point-max)) + ;; FIXME: This should print the filename. + "a module function. + +(mod-test-sum a b) + +Return A + B"))))) + ;;; emacs-module-tests.el ends here commit 344750aef4a8e8c67b1857cf0fe413ba855026d6 Author: Michael Albinus Date: Fri Feb 2 18:51:25 2018 +0100 Handle quoted remote file names for file notifications * lisp/filenotify.el (file-notify-add-watch): Do not suppress other file name handlers when FILE is quoted. * test/lisp/filenotify-tests.el (file-notify-test-remote-temporary-file-directory): Beware quoted `temporary-file-directory'. * test/lisp/files-tests.el (files-tests-file-name-non-special-quote-unquote): Improve test. diff --git a/lisp/filenotify.el b/lisp/filenotify.el index 442dc89157..d88578b65c 100644 --- a/lisp/filenotify.el +++ b/lisp/filenotify.el @@ -307,15 +307,12 @@ FILE is the name of the file whose event is being reported." (unless (functionp callback) (signal 'wrong-type-argument `(,callback))) - (let* ((quoted (file-name-quoted-p file)) - (file (file-name-unquote file)) - (file-name-handler-alist (if quoted nil file-name-handler-alist)) - (handler (find-file-name-handler file 'file-notify-add-watch)) - (dir (directory-file-name - (if (file-directory-p file) - file - (file-name-directory file)))) - desc func l-flags) + (let ((handler (find-file-name-handler file 'file-notify-add-watch)) + (dir (directory-file-name + (if (file-directory-p file) + file + (file-name-directory file)))) + desc func l-flags) (unless (file-directory-p dir) (signal 'file-notify-error `("Directory does not exist" ,dir))) @@ -366,6 +363,10 @@ FILE is the name of the file whose event is being reported." func (if (eq file-notify--library 'kqueue) file dir) l-flags 'file-notify-callback))) + ;; We do not want to enter quoted file names into the hash. + (setq file (file-name-unquote file) + dir (file-name-unquote dir)) + ;; Modify `file-notify-descriptors'. (let ((watch (file-notify--watch-make dir diff --git a/test/lisp/filenotify-tests.el b/test/lisp/filenotify-tests.el index f2feef6132..219fa74611 100644 --- a/test/lisp/filenotify-tests.el +++ b/test/lisp/filenotify-tests.el @@ -57,9 +57,10 @@ 'tramp-default-host-alist `("\\`mock\\'" nil ,(system-name))) ;; Emacs' Makefile sets $HOME to a nonexistent value. Needed in - ;; batch mode only, therefore. + ;; batch mode only, therefore. `temporary-file-directory' might + ;; be quoted, so we unquote it just in case. (unless (and (null noninteractive) (file-directory-p "~/")) - (setenv "HOME" temporary-file-directory)) + (setenv "HOME" (file-name-unquote temporary-file-directory))) (format "/mock::%s" temporary-file-directory))) "Temporary directory for Tramp tests.") diff --git a/test/lisp/files-tests.el b/test/lisp/files-tests.el index 6b394cd5b7..90e5ebf215 100644 --- a/test/lisp/files-tests.el +++ b/test/lisp/files-tests.el @@ -268,7 +268,14 @@ be $HOME." (should (file-name-quoted-p (file-name-quote temporary-file-directory))) (should (equal temporary-file-directory (file-name-unquote - (file-name-quote temporary-file-directory)))))) + (file-name-quote temporary-file-directory)))) + ;; It does not hurt to quote/unquote a file several times. + (should (equal (file-name-quote temporary-file-directory) + (file-name-quote + (file-name-quote temporary-file-directory)))) + (should (equal (file-name-unquote temporary-file-directory) + (file-name-unquote + (file-name-unquote temporary-file-directory)))))) (ert-deftest files-tests--file-name-non-special--subprocess () "Check that Bug#25949 is fixed." commit b86b8ee07237a3c4653a63e436d2127685cadffb Author: Michael Albinus Date: Fri Feb 2 17:06:22 2018 +0100 Minor tweaks in tramp-archive.el * lisp/net/tramp-archive.el (tramp-archive-file-name-handler): Bind `tramp-unknown-id-integer' and `tramp-unknown-id-string' in order to have minimal ownership information. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 241bb29759..e012ac3a19 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -287,6 +287,9 @@ pass to the OPERATION." (tramp-compat-user-error nil "Package `tramp-archive' not supported")) (let ((tramp-methods (cons `(,tramp-archive-method) tramp-methods)) (tramp-gvfs-methods tramp-archive-all-gvfs-methods) + ;; Set uid and gid. gvfsd-archive could do it, but it doesn't. + (tramp-unknown-id-integer (user-uid)) + (tramp-unknown-id-string (user-login-name)) (fn (assoc operation tramp-archive-file-name-handler-alist))) (when (eq (cdr fn) 'tramp-archive-handle-not-implemented) (setq args (cons operation args))) @@ -583,9 +586,11 @@ offered." ;;; TODO: -;; * See, whether we could retrieve better file attributes like uid, -;; gid, permissions. +;; * Check, whether we could retrieve better file attributes like uid, +;; gid, permissions. See gvfsbackendarchive.c +;; (archive_file_set_info_from_entry), where it is commented out. ;; ;; * Implement write access, when possible. +;; https://bugzilla.gnome.org/show_bug.cgi?id=589617 ;;; tramp-archive.el ends here commit a893a4db20e9a6cf6a03855d40d9b9dfd9c49139 Merge: 8dd2edc70f 6f495abd0d Author: Glenn Morris Date: Fri Feb 2 07:50:22 2018 -0800 Merge from origin/emacs-26 6f495ab (origin/emacs-26) Another round of manual fixups 59344c4 * doc/lispref/customize.texi (Custom Themes): Clarify .el pre... 6386efc * doc/emacs/entering.texi (Entering Emacs): Another wording fix. e21f018 * doc/lispref/functions.texi (Inline Functions): Fix typo (Bu... 1c2fb04 * lisp/imenu.el (imenu-generic-expression): Rephrase doc (Bug... b90e91c Fix last change of @key markup f180075 * doc/emacs/entering.texi (Entering Emacs): Fix markup. commit 8dd2edc70fe77e86d0b4a9928e7f5bcd2543947a Merge: c4f8b5545e 01932c8dec Author: Glenn Morris Date: Fri Feb 2 07:50:22 2018 -0800 ; Merge from origin/emacs-26 The following commits were skipped: 01932c8 Revert a1bbc49015 (Bug#30243), do not merge 855ae57 ; Auto-commit of loaddefs files. commit c4f8b5545efb94cdab21d92b83b388b059235d5c Merge: 6ff8b7749f 56c37bbdb6 Author: Glenn Morris Date: Fri Feb 2 07:50:22 2018 -0800 Merge from origin/emacs-26 56c37bb Use @key{} where it is missing in the manuals 25c0198 Another round of manual fixes from proofreading commit 6f495abd0d65075714f92b0eb7f637d6f540edfa Author: Eli Zaretskii Date: Fri Feb 2 17:41:38 2018 +0200 Another round of manual fixups * doc/emacs/killing.texi (Killing by Lines): Clarify wording. Reported by David Bonnafous in emacs-manual-bugs@gnu.org. * doc/emacs/windows.texi (Other Window): Improve wording. Reported by Rasmus Sjostrom in emacs-manual-bugs@gnu.org. * doc/emacs/display.texi (Display Custom): Mention that line numbers are not displayed in the minibuffer and tooltips. * doc/emacs/mini.texi (Basic Minibuffer): Improve wording. * doc/emacs/regs.texi (Registers): More comma removal. Suggested by "root@vxid.pw root@vxid.pw" in emacs-manual-bugs@gnu.org. * doc/emacs/display.texi (Auto Scrolling): Fix a typo. Reported by Kevin Foley in emacs-manual-bugs@gnu.org. * doc/emacs/display.texi (Scrolling): Fix grammar. (Horizontal Scrolling): Mention reasonable limits for hscroll-step float values. Suggested by Jerome Truong in emacs-manual-bugs@gnu.org. * doc/emacs/mini.texi (Minibuffer Edit): Add a missing comma. * doc/emacs/basic.texi (Position Info, Arguments, Repeating): Remove redundant commas. Suggested by oldgaro in emacs-manual-bugs@gnu.org. * doc/emacs/kmacro.texi (Save Keyboard Macro): Clarify wording. Suggested by clemens.radermacher@posteo.de in emacs-manual-bugs@gnu.org. * doc/emacs/building.texi (Compilation Mode): Improve and simplify wording. Suggested by drone in emacs-manual-bugs@gnu.org. * doc/emacs/dired.texi (Dired Enter): Clarify wording. (Dired Deletion): Fix a typo. (Marks vs Flags): Mention that M-DEL in Dired asks for the mark character. Fix typos. * doc/emacs/basic.texi (Moving Point, Erasing, Basic Undo) (Arguments): Some additional information about keys. Reported by Francis Wright in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index 55e0145d7d..11be78de68 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -286,11 +286,14 @@ arguments. @findex beginning-of-buffer Move to the top of the buffer (@code{beginning-of-buffer}). With numeric argument @var{n}, move to @var{n}/10 of the way from the top. +On graphical displays, @kbd{C-@key{HOME}} does the same. @item M-> @kindex M-> +@kindex C-@key{END} @findex end-of-buffer -Move to the end of the buffer (@code{end-of-buffer}). +Move to the end of the buffer (@code{end-of-buffer}). On graphical +displays, @kbd{C-@key{END}} does the same. @item C-v @itemx @key{PageDown} @@ -401,9 +404,12 @@ Delete the character after point (@code{delete-char}). @item C-k Kill to the end of the line (@code{kill-line}). + @item M-d Kill forward to the end of the next word (@code{kill-word}). + @item M-@key{DEL} +@itemx M-@key{BACKSPACE} Kill back to the beginning of the previous word (@code{backward-kill-word}). @end table @@ -448,12 +454,11 @@ commands. @table @kbd @item C-/ -Undo one entry of the undo records---usually, one command worth -(@code{undo}). - -@item C-x u +@itemx C-x u @itemx C-_ -The same. +Undo one entry of the undo records---usually, one command worth +(@code{undo}). (The first key might be unavailable on text-mode +displays.) @end table Emacs records a list of changes made in the buffer text, so you can @@ -655,7 +660,7 @@ Toggle automatic display of the size of the buffer. @cindex cursor location @cindex point location @kbd{M-x what-line} displays the current line number in the echo -area. This command is usually redundant, because the current line +area. This command is usually redundant because the current line number is shown in the mode line (@pxref{Mode Line}). However, if you narrow the buffer, the mode line shows the line number relative to the accessible portion (@pxref{Narrowing}). By contrast, @@ -800,7 +805,7 @@ fills text; with an argument, it justifies the text as well. commands, it is enough to specify the argument with a single @kbd{C-u}. - Some commands use the value of the argument as a repeat count, but + Some commands use the value of the argument as a repeat count but do something special when there is no argument. For example, the command @kbd{C-k} (@code{kill-line}) with argument @var{n} kills @var{n} lines, including their terminating newlines. But @kbd{C-k} @@ -822,6 +827,9 @@ such arguments before the command, and to distinguish them from minibuffer arguments (@pxref{Minibuffer}), which are entered after invoking the command. + On graphical displays, @kbd{C-0}, @kbd{C-1}, etc.@ act the same as +@kbd{M-0}, @kbd{M-1}, etc. + @node Repeating @section Repeating a Command @cindex repeating a command @@ -842,7 +850,7 @@ that were used before; it does not read new arguments each time. To repeat the command more than once, type additional @kbd{z}'s: each @kbd{z} repeats the command one more time. Repetition ends when you -type a character other than @kbd{z}, or press a mouse button. +type a character other than @kbd{z} or press a mouse button. For example, suppose you type @kbd{C-u 2 0 C-d} to delete 20 characters. You can repeat that command (including its argument) three diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index f1fc24da6f..3b645d5e65 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -209,14 +209,13 @@ through errors in the opposite direction. act on the errors or matches listed in @file{*compilation*} and @file{*grep*} buffers; they also know how to iterate through error or match lists produced by other commands, such as @kbd{M-x occur} -(@pxref{Other Repeating Search}). If you are already in a buffer -containing error messages or matches, those are the ones that are -iterated through; otherwise, Emacs looks for a buffer containing error -messages or matches amongst the windows of the selected frame, then -for one that @code{next-error} or @code{previous-error} previously -iterated through, and finally amongst all other buffers. If the -buffer chosen for iterating through is not currently displayed in a -window, it will be displayed. +(@pxref{Other Repeating Search}). If the current buffer contains +error messages or matches, these commands will iterate through them; +otherwise, Emacs looks for a buffer containing error messages or +matches amongst the windows of the selected frame, then for any buffer +that @code{next-error} or @code{previous-error} previously visited, +and finally all other buffers. Any buffer these commands iterate +through that is not currently displayed in a window will be displayed. @vindex compilation-skip-threshold By default, the @code{next-error} and @code{previous-error} commands diff --git a/doc/emacs/dired.texi b/doc/emacs/dired.texi index e3241452c8..805f580086 100644 --- a/doc/emacs/dired.texi +++ b/doc/emacs/dired.texi @@ -76,7 +76,7 @@ C-x d ~/foo/*/*.el @key{RET} The former lists all the files with extension @samp{.el} in directory @samp{foo}. The latter lists the files with extension @samp{.el} -in subdirectories 2 levels of depth below @samp{foo}. +in all the subdirectories of @samp{foo}. The usual history and completion commands can be used in the minibuffer; in particular, @kbd{M-n} puts the name of the visited file (if any) in @@ -241,7 +241,7 @@ Even if you have set @code{dired-recursive-deletes} to @code{nil}, you might want sometimes to delete recursively directories without being asked for confirmation for all of them. This is handy when you have marked many directories for deletion and you are very -sure that all of them can safely being deleted. For every nonempty +sure that all of them can safely be deleted. For every nonempty directory you are asked for confirmation; if you answer @code{all}, then all the remaining directories will be deleted without more questions. @@ -488,10 +488,11 @@ Remove all marks from all the files in this Dired buffer @kindex M-DEL @r{(Dired)} @findex dired-unmark-all-files Remove all marks that use the character @var{markchar} -(@code{dired-unmark-all-files}). The argument is a single -character---do not use @key{RET} to terminate it. See the description -of the @kbd{* c} command below, which lets you replace one mark -character with another. +(@code{dired-unmark-all-files}). If invoked with @kbd{M-@key{DEL}}, +the command prompts for @var{markchar}. That @var{markchar} is a +single character---do not use @key{RET} to terminate it. See the +description of the @kbd{* c} command below, which lets you replace one +mark character with another. With a numeric argument, this command queries about each marked file, asking whether to remove its mark. You can answer @kbd{y} meaning yes, @@ -503,7 +504,7 @@ files without asking about them. @findex dired-next-marked-file @kindex * C-n @r{(Dired)} @kindex M-@} @r{(Dired)} -Move down to the next marked file (@code{dired-next-marked-file}) +Move down to the next marked file (@code{dired-next-marked-file}). A file is ``marked'' if it has any kind of mark. @item * C-p @@ -511,7 +512,7 @@ A file is ``marked'' if it has any kind of mark. @findex dired-prev-marked-file @kindex * C-p @r{(Dired)} @kindex M-@{ @r{(Dired)} -Move up to the previous marked file (@code{dired-prev-marked-file}) +Move up to the previous marked file (@code{dired-prev-marked-file}). @item t @itemx * t @@ -574,9 +575,9 @@ the regular expression @var{regexp} name. Note that if a file is visited in an Emacs buffer, and @code{dired-always-read-filesystem} is @code{nil} (the default), this command will look in the buffer without revisiting the file, so the results -might be inconsistent with the file on disk if its contents has changed -since it was last visited. If you don't want this, you may wish -reverting the files you have visited in your buffers, or turning on +might be inconsistent with the file on disk if its contents have changed +since it was last visited. If you don't want this, you may wish to +revert the files you have visited in your buffers, or to turn on the @code{auto-revert} mode in those buffers, before invoking this command. @xref{Reverting}. If you prefer that this command always revisit the file, without having to revert the file or enable @code{auto-revert} diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index b2a4011b4a..e22d7f30af 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -108,9 +108,9 @@ point unchanged, so that the text and point move up or down together. By default, these commands signal an error (by beeping or flashing the screen) if no more scrolling is possible, because the window has reached the beginning or end of the buffer. If you change the -variable @code{scroll-error-top-bottom} to @code{t}, the command moves -point to the farthest possible position. If point is already there, -the command signals an error. +variable @code{scroll-error-top-bottom} to @code{t}, these commands +move point to the farthest possible position. If point is already +there, the commands signal an error. @vindex scroll-preserve-screen-position @cindex @code{scroll-command} property @@ -270,7 +270,7 @@ parts of the window height from the bottom window edge. Thus, larger view. The default value, @code{nil}, is equivalent to 0.5. Likewise, @code{scroll-down-aggressively} is used when point goes -above the bottom window edge (i.e., scrolling backward). The value +above the top window edge (i.e., scrolling backward). The value specifies how far point should be from the top margin of the window after scrolling. Thus, as with @code{scroll-up-aggressively}, a larger value is more aggressive. @@ -330,8 +330,8 @@ scrolling away from that edge. scroll the window when point gets too close to the edge. Zero, the default value, means to center point horizontally within the window. A positive integer value specifies the number of columns to scroll by. -A floating-point number specifies the fraction of the window's width -to scroll by. +A floating-point number (whose value should be between 0 and 1) +specifies the fraction of the window's width to scroll by. You can also perform explicit horizontal scrolling with the following commands: @@ -1768,6 +1768,11 @@ variant, @code{global-display-line-numbers-mode}. The user option @code{display-line-numbers-type} controls which sub-mode of line-number display, described above, will these modes activate. +@noindent +Note that line numbers are not displayed in the minibuffer and in the +tooltips, even if you turn on @code{display-line-numbers-mode} +globally. + @vindex display-line-numbers-current-absolute When Emacs displays relative line numbers, you can control the number displayed before the current line, the line showing point. By diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 6efcc9d35d..3416db53f4 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -170,7 +170,7 @@ up to the end of the line; if point was originally at the beginning of the line, this leaves the line blank. Spaces and tabs at the end of the line are ignored when deciding -which case applies. As long as point is after the last visible +which case applies. As long as point is after the last non-whitespace character in the line, you can be sure that @kbd{C-k} will kill the newline. To kill an entire non-blank line, go to the beginning and type @kbd{C-k} twice. diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index c9cef750fb..8528c9f6bd 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -454,7 +454,7 @@ M-x insert-kbd-macro @key{RET} @var{macroname} @key{RET} @noindent This inserts some Lisp code that, when executed later, will define the -same macro with the same definition it has now. (You need not +same macro with the same definition it has now. (You don't need to understand Lisp code to do this, because @code{insert-kbd-macro} writes the Lisp code for you.) Then save the file. You can load the file later with @code{load-file} (@pxref{Lisp Libraries}). If the file you diff --git a/doc/emacs/mini.texi b/doc/emacs/mini.texi index 1438682d19..fcd229d817 100644 --- a/doc/emacs/mini.texi +++ b/doc/emacs/mini.texi @@ -57,9 +57,9 @@ the minibuffer (since typing @key{RET} would no longer submit that default). If you ever bring back the original minibuffer text, the prompt again shows the default. Furthermore, if you change the variable @code{minibuffer-eldef-shorten-default} to a non-@code{nil} -value, the default argument is displayed as @samp{[@var{default}]} -instead of @samp{(default @var{default})}, saving some screen space. -To enable this minor mode, type @kbd{M-x +value, the default argument is displayed as @samp{[@var{default-arg}]} +instead of @samp{(default @var{default-arg})}, saving some screen +space. To enable this minor mode, type @kbd{M-x minibuffer-electric-default-mode}. Since the minibuffer appears in the echo area, it can conflict with @@ -224,7 +224,7 @@ set the variable @code{enable-recursive-minibuffers} to @code{t}. When not active, the minibuffer is in @code{minibuffer-inactive-mode}, and clicking @kbd{mouse-1} there shows the @file{*Messages*} buffer. If you use a dedicated frame for minibuffers, Emacs also recognizes -certain keys there, for example @kbd{n} to make a new frame. +certain keys there, for example, @kbd{n} to make a new frame. @node Completion @section Completion diff --git a/doc/emacs/regs.texi b/doc/emacs/regs.texi index 96500690de..dd9e4d7cc7 100644 --- a/doc/emacs/regs.texi +++ b/doc/emacs/regs.texi @@ -9,8 +9,8 @@ Emacs @dfn{registers} are compartments where you can save text, rectangles, positions, and other things for later use. Once you save text or a rectangle in a register, you can copy it into the buffer -once, or many times; once you save a position in a register, you can -jump back to that position once, or many times. +once or many times; once you save a position in a register, you can +jump back to that position once or many times. Each register has a name that consists of a single character, which we will denote by @var{r}; @var{r} can be a letter (such as @samp{a}) diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index 3c3ee659dc..945b7cb941 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -174,9 +174,9 @@ After the rightmost and bottommost window, it goes back to the one at the upper left corner. A numeric argument means to move several steps in the cyclic order of windows. A negative argument moves around the cycle in the opposite order. When the minibuffer is active, the -minibuffer is the last window in the cycle; you can switch from the -minibuffer window to one of the other windows, and later switch back and -finish supplying the minibuffer argument that is requested. +minibuffer window is the last window in the cycle; you can switch from +the minibuffer window to one of the other windows, and later switch +back and finish supplying the minibuffer argument that is requested. @xref{Minibuffer Edit}. @kindex C-M-v commit 6ff8b7749fcc96b79489f73500bcd4722263383c Author: Stefan Monnier Date: Fri Feb 2 10:28:34 2018 -0500 * lisp/emacs-lisp/cconv.el (cconv-convert): Fix compiling compiled code Don't conv-convert the docstring arg of defvar/defconst. diff --git a/lisp/emacs-lisp/cconv.el b/lisp/emacs-lisp/cconv.el index 02fe794467..ca46dbb7b5 100644 --- a/lisp/emacs-lisp/cconv.el +++ b/lisp/emacs-lisp/cconv.el @@ -449,8 +449,11 @@ places where they originally did not directly appear." ;defconst, defvar (`(,(and sym (or `defconst `defvar)) ,definedsymbol . ,forms) `(,sym ,definedsymbol - . ,(mapcar (lambda (form) (cconv-convert form env extend)) - forms))) + . ,(when (consp forms) + (cons (cconv-convert (car forms) env extend) + ;; The rest (i.e. docstring, of any) is not evaluated, + ;; and may be an invalid expression (e.g. ($# . 678)). + (cdr forms))))) ;condition-case ((and `(condition-case ,var ,protected-form . ,handlers) commit 59344c43a92347387126fbf11fe8b4099b9bcebc Author: Basil L. Contovounesios Date: Fri Feb 2 09:22:53 2018 -0500 * doc/lispref/customize.texi (Custom Themes): Clarify .el preference. Copyright-paperwork-exempt: yes https://lists.gnu.org/archive/html/emacs-devel/2018-01/msg00824.html. diff --git a/doc/lispref/customize.texi b/doc/lispref/customize.texi index 6c7ca260ab..7fea507fd0 100644 --- a/doc/lispref/customize.texi +++ b/doc/lispref/customize.texi @@ -1432,7 +1432,9 @@ where the list entries have the same meanings as in would be evaluated when loading the theme, but that is bad form. To protect against loading themes containing malicious code, Emacs displays the source file and asks for confirmation from the user -before loading any non-built-in theme for the first time. +before loading any non-built-in theme for the first time. As +such, themes are not ordinarily byte-compiled, and source files +always take precedence when Emacs is looking for a theme to load. The following functions are useful for programmatically enabling and disabling themes: commit ecc6257f48eb3a87d93ebe91f18b1d871faece5d Author: Michael Albinus Date: Fri Feb 2 14:33:33 2018 +0100 Fix quoting in tramp-find-inline-compress for w32 * lisp/net/tramp-sh.el (tramp-find-inline-compress): Improve command quoting for w32. Reported by Chris Zheng . diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 5ee8f93870..5204ec725a 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -4464,13 +4464,14 @@ Goes through the list `tramp-inline-compress-commands'." (zerop (tramp-call-local-coding-command (format + "echo %s | %s | %s" magic ;; Windows shells need the program file name after ;; the pipe symbol be quoted if they use forward ;; slashes as directory separators. - (if (memq system-type '(windows-nt)) - "echo %s | \"%s\" | \"%s\"" - "echo %s | %s | %s") - magic compress decompress) + (mapconcat + 'shell-quote-argument (split-string compress) " ") + (mapconcat + 'shell-quote-argument (split-string decompress) " ")) nil nil)) (throw 'next nil)) (tramp-message commit 6386efc8f7868e2f66dd5b9a681c555d0db5ecbb Author: Eli Zaretskii Date: Fri Feb 2 11:18:38 2018 +0200 * doc/emacs/entering.texi (Entering Emacs): Another wording fix. diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi index 73b497ceeb..84b3e5d4cb 100644 --- a/doc/emacs/entering.texi +++ b/doc/emacs/entering.texi @@ -18,11 +18,11 @@ @cindex starting Emacs The usual way to invoke Emacs is with the shell command -@command{emacs}. From a terminal window running a Unix shell, you can -run Emacs in the background with @kbd{emacs &}; this way, Emacs won't -tie up the terminal window, so you can use it to run other shell -commands. (For comparable methods of starting Emacs on MS-Windows, -see @ref{Windows Startup}.) +@command{emacs}. From a terminal window running a Unix shell on a GUI +terminal, you can run Emacs in the background with @kbd{emacs &}; this +way, Emacs won't tie up the terminal window, so you can use it to run +other shell commands. (For comparable methods of starting Emacs on +MS-Windows, see @ref{Windows Startup}.) @cindex startup screen When Emacs starts up, the initial frame displays a special buffer commit e21f0189f3fab8264e05c26056324e878f166c1c Author: Noam Postavsky Date: Tue Jan 30 23:02:05 2018 -0500 * doc/lispref/functions.texi (Inline Functions): Fix typo (Bug#30238). diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index 277a42d2c2..b53d1f0bb9 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi @@ -2093,7 +2093,7 @@ to verify that using @code{defun} actually has performance problems. After an inline function is defined, its inline expansion can be performed later on in the same file, just like macros. - It's possible to use @code{defsubst} to define a macro to expand + It's possible to use @code{defmacro} to define a macro to expand into the same code that an inline function would execute (@pxref{Macros}). But the macro would be limited to direct use in expressions---a macro cannot be called with @code{apply}, commit 1c2fb04bee3bb14f4738f864687b03859b0a72ee Author: Noam Postavsky Date: Tue Jan 30 22:58:21 2018 -0500 * lisp/imenu.el (imenu-generic-expression): Rephrase doc (Bug#30294). diff --git a/lisp/imenu.el b/lisp/imenu.el index b766d0e624..f56e7b5039 100644 --- a/lisp/imenu.el +++ b/lisp/imenu.el @@ -224,8 +224,8 @@ If non-nil this pattern is passed to `imenu--generic-function' to create a buffer index. For example, see the value of `fortran-imenu-generic-expression' -used by `fortran-mode' with `imenu-syntax-alist' set locally to -give the characters which normally have \"symbol\" syntax +used by `fortran-mode' with `imenu-syntax-alist' set locally so that +characters which normally have \"symbol\" syntax are considered to have \"word\" syntax during matching.") ;;;###autoload(put 'imenu-generic-expression 'risky-local-variable t) commit b90e91ca54d7fd47047edf4d1b9c49268e31e487 Author: Eli Zaretskii Date: Thu Feb 1 19:56:51 2018 +0200 Fix last change of @key markup * doc/lispref/display.texi (Specified Space): * doc/emacs/programs.texi (C Modes): * doc/emacs/killing.texi (Rectangles): * doc/emacs/emacs.texi (Top): * doc/emacs/display.texi (Useless Whitespace): Don't use @key markup for characters and commands, only for keys. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index d0ab5486af..b2a4011b4a 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1259,9 +1259,9 @@ Highlight empty lines. @item big-indent @vindex whitespace-big-indent-regexp Highlight too-deep indentation. By default any sequence of at least 4 -consecutive @key{TAB} characters or 32 consecutive @key{SPC} -characters is highlighted. To change that, customize the regular -expression @code{whitespace-big-indent-regexp}. +consecutive TAB characters or 32 consecutive SPC characters is +highlighted. To change that, customize the regular expression +@code{whitespace-big-indent-regexp}. @item space-mark Draw space and non-breaking characters with a special glyph. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index b0539221b8..0051868fee 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -723,7 +723,7 @@ C and Related Modes * Motion in C:: Commands to move by C statements, etc. * Electric C:: Colon and other chars can automatically reindent. -* Hungry Delete:: A more powerful @key{DEL} command. +* Hungry Delete:: A more powerful DEL command. * Other C Commands:: Filling comments, viewing expansion of macros, and other neat features. diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 78203936c7..6efcc9d35d 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -857,7 +857,7 @@ region is active. Unlike the standard region, the region-rectangle can have its corners extended past the end of buffer, or inside stretches of white space -that point normally cannot enter, like the @key{TAB}. +that point normally cannot enter, like the TAB. @findex rectangle-exchange-point-and-mark @findex exchange-point-and-mark@r{, in rectangle-mark-mode} diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 970647e127..4289124545 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1587,7 +1587,7 @@ with Emacs. @menu * Motion in C:: Commands to move by C statements, etc. * Electric C:: Colon and other chars can automatically reindent. -* Hungry Delete:: A more powerful @key{DEL} command. +* Hungry Delete:: A more powerful DEL command. * Other C Commands:: Filling comments, viewing expansion of macros, and other neat features. @end menu diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index bd1f671225..fbf943a08c 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -4599,7 +4599,7 @@ first character in the group of consecutive characters that have the same @code{display} property. The space width is the pixel width of that character, multiplied by @var{factor}. (On text-mode terminals, the ``pixel width'' of a character is usually 1, but it could be more -for @key{TAB}s and double-width CJK characters.) +for TABs and double-width CJK characters.) @item :align-to @var{hpos} Specifies that the space should be wide enough to reach @var{hpos}. commit f180075f15c6bee19c23ce758dda228f4594e411 Author: Eli Zaretskii Date: Thu Feb 1 19:49:18 2018 +0200 * doc/emacs/entering.texi (Entering Emacs): Fix markup. diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi index 642c6ec1ab..73b497ceeb 100644 --- a/doc/emacs/entering.texi +++ b/doc/emacs/entering.texi @@ -19,8 +19,8 @@ The usual way to invoke Emacs is with the shell command @command{emacs}. From a terminal window running a Unix shell, you can -run Emacs in the background with @command{emacs &}; this way, Emacs -won't tie up the terminal window, so you can use it to run other shell +run Emacs in the background with @kbd{emacs &}; this way, Emacs won't +tie up the terminal window, so you can use it to run other shell commands. (For comparable methods of starting Emacs on MS-Windows, see @ref{Windows Startup}.) commit 01932c8decb79ab1b7bd5736f41fcfb604ab5141 Author: Michael Albinus Date: Thu Feb 1 15:00:18 2018 +0100 Revert a1bbc49015 (Bug#30243), do not merge * lisp/files.el: * test/lisp/net/tramp-tests.el: Revert a1bbc49015. (Bug#30243) diff --git a/lisp/files.el b/lisp/files.el index 882eaa6967..46d4b0c368 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6978,67 +6978,60 @@ only these files will be asked to be saved." ;; We depend on being the last handler on the list, ;; so that anything else which does need handling ;; has been handled already. -;; So it is safe for us to inhibit *all* magic file name handlers for -;; operations, which return a file name. See Bug#29579. +;; So it is safe for us to inhibit *all* magic file name handlers. (defun file-name-non-special (operation &rest arguments) - (let* ((op-returns-file-name-list - '(expand-file-name file-name-directory file-name-as-directory - directory-file-name file-name-sans-versions - find-backup-file-name file-remote-p)) - (file-name-handler-alist - (and - (not (memq operation op-returns-file-name-list)) - file-name-handler-alist)) - (default-directory - ;; Some operations respect file name handlers in - ;; `default-directory'. Because core function like - ;; `call-process' don't care about file name handlers in - ;; `default-directory', we here have to resolve the - ;; directory into a local one. For `process-file', - ;; `start-file-process', and `shell-command', this fixes - ;; Bug#25949. - (if (memq operation - '(insert-directory process-file start-file-process - shell-command)) - (directory-file-name - (expand-file-name - (unhandled-file-name-directory default-directory))) - default-directory)) - ;; Get a list of the indices of the args which are file names. - (file-arg-indices - (cdr (or (assq operation - ;; The first seven are special because they - ;; return a file name. We want to include the /: - ;; in the return value. - ;; So just avoid stripping it in the first place. - (append - (mapcar 'list op-returns-file-name-list) - '(;; `identity' means just return the first arg - ;; not stripped of its quoting. - (substitute-in-file-name identity) - ;; `add' means add "/:" to the result. - (file-truename add 0) - (insert-file-contents insert-file-contents 0) - ;; `unquote-then-quote' means set buffer-file-name - ;; temporarily to unquoted filename. - (verify-visited-file-modtime unquote-then-quote) - ;; List the arguments which are filenames. - (file-name-completion 1) - (file-name-all-completions 1) - (write-region 2 5) - (rename-file 0 1) - (copy-file 0 1) - (copy-directory 0 1) - (file-in-directory-p 0 1) - (make-symbolic-link 0 1) - (add-name-to-file 0 1)))) - ;; For all other operations, treat the first argument only - ;; as the file name. - '(nil 0)))) - method - ;; Copy ARGUMENTS so we can replace elements in it. - (arguments (copy-sequence arguments))) + (let ((file-name-handler-alist nil) + (default-directory + ;; Some operations respect file name handlers in + ;; `default-directory'. Because core function like + ;; `call-process' don't care about file name handlers in + ;; `default-directory', we here have to resolve the + ;; directory into a local one. For `process-file', + ;; `start-file-process', and `shell-command', this fixes + ;; Bug#25949. + (if (memq operation '(insert-directory process-file start-file-process + shell-command)) + (directory-file-name + (expand-file-name + (unhandled-file-name-directory default-directory))) + default-directory)) + ;; Get a list of the indices of the args which are file names. + (file-arg-indices + (cdr (or (assq operation + ;; The first six are special because they + ;; return a file name. We want to include the /: + ;; in the return value. + ;; So just avoid stripping it in the first place. + '((expand-file-name . nil) + (file-name-directory . nil) + (file-name-as-directory . nil) + (directory-file-name . nil) + (file-name-sans-versions . nil) + (find-backup-file-name . nil) + ;; `identity' means just return the first arg + ;; not stripped of its quoting. + (substitute-in-file-name identity) + ;; `add' means add "/:" to the result. + (file-truename add 0) + (insert-file-contents insert-file-contents 0) + ;; `unquote-then-quote' means set buffer-file-name + ;; temporarily to unquoted filename. + (verify-visited-file-modtime unquote-then-quote) + ;; List the arguments which are filenames. + (file-name-completion 1) + (file-name-all-completions 1) + (write-region 2 5) + (rename-file 0 1) + (copy-file 0 1) + (make-symbolic-link 0 1) + (add-name-to-file 0 1))) + ;; For all other operations, treat the first argument only + ;; as the file name. + '(nil 0)))) + method + ;; Copy ARGUMENTS so we can replace elements in it. + (arguments (copy-sequence arguments))) (if (symbolp (car file-arg-indices)) (setq method (pop file-arg-indices))) ;; Strip off the /: from the file names that have it. diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 49d506bdd9..996a31d375 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -1882,9 +1882,9 @@ This checks also `file-name-as-directory', `file-name-directory', "Check `copy-file'." (skip-unless (tramp--test-enabled)) - ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) - '(nil t) '(nil))) + ;; TODO: The quoted case does not work. Copy local file to remote. + ;;(dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (let (quoted) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) (tmp-name3 (tramp--test-make-temp-name 'local quoted))) @@ -1984,9 +1984,9 @@ This checks also `file-name-as-directory', `file-name-directory', "Check `rename-file'." (skip-unless (tramp--test-enabled)) - ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) - '(nil t) '(nil))) + ;; TODO: The quoted case does not work. + ;;(dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (let (quoted) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) (tmp-name3 (tramp--test-make-temp-name 'local quoted))) @@ -2810,11 +2810,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; Symbolic links could look like a remote file name. ;; They must be quoted then. (delete-file tmp-name2) - (make-symbolic-link - (funcall - (if quoted 'tramp-compat-file-name-unquote 'identity) - "/penguin:motd:") - tmp-name2) + (make-symbolic-link "/penguin:motd:" tmp-name2) (should (file-symlink-p tmp-name2)) (should (string-equal @@ -2829,7 +2825,7 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." ;; We must unquote it. (should (string-equal - (tramp-compat-file-name-unquote (file-truename tmp-name1)) + (file-truename tmp-name1) (tramp-compat-file-name-unquote (file-truename tmp-name3))))) ;; Cleanup. @@ -2955,9 +2951,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (skip-unless (tramp--test-enabled)) (skip-unless (file-acl tramp-test-temporary-file-directory)) - ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) - '(nil t) '(nil))) + ;; TODO: The quoted case does not work. Copy local file to remote. + ;;(dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (let (quoted) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) (tmp-name3 (tramp--test-make-temp-name 'local quoted))) @@ -3033,9 +3029,9 @@ This tests also `make-symbolic-link', `file-truename' and `add-name-to-file'." (not (equal (file-selinux-context tramp-test-temporary-file-directory) '(nil nil nil nil)))) - ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) - '(nil t) '(nil))) + ;; TODO: The quoted case does not work. Copy local file to remote. + ;;(dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (let (quoted) (let ((tmp-name1 (tramp--test-make-temp-name nil quoted)) (tmp-name2 (tramp--test-make-temp-name nil quoted)) (tmp-name3 (tramp--test-make-temp-name 'local quoted))) @@ -4086,9 +4082,9 @@ This requires restrictions of file name syntax." (defun tramp--test-check-files (&rest files) "Run a simple but comprehensive test over every file in FILES." - ;; `filename-non-special' has been fixed in Emacs 26.1, see Bug#29579. - (dolist (quoted (if (and tramp--test-expensive-test (tramp--test-emacs26-p)) - '(nil t) '(nil))) + ;; TODO: The quoted case does not work. + ;;(dolist (quoted (if tramp--test-expensive-test '(nil t) '(nil))) + (let (quoted) ;; We must use `file-truename' for the temporary directory, ;; because it could be located on a symlinked directory. This ;; would let the test fail. commit 855ae578ab8999df56e54531815d6a15c67d85aa Author: Glenn Morris Date: Thu Feb 1 06:27:00 2018 -0500 ; Auto-commit of loaddefs files. diff --git a/lisp/ldefs-boot.el b/lisp/ldefs-boot.el index 843f4c3cc2..4ad8763e84 100644 --- a/lisp/ldefs-boot.el +++ b/lisp/ldefs-boot.el @@ -8767,7 +8767,7 @@ With prefix arg NOCONFIRM, execute current line as-is without editing. ;;; Generated autoloads from ecomplete.el (autoload 'ecomplete-setup "ecomplete" "\ - +Read the .ecompleterc file. \(fn)" nil nil) @@ -13657,7 +13657,7 @@ and choose the directory as the fortune-file. Minimum set of parameters to filter for live (on-session) framesets. DO NOT MODIFY. See `frameset-filter-alist' for a full description.") -(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (client . :never) (delete-before . :never) (font . frameset-filter-font-param) (foreground-color . frameset-filter-sanitize-color) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-frame . :never) (parent-id . :never) (mouse-wheel-frame . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\ +(defvar frameset-persistent-filter-alist (nconc '((background-color . frameset-filter-sanitize-color) (buffer-list . :never) (buffer-predicate . :never) (buried-buffer-list . :never) (client . :never) (delete-before . :never) (font . frameset-filter-font-param) (foreground-color . frameset-filter-sanitize-color) (frameset--text-pixel-height . :save) (frameset--text-pixel-width . :save) (fullscreen . frameset-filter-shelve-param) (GUI:font . frameset-filter-unshelve-param) (GUI:fullscreen . frameset-filter-unshelve-param) (GUI:height . frameset-filter-unshelve-param) (GUI:width . frameset-filter-unshelve-param) (height . frameset-filter-shelve-param) (outer-window-id . :never) (parent-frame . :never) (parent-id . :never) (mouse-wheel-frame . :never) (tty . frameset-filter-tty-to-GUI) (tty-type . frameset-filter-tty-to-GUI) (width . frameset-filter-shelve-param) (window-id . :never) (window-system . :never)) frameset-session-filter-alist) "\ Parameters to filter for persistent framesets. DO NOT MODIFY. See `frameset-filter-alist' for a full description.") @@ -24440,7 +24440,7 @@ Inserted by installing Org mode or when a release is made. \(fn)" nil nil) (autoload 'org-git-version "org-version" "\ -The Git version of org-mode. +The Git version of Org mode. Inserted by installing Org or when a release is made. \(fn)" nil nil) @@ -28638,7 +28638,11 @@ CHAR matches 0 through 9, a through f and A through F. `blank' - matches space and tab only. + matches horizontal whitespace, as defined by Annex C of the + Unicode Technical Standard #18. In particular, it matches + spaces, tabs, and other characters whose Unicode + `general-category' property indicates they are spacing + separators. `graphic', `graph' matches graphic characters--everything except whitespace, ASCII @@ -33032,6 +33036,8 @@ commands to use in that buffer. (autoload 'ansi-term "term" "\ Start a terminal-emulator in a new buffer. +This is almost the same as `term' apart from always creating a new buffer, +and `C-x' being marked as a `term-escape-char'. \(fn PROGRAM &optional NEW-BUFFER-NAME)" t nil) commit 56c37bbdb60f201791b57a3af2f47b7517de810c Author: Michael Albinus Date: Wed Jan 31 19:59:12 2018 +0100 Use @key{} where it is missing in the manuals diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index b2a4011b4a..d0ab5486af 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -1259,9 +1259,9 @@ Highlight empty lines. @item big-indent @vindex whitespace-big-indent-regexp Highlight too-deep indentation. By default any sequence of at least 4 -consecutive TAB characters or 32 consecutive SPC characters is -highlighted. To change that, customize the regular expression -@code{whitespace-big-indent-regexp}. +consecutive @key{TAB} characters or 32 consecutive @key{SPC} +characters is highlighted. To change that, customize the regular +expression @code{whitespace-big-indent-regexp}. @item space-mark Draw space and non-breaking characters with a special glyph. diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 0051868fee..b0539221b8 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -723,7 +723,7 @@ C and Related Modes * Motion in C:: Commands to move by C statements, etc. * Electric C:: Colon and other chars can automatically reindent. -* Hungry Delete:: A more powerful DEL command. +* Hungry Delete:: A more powerful @key{DEL} command. * Other C Commands:: Filling comments, viewing expansion of macros, and other neat features. diff --git a/doc/emacs/killing.texi b/doc/emacs/killing.texi index 6efcc9d35d..78203936c7 100644 --- a/doc/emacs/killing.texi +++ b/doc/emacs/killing.texi @@ -857,7 +857,7 @@ region is active. Unlike the standard region, the region-rectangle can have its corners extended past the end of buffer, or inside stretches of white space -that point normally cannot enter, like the TAB. +that point normally cannot enter, like the @key{TAB}. @findex rectangle-exchange-point-and-mark @findex exchange-point-and-mark@r{, in rectangle-mark-mode} diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 158b04c9f2..8acbb5317e 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -1899,7 +1899,7 @@ Move to the previous reference and display it in the other window @findex xref-show-location-at-point Display the reference on the current line in the other window (@code{xref-show-location-at-point}). -@item TAB +@item @key{TAB} @findex xref-quit-and-goto-xref Display the reference on the current line and bury the @file{*xref*} buffer (@code{xref-quit-and-goto-xref}). diff --git a/doc/emacs/programs.texi b/doc/emacs/programs.texi index 4289124545..970647e127 100644 --- a/doc/emacs/programs.texi +++ b/doc/emacs/programs.texi @@ -1587,7 +1587,7 @@ with Emacs. @menu * Motion in C:: Commands to move by C statements, etc. * Electric C:: Colon and other chars can automatically reindent. -* Hungry Delete:: A more powerful DEL command. +* Hungry Delete:: A more powerful @key{DEL} command. * Other C Commands:: Filling comments, viewing expansion of macros, and other neat features. @end menu diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index c7216128cd..c0adab497b 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -1675,8 +1675,8 @@ line. In particular, @kbd{C-g} simply exits the @code{query-replace}. To restart a @code{query-replace} once it is exited, use @kbd{C-x @key{ESC} @key{ESC}}, which repeats the @code{query-replace} because it -used the minibuffer to read its arguments. @xref{Repetition, C-x ESC -ESC}. +used the minibuffer to read its arguments. @xref{Repetition, C-x @key{ESC} +@key{ESC}}. @cindex invisible text, and query-replace The option @code{search-invisible} determines how @code{query-replace} diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index 6700b8fac3..0753d6fb67 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -748,7 +748,7 @@ part of the prompt. @group (execute-extended-command 3) ---------- Buffer: Minibuffer ---------- -3 M-x forward-word RET +3 M-x forward-word @key{RET} ---------- Buffer: Minibuffer ---------- @result{} t @end group diff --git a/doc/lispref/debugging.texi b/doc/lispref/debugging.texi index 2c757dd39d..2b5f64827c 100644 --- a/doc/lispref/debugging.texi +++ b/doc/lispref/debugging.texi @@ -941,10 +941,10 @@ The profiler report buffer shows, on each line, a function that was called, followed by how much resource (processor or memory) it used in absolute and percentage times since profiling started. If a given line has a @samp{+} symbol at the left-hand side, you can expand that -line by typing @key{RET}, in order to see the function(s) called by -the higher-level function. Use a prefix argument (@key{C-u RET}) to -see the whole call tree below a function. Pressing @key{RET} again -will collapse back to the original state. +line by typing @kbd{@key{RET}}, in order to see the function(s) called +by the higher-level function. Use a prefix argument (@kbd{C-u +@key{RET}}) to see the whole call tree below a function. Pressing +@kbd{@key{RET}} again will collapse back to the original state. Press @kbd{j} or @kbd{mouse-2} to jump to the definition of a function. Press @kbd{d} to view a function's documentation. diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index fbf943a08c..bd1f671225 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -4599,7 +4599,7 @@ first character in the group of consecutive characters that have the same @code{display} property. The space width is the pixel width of that character, multiplied by @var{factor}. (On text-mode terminals, the ``pixel width'' of a character is usually 1, but it could be more -for TABs and double-width CJK characters.) +for @key{TAB}s and double-width CJK characters.) @item :align-to @var{hpos} Specifies that the space should be wide enough to reach @var{hpos}. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index efa14e5e2a..f1a00e72f3 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -3545,10 +3545,11 @@ provided grammar is precise enough, @code{transpose-sexps} can correctly transpose the two arguments of a @code{+} operator, taking into account the precedence rules of the language. -Calling @code{smie-setup} is also sufficient to make TAB indentation work in -the expected way, extends @code{blink-matching-paren} to apply to -elements like @code{begin...end}, and provides some commands that you -can bind in the major mode keymap. +Calling @code{smie-setup} is also sufficient to make @key{TAB} +indentation work in the expected way, extends +@code{blink-matching-paren} to apply to elements like +@code{begin...end}, and provides some commands that you can bind in +the major mode keymap. @deffn Command smie-close-block This command closes the most recently opened (and not yet closed) block. diff --git a/doc/lispref/nonascii.texi b/doc/lispref/nonascii.texi index 2fd2bbc1ce..8bc7e20989 100644 --- a/doc/lispref/nonascii.texi +++ b/doc/lispref/nonascii.texi @@ -1776,7 +1776,7 @@ affect it. Binding @code{coding-system-for-write} to a non-@code{nil} value prevents output primitives from calling the function specified by @code{select-safe-coding-system-function} (@pxref{User-Chosen Coding -Systems}). This is because @kbd{C-x RET c} +Systems}). This is because @kbd{C-x @key{RET} c} (@code{universal-coding-system-argument}) works by binding @code{coding-system-for-write}, and Emacs should obey user selection. If a Lisp program binds @code{coding-system-for-write} to a value that diff --git a/doc/lispref/tips.texi b/doc/lispref/tips.texi index 0f883fe4b4..0695d9b7b1 100644 --- a/doc/lispref/tips.texi +++ b/doc/lispref/tips.texi @@ -17,14 +17,15 @@ should follow. @findex checkdoc @findex checkdoc-current-buffer @findex checkdoc-file - You can automatically check some of the conventions described below by -running the command @kbd{M-x checkdoc RET} when visiting a Lisp file. -It cannot check all of the conventions, and not all the warnings it -gives necessarily correspond to problems, but it is worth examining them -all. Alternatively, use the command @kbd{M-x checkdoc-current-buffer RET} -to check the conventions in the current buffer, or @code{checkdoc-file} -when you want to check a file in batch mode, e.g., with a command run by -@kbd{@w{M-x compile RET}}. + You can automatically check some of the conventions described below +by running the command @kbd{M-x checkdoc @key{RET}} when visiting a +Lisp file. It cannot check all of the conventions, and not all the +warnings it gives necessarily correspond to problems, but it is worth +examining them all. Alternatively, use the command @kbd{M-x +checkdoc-current-buffer @key{RET}} to check the conventions in the +current buffer, or @code{checkdoc-file} when you want to check a file +in batch mode, e.g., with a command run by @kbd{@w{M-x compile +@key{RET}}}. @menu * Coding Conventions:: Conventions for clean and robust programs. @@ -1028,7 +1029,7 @@ but only the main one. @findex checkdoc-package-keywords This line lists keywords for the @code{finder-by-keyword} help command. Please use that command to see a list of the meaningful keywords. The -command @kbd{M-x checkdoc-package-keywords RET} will find and display +command @kbd{M-x checkdoc-package-keywords @key{RET}} will find and display any keywords that are not in @code{finder-known-keywords}. If you set the variable @code{checkdoc-package-keywords-flag} non-@code{nil}, checkdoc commands will include the keyword verification in its checks. commit 25c01983afa55c83b8443d51267b7957e5d2c739 Author: Eli Zaretskii Date: Wed Jan 31 18:23:17 2018 +0200 Another round of manual fixes from proofreading * doc/emacs/search.texi (Incremental Search) (Nonincremental Search): Mention the menu bar and fix typos. Reported by David Bonnafous in emacs-manual-bugs@gnu.org. * doc/emacs/building.texi (Compilation): Improve wording. Suggested by drone in emacs-manual-bugs@gnu.org. * doc/emacs/kmacro.texi (Basic Keyboard Macro): Clarify text. Suggested by Robert Pluim in emacs-manual-bugs@gnu.org. * doc/emacs/display.texi (Highlight Interactively, Fringes): Improve wording. Suggested by Justin Heyes-Jones in emacs-manual-bugs@gnu.org. * doc/emacs/commands.texi (User Input, Commands): Add missing commas. * doc/emacs/screen.texi (Menu Bar): Mention keyboard keys to navigate menus. Suggested by oldgaro in emacs-manual-bugs@gnu.org. * doc/emacs/search.texi (Not Exiting Isearch): Fix a typo. Reported by "Kocken, I.J. (Ilja)" in emacs-manual-bugs@gnu.org. * doc/emacs/basic.texi (Inserting Text): Mention one more label of RET. Suggested by Francis Wright in emacs-manual-bugs@gnu.org. * doc/emacs/text.texi (Paragraphs): Clarify text. Reported by Marcin Borkowski in emacs-manual-bugs@gnu.org. * doc/emacs/maintaining.texi (Introduction to VC) (Why Version Control?, VCS Merging): Fix typos and section capitalization. Suggested by "R. P. Dillon" in emacs-manual-bugs@gnu.org. * doc/emacs/modes.texi (Major Modes, Choosing Modes): Fix typos. Reported by clemens.radermacher@posteo.de in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/basic.texi b/doc/emacs/basic.texi index edb3d08f68..55e0145d7d 100644 --- a/doc/emacs/basic.texi +++ b/doc/emacs/basic.texi @@ -45,16 +45,16 @@ forward, so that point remains just after the inserted text. @cindex newline @c @findex electric-indent-just-newline To end a line and start a new one, type @key{RET} (@code{newline}). -(The @key{RET} key may be labeled @key{Return} or @key{Enter} on your -keyboard, but we refer to it as @key{RET} in this manual.) This -command inserts a newline character into the buffer, then indents -(@pxref{Indentation}) according to the major mode. If point is at the end -of the line, the effect is to create a new blank line after it and -indent the new line; if point is in the middle of a line, the line is -split at that position. To turn off the auto-indentation, you can -either disable Electric Indent mode (@pxref{Indent Convenience}) or -type @kbd{C-j}, which inserts just a newline, without any -auto-indentation. +(The @key{RET} key may be labeled @key{Return}, or @key{Enter}, or +with a funny-looking left-pointing arrow on your keyboard, but we +refer to it as @key{RET} in this manual.) This command inserts a +newline character into the buffer, then indents (@pxref{Indentation}) +according to the major mode. If point is at the end of the line, the +effect is to create a new blank line after it and indent the new line; +if point is in the middle of a line, the line is split at that +position. To turn off the auto-indentation, you can either disable +Electric Indent mode (@pxref{Indent Convenience}) or type @kbd{C-j}, +which inserts just a newline, without any auto-indentation. As we explain later in this manual, you can change the way Emacs handles text insertion by turning on @dfn{minor modes}. For instance, diff --git a/doc/emacs/building.texi b/doc/emacs/building.texi index 65669ada50..f1fc24da6f 100644 --- a/doc/emacs/building.texi +++ b/doc/emacs/building.texi @@ -58,8 +58,8 @@ compile}. This reads a shell command line using the minibuffer, and then executes the command by running a shell as a subprocess (or @dfn{inferior process}) of Emacs. The output is inserted in a buffer named @file{*compilation*}. The current buffer's default directory is -used as the working directory for the execution of the command; -normally, therefore, compilation takes place in this directory. +used as the working directory for the execution of the command, so by +default compilation takes place in that directory. @vindex compile-command The default compilation command is @samp{make -k}, which is usually diff --git a/doc/emacs/commands.texi b/doc/emacs/commands.texi index 05f4e4be60..2e65bfd385 100644 --- a/doc/emacs/commands.texi +++ b/doc/emacs/commands.texi @@ -48,7 +48,7 @@ are certain characters found on non-English keyboards labeled @key{Alt})@footnote{We refer to @key{Alt} as @key{META} for historical reasons.}. For example, @kbd{Control-a} is entered by holding down the @key{Ctrl} key while pressing @kbd{a}; we will refer -to this as @kbd{C-a} for short. Similarly @kbd{@key{META}-a}, or @kbd{M-a} +to this as @kbd{C-a} for short. Similarly, @kbd{@key{META}-a}, or @kbd{M-a} for short, is entered by holding down the @key{Alt} key and pressing @kbd{a}. Modifier keys can also be applied to non-alphanumerical characters, e.g., @kbd{C-@key{F1}} or @kbd{M-@key{LEFT}}. @@ -161,8 +161,8 @@ is bound to @code{next-line}. If you rebind @kbd{C-n} to the command In this manual, we will often speak of keys like @kbd{C-n} as commands, even though strictly speaking the key is bound to a command. -Usually we state the name of the command which really does the work in -parentheses after mentioning the key that runs it. For example, we +Usually, we state the name of the command which really does the work +in parentheses after mentioning the key that runs it. For example, we will say that ``The command @kbd{C-n} (@code{next-line}) moves point vertically down'', meaning that the command @code{next-line} moves vertically down, and the key @kbd{C-n} is normally bound to it. diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index d338aeeea6..b2a4011b4a 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -957,7 +957,7 @@ mode for all buffers, use @kbd{M-x global-hi-lock-mode} or place Hi Lock mode works like Font Lock mode (@pxref{Font Lock}), except that you specify explicitly the regular expressions to highlight. You -control them with the commands described below. (The key bindings +can control them with the following commands. (The key bindings below that begin with @kbd{C-x w} are deprecated in favor of the global @kbd{M-s h} bindings, and will be removed in some future Emacs version.) @@ -1087,11 +1087,11 @@ mode's symbol is a member of the list @code{hi-lock-exclude-modes}. On graphical displays, each Emacs window normally has narrow @dfn{fringes} on the left and right edges. The fringes are used to display symbols that provide information about the text in the window. -You can type @kbd{M-x fringe-mode} to disable the fringes, or modify -their width. This command affects fringes in all frames; to modify -fringes on the selected frame only, use @kbd{M-x set-fringe-style}. -You can make your changes to the fringes permanent by customizing the -variable @code{fringe-mode}. +You can type @kbd{M-x fringe-mode} to toggle display of the fringes or +to modify their width. This command affects fringes in all frames; to +modify fringes on the selected frame only, use @kbd{M-x +set-fringe-style}. You can make your changes to the fringes permanent +by customizing the variable @code{fringe-mode}. The most common use of the fringes is to indicate a continuation line (@pxref{Continuation Lines}). When one line of text is split diff --git a/doc/emacs/kmacro.texi b/doc/emacs/kmacro.texi index a3426a33a1..c9cef750fb 100644 --- a/doc/emacs/kmacro.texi +++ b/doc/emacs/kmacro.texi @@ -159,7 +159,8 @@ the most recent macro, type @kbd{C-x e} defining a macro, the macro is terminated and executed immediately. Immediately after typing @kbd{C-x e}, you can type @key{e} repeatedly to immediately repeat the macro one or more times. You can also give -@kbd{C-x e} a repeat argument, just like @key{F4}. +@kbd{C-x e} a repeat argument, just like @key{F4} (when it is used to +execute a macro). @kbd{C-x )} can be given a repeat count as an argument. This means to repeat the macro right after defining it. The macro definition diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index e61c7f9034..158b04c9f2 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -112,7 +112,7 @@ control operations. Some uncommon or intricate version control operations, such as altering repository settings, are not supported in VC@. You should -perform such tasks outside Emacs, e.g., via the command line. +perform such tasks outside VC, e.g., via the command line. This section provides a general overview of version control, and describes the version control systems that VC supports. You can skip @@ -130,7 +130,7 @@ you want to use. @end menu @node Why Version Control? -@subsubsection Understanding the problems it addresses +@subsubsection Understanding the Problems it Addresses Version control systems provide you with three important capabilities: @@ -147,10 +147,10 @@ detected and resolved. @item @dfn{History}: the ability to attach historical data to your data, -such as explanatory comments about the intention behind each change to -it. Even for a programmer working solo, change histories are an -important aid to memory; for a multi-person project, they are a -vitally important form of communication among developers. +such as explanatory comments about the intention behind each change. +Even for a programmer working solo, change histories are an important +aid to memory; for a multi-person project, they are a vitally +important form of communication among developers. @end itemize @node Version Control Systems @@ -272,7 +272,7 @@ or changeset-based; and centralized or decentralized. VC handles all these modes of operation, but it cannot hide the differences. @node VCS Merging -@subsubsection Merge-based vs lock-based Version Control +@subsubsection Merge-based vs Lock-based Version Control A version control system typically has some mechanism to coordinate between users who want to change the same file. There are two ways to diff --git a/doc/emacs/modes.texi b/doc/emacs/modes.texi index f0986702d5..1312a24d98 100644 --- a/doc/emacs/modes.texi +++ b/doc/emacs/modes.texi @@ -97,11 +97,12 @@ do something more suitable for the mode. For instance, programming language modes bind @key{TAB} to indent the current line according to the rules of the language (@pxref{Indentation}). The keys that are commonly changed are @key{TAB}, @key{DEL}, and @kbd{C-j}. Many modes -also define special commands of their own, usually bound in the prefix -key @kbd{C-c}. Major modes can also alter user options and variables; -for instance, programming language modes typically set a buffer-local -value for the variable @code{comment-start}, which determines how -source code comments are delimited (@pxref{Comments}). +also define special commands of their own, usually bound to key +sequences whose prefix key is @kbd{C-c} (@pxref{Keys}). Major modes +can also alter user options and variables; for instance, programming +language modes typically set a buffer-local value for the variable +@code{comment-start}, which determines how source code comments are +delimited (@pxref{Comments}). To view the documentation for the current major mode, including a list of its key bindings, type @kbd{C-h m} (@code{describe-mode}). @@ -437,8 +438,8 @@ a single case-insensitive search through @code{auto-mode-alist}. Finally, if Emacs @emph{still} hasn't found a major mode to use, it compares the text at the start of the buffer to the variable @code{magic-fallback-mode-alist}. This variable works like -@code{magic-mode-alist}, described above, except that is consulted -only after @code{auto-mode-alist}. By default, +@code{magic-mode-alist}, described above, except that it is consulted +only @emph{after} @code{auto-mode-alist}. By default, @code{magic-fallback-mode-alist} contains forms that check for image files, HTML/XML/SGML files, PostScript files, and Unix style Conf files. diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index 8dd5e5f9e5..37c082e7ca 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -309,12 +309,13 @@ way (@pxref{Key Help}). @cindex menu bar access using keyboard Instead of using the mouse, you can also invoke the first menu bar item by pressing @key{F10} (to run the command @code{menu-bar-open}). -You can then navigate the menus with the arrow keys. To activate a -selected menu item, press @key{RET}; to cancel menu navigation, press -@kbd{C-g} or @kbd{@key{ESC} @key{ESC} @key{ESC}}. (However, note that -when Emacs was built with a GUI toolkit, the menus are drawn and -controlled by the toolkit, and the key sequences to cancel menu -navigation might be different from the above description.) +You can then navigate the menus with the arrow keys or with @kbd{C-b}, +@kbd{C-f} (left/right), @kbd{C-p}, and @kbd{C-n} (up/down). To +activate a selected menu item, press @key{RET}; to cancel menu +navigation, press @kbd{C-g} or @kbd{@key{ESC} @key{ESC} @key{ESC}}. +(However, note that when Emacs was built with a GUI toolkit, the menus +are drawn and controlled by the toolkit, and the key sequences to +cancel menu navigation might be different from the above description.) @kindex M-` @findex tmm-menubar diff --git a/doc/emacs/search.texi b/doc/emacs/search.texi index daaded1929..c7216128cd 100644 --- a/doc/emacs/search.texi +++ b/doc/emacs/search.texi @@ -53,6 +53,9 @@ Incremental search forward (@code{isearch-forward}). Incremental search backward (@code{isearch-backward}). @end table +You can also invoke incremental search from the menu bar's +@samp{Edit->Search} menu. + @menu * Basic Isearch:: Basic incremental search commands. * Repeat Isearch:: Searching for the same string again. @@ -425,7 +428,7 @@ of the keymap @code{isearch-mode-map} (@pxref{Keymaps}). @subsection Not Exiting Incremental Search This subsection describes how to control whether typing a command not -specifically meaningful is searches exits the search before executing +specifically meaningful in searches exits the search before executing the command. It also describes two categories of commands which you can type without exiting the current incremental search, even though they are not themselves part of incremental search. @@ -548,7 +551,7 @@ command for nonincremental search, if the string you specify is empty. @key{RET}} does likewise, invoking the nonincremental backward-searching command. - Nonincremental search can also be invoked form the menu bar's + Nonincremental search can also be invoked from the menu bar's @samp{Edit->Search} menu. @findex search-forward diff --git a/doc/emacs/text.texi b/doc/emacs/text.texi index e3541a18df..dd08cd1513 100644 --- a/doc/emacs/text.texi +++ b/doc/emacs/text.texi @@ -274,8 +274,9 @@ Put point and mark around this or next paragraph (@code{mark-paragraph}). @findex backward-paragraph @findex forward-paragraph @kbd{M-@{} (@code{backward-paragraph}) moves to the beginning of the -current or previous paragraph (see below for the definition of a -paragraph). @kbd{M-@}} (@code{forward-paragraph}) moves to the end of +current or previous paragraph, depending on where point is when the +command is invoked (see below for the definition of a paragraph). +@kbd{M-@}} (@code{forward-paragraph}) similarly moves to the end of the current or next paragraph. If there is a blank line before the paragraph, @kbd{M-@{} moves to the blank line.