commit d42bd3a512dadd853d7fb828072a531d7f1d78b6 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Thu Feb 1 08:53:08 2018 +0100 * lisp/files.el (get-free-disk-space): Wrap body with `save-match-data'. Several `*-insert-directory' functions could fail otherwise. diff --git a/lisp/files.el b/lisp/files.el index 91aa95d631..75d3b7b1e7 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -6473,9 +6473,10 @@ The return value is a string describing the amount of free space (normally, the number of free 1KB blocks). If DIR's free space cannot be obtained, this function returns nil." - (let ((avail (nth 2 (file-system-info dir)))) - (if avail - (format "%.0f" (/ avail 1024))))) + (save-match-data + (let ((avail (nth 2 (file-system-info dir)))) + (if avail + (format "%.0f" (/ avail 1024)))))) ;; The following expression replaces `dired-move-to-filename-regexp'. (defvar directory-listing-before-filename-regexp commit f692deb7ddbb5b0af51ad1aef594477f2669a583 Author: Michael Albinus Date: Thu Feb 1 08:40:46 2018 +0100 * lisp/net/tramp-archive.el (tramp-archive-run-real-handler): New defun. (tramp-archive-file-name-handler): Use it. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 8d292e1602..241bb29759 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -258,6 +258,18 @@ Operations not mentioned here will be handled by the default Emacs primitives.") (cl-letf (((symbol-function 'tramp-tramp-file-p) 'tramp-archive-file-name-p)) (apply 'tramp-file-name-for-operation operation args))) +(defun tramp-archive-run-real-handler (operation args) + "Invoke normal file name handler for OPERATION. +First arg specifies the OPERATION, second arg is a list of arguments to +pass to the OPERATION." + (let* ((inhibit-file-name-handlers + `(tramp-archive-file-name-handler + . + ,(and (eq inhibit-file-name-operation operation) + inhibit-file-name-handlers))) + (inhibit-file-name-operation operation)) + (apply operation args))) + ;;;###tramp-autoload (defun tramp-archive-file-name-handler (operation &rest args) "Invoke the GVFS archive related OPERATION. @@ -267,8 +279,9 @@ pass to the OPERATION." operation args)) (archive (tramp-archive-file-name-archive filename))) ;; The file archive could be a directory, see Bug#30293. - (if (file-directory-p archive) - (tramp-run-real-handler operation args) + (if (and archive + (tramp-archive-run-real-handler 'file-directory-p (list archive))) + (tramp-archive-run-real-handler operation args) ;; Now run the handler. (unless tramp-gvfs-enabled (tramp-compat-user-error nil "Package `tramp-archive' not supported")) @@ -279,7 +292,7 @@ pass to the OPERATION." (setq args (cons operation args))) (if fn (save-match-data (apply (cdr fn) args)) - (tramp-run-real-handler operation args)))))) + (tramp-archive-run-real-handler operation args)))))) ;; Mark `operations' the handler is responsible for. (put 'tramp-archive-file-name-handler 'operations commit 1a04d95266af94f578e9d96676e6adc44c602306 Author: Glenn Morris Date: Wed Jan 31 16:15:01 2018 -0500 automerge: adjust meaning of -d option * admin/automerge (nocd): New variable, replacing $dir. (usage, -d): Option -d no longer takes an argument. diff --git a/admin/automerge b/admin/automerge index 6182ad01a5..18f8c759eb 100755 --- a/admin/automerge +++ b/admin/automerge @@ -31,8 +31,8 @@ ## ## Modifying a running shell script can have unpredictable results, ## so the paranoid will first make a copy of this script, and then run -## it with the -d option to point to the repository directory, in case -## a pull updates this script while it is working. +## it with the -d option in the repository directory, in case a pull +## updates this script while it is working. die () # write error to stderr and exit { @@ -48,11 +48,11 @@ PD=${0%/*} usage () { cat 1>&2 < Date: Wed Jan 31 15:05:14 2018 -0500 automerge: add option to work in specific directory * admin/automerge (usage): Mention -d. (dir): New variable. (-d): New option. (main): If requested, cd to specified directory. diff --git a/admin/automerge b/admin/automerge index 218ecb067c..6182ad01a5 100755 --- a/admin/automerge +++ b/admin/automerge @@ -28,6 +28,11 @@ ## Intended usage: ## Have a dedicated git directory just for this. ## Have a cron job that calls this script with -r -p. +## +## Modifying a running shell script can have unpredictable results, +## so the paranoid will first make a copy of this script, and then run +## it with the -d option to point to the repository directory, in case +## a pull updates this script while it is working. die () # write error to stderr and exit { @@ -40,20 +45,14 @@ PD=${0%/*} [ "$PD" = "$0" ] && PD=. # if PATH includes PWD -## This should be the admin directory. -cd $PD -cd ../ -[ -d admin ] || die "Could not locate admin directory" - -[ -e .git ] || die "No .git" - usage () { cat 1>&2 < /dev/null commit aac3ba4d432d57733420a7ab5d680cfb90aa1ccd Author: Glenn Morris Date: Wed Jan 31 12:54:26 2018 -0500 automerge: add option to start with a reset * admin/automerge (usage): Mention -r. (reset): New variable. (-r): New option. (main): If requested, do a reset and pull. diff --git a/admin/automerge b/admin/automerge index 94b41d2cdc..218ecb067c 100755 --- a/admin/automerge +++ b/admin/automerge @@ -27,8 +27,7 @@ ## and then push it. ## Intended usage: ## Have a dedicated git directory just for this. -## Have a cron job that does a hard reset (to clean up after any -## previous failures), then a git pull, then calls this script with -p. +## Have a cron job that calls this script with -r -p. die () # write error to stderr and exit { @@ -51,15 +50,16 @@ cd ../ usage () { cat 1>&2 < /dev/null" EXIT } +[ "$reset" ] && { + echo "Resetting..." + git reset --hard origin/master || die "reset error" + + echo "Pulling..." + git pull --ff-only || die "pull error" +} + + rev=$(git rev-parse HEAD) [ $(git rev-parse @{u}) = $rev ] || die "Local state does not match origin" commit 4dbc1ef5e6cf55426d023be563ff93d74b675218 Merge: 84d066a73f 22922c7c67 Author: Glenn Morris Date: Wed Jan 31 07:50:23 2018 -0800 Merge from origin/emacs-26 22922c7 (origin/emacs-26) * doc/emacs/entering.texi (Entering Emacs):... 59657c4 Document 'window-at-side-p' in the Elisp manual 2b35ed0 Document external-debugging-output in the Elisp Manual (Bug#2... db6564c Fix scroll-margin docstring (Bug#13791) 732d1b9 Clarify that `ansi-term' is almost the same as `term' (Bug#18... f706c59 Update manual description of locate-file (Bug#23650) 1602262 Clarify effect of print-gensym (Bug#27776) 53e9fa2 * lisp/custom.el (defcustom): Fix docstring (Bug#27891). 607cc4e Define cl-type-definition button type as needed (Bug#28899) 9e6889c Emphasize that GPG passphrase caching is temporary (Bug#29907) 4b5711b Fix @examples in cc-mode.info, where lines were getting glued... 71961f1 Minor change in "Mode Line" section of Emacs manual 55a2b76 More fixes in the Emacs manual commit 22922c7c67efdcb42ba4bf35b0ea507cca08f559 Author: Eli Zaretskii Date: Wed Jan 31 16:52:12 2018 +0200 * doc/emacs/entering.texi (Entering Emacs): Fix last change. diff --git a/doc/emacs/entering.texi b/doc/emacs/entering.texi index 2ff258ffb0..642c6ec1ab 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 in the X -Window System, 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 commands. (For comparable methods of starting -Emacs on MS-Windows, see @ref{Windows Startup}.) +@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 +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 84d066a73fc4191a675c87c81ec1a4f531375e95 Author: Michael Albinus Date: Wed Jan 31 15:02:46 2018 +0100 Fix Bug#30293 * lisp/net/tramp-archive.el (tramp-archive-file-name-for-operation): New defsubst. (tramp-archive-file-name-archive, tramp-archive-file-name-localname): New defuns. (tramp-archive-file-name-handler, tramp-archive-dissect-file-name) (tramp-archive-handle-not-implemented): Use them. (Bug#30293) * test/lisp/net/tramp-archive-tests.el (tramp-archive-test-directory): New defconst. (tramp-archive-test01-file-name-syntax): Extend test. (tramp-archive-test05-expand-file-name-non-archive-directory): New test. (Bug#30293) * test/lisp/net/tramp-archive-resources/foo.iso/foo: New file. diff --git a/lisp/net/tramp-archive.el b/lisp/net/tramp-archive.el index 51ee18fac7..8d292e1602 100644 --- a/lisp/net/tramp-archive.el +++ b/lisp/net/tramp-archive.el @@ -253,21 +253,33 @@ It must be supported by libarchive(3).") "Alist of handler functions for GVFS archive method. Operations not mentioned here will be handled by the default Emacs primitives.") +(defsubst tramp-archive-file-name-for-operation (operation &rest args) + "Like `tramp-file-name-for-operation', but for archive file name syntax." + (cl-letf (((symbol-function 'tramp-tramp-file-p) 'tramp-archive-file-name-p)) + (apply 'tramp-file-name-for-operation operation args))) + ;;;###tramp-autoload (defun tramp-archive-file-name-handler (operation &rest args) "Invoke the GVFS archive related OPERATION. First arg specifies the OPERATION, second arg is a list of arguments to pass to the OPERATION." - (unless tramp-gvfs-enabled - (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) - (fn (assoc operation tramp-archive-file-name-handler-alist))) - (when (eq (cdr fn) 'tramp-archive-handle-not-implemented) - (setq args (cons operation args))) - (if fn - (save-match-data (apply (cdr fn) args)) - (tramp-run-real-handler operation args)))) + (let* ((filename (apply 'tramp-archive-file-name-for-operation + operation args)) + (archive (tramp-archive-file-name-archive filename))) + ;; The file archive could be a directory, see Bug#30293. + (if (file-directory-p archive) + (tramp-run-real-handler operation args) + ;; Now run the handler. + (unless tramp-gvfs-enabled + (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) + (fn (assoc operation tramp-archive-file-name-handler-alist))) + (when (eq (cdr fn) 'tramp-archive-handle-not-implemented) + (setq args (cons operation args))) + (if fn + (save-match-data (apply (cdr fn) args)) + (tramp-run-real-handler operation args)))))) ;; Mark `operations' the handler is responsible for. (put 'tramp-archive-file-name-handler 'operations @@ -300,6 +312,16 @@ pass to the OPERATION." (string-match tramp-archive-file-name-regexp name) t)) +(defun tramp-archive-file-name-archive (name) + "Return archive part of NAME." + (and (tramp-archive-file-name-p name) + (match-string 1 name))) + +(defun tramp-archive-file-name-localname (name) + "Return localname part of NAME." + (and (tramp-archive-file-name-p name) + (match-string 2 name))) + (defvar tramp-archive-hash (make-hash-table :test 'equal) "Hash table for archive local copies. The hash key is the archive name. The value is a cons of the @@ -314,9 +336,8 @@ name is kept in slot `hop'" (save-match-data (unless (tramp-archive-file-name-p name) (tramp-compat-user-error nil "Not an archive file name: \"%s\"" name)) - ;; The `string-match' happened in `tramp-archive-file-name-p'. - (let* ((localname (match-string 2 name)) - (archive (file-truename (match-string 1 name))) + (let* ((localname (tramp-archive-file-name-localname name)) + (archive (file-truename (tramp-archive-file-name-archive name))) (vec (make-tramp-file-name :method tramp-archive-method :hop archive))) @@ -535,7 +556,7 @@ offered." "Generic handler for operations not implemented for file archives." (let ((v (ignore-errors (tramp-archive-dissect-file-name - (apply 'tramp-file-name-for-operation operation args))))) + (apply 'tramp-archive-file-name-for-operation operation args))))) (tramp-message v 10 "%s" (cons operation args)) (tramp-error v 'file-error diff --git a/test/lisp/net/tramp-archive-resources/foo.iso/foo b/test/lisp/net/tramp-archive-resources/foo.iso/foo new file mode 100644 index 0000000000..257cc5642c --- /dev/null +++ b/test/lisp/net/tramp-archive-resources/foo.iso/foo @@ -0,0 +1 @@ +foo diff --git a/test/lisp/net/tramp-archive-tests.el b/test/lisp/net/tramp-archive-tests.el index ecfee0c556..96c6a71097 100644 --- a/test/lisp/net/tramp-archive-tests.el +++ b/test/lisp/net/tramp-archive-tests.el @@ -46,6 +46,11 @@ (file-name-as-directory tramp-archive-test-file-archive) "The test archive.") +(defconst tramp-archive-test-directory + (file-truename + (expand-file-name "foo.iso" tramp-archive-test-resource-directory)) + "A directory file name, which looks like an archive.") + (setq password-cache-expiry nil tramp-verbose 0 tramp-cache-read-persistent-data t ;; For auth-sources. @@ -94,14 +99,51 @@ variables, so we check the Emacs version directly." "Check archive file name syntax." (should-not (tramp-archive-file-name-p tramp-archive-test-file-archive)) (should (tramp-archive-file-name-p tramp-archive-test-archive)) + (should + (string-equal + (tramp-archive-file-name-archive tramp-archive-test-archive) + tramp-archive-test-file-archive)) + (should + (string-equal + (tramp-archive-file-name-localname tramp-archive-test-archive) "/")) (should (tramp-archive-file-name-p (concat tramp-archive-test-archive "foo"))) + (should + (string-equal + (tramp-archive-file-name-localname + (concat tramp-archive-test-archive "foo")) + "/foo")) (should (tramp-archive-file-name-p (concat tramp-archive-test-archive "foo/bar"))) + (should + (string-equal + (tramp-archive-file-name-localname + (concat tramp-archive-test-archive "foo/bar")) + "/foo/bar")) ;; A file archive inside a file archive. (should (tramp-archive-file-name-p (concat tramp-archive-test-archive "baz.tar"))) (should - (tramp-archive-file-name-p (concat tramp-archive-test-archive "baz.tar/")))) + (string-equal + (tramp-archive-file-name-archive + (concat tramp-archive-test-archive "baz.tar")) + tramp-archive-test-file-archive)) + (should + (string-equal + (tramp-archive-file-name-localname + (concat tramp-archive-test-archive "baz.tar")) + "/baz.tar")) + (should + (tramp-archive-file-name-p (concat tramp-archive-test-archive "baz.tar/"))) + (should + (string-equal + (tramp-archive-file-name-archive + (concat tramp-archive-test-archive "baz.tar/")) + (concat tramp-archive-test-archive "baz.tar"))) + (should + (string-equal + (tramp-archive-file-name-localname + (concat tramp-archive-test-archive "baz.tar/")) + "/"))) (ert-deftest tramp-archive-test02-file-name-dissect () "Check archive file name components." @@ -205,6 +247,21 @@ variables, so we check the Emacs version directly." (should (string-equal (expand-file-name "/foo.tar/./file") "/foo.tar/file")) (should (string-equal (expand-file-name "/foo.tar/../file") "/file"))) +;; This test is inspired by Bug#30293. +(ert-deftest tramp-archive-test05-expand-file-name-non-archive-directory () + "Check existing directories with archive file name syntax. +They shall still be supported" + (should (file-directory-p tramp-archive-test-directory)) + ;; `tramp-archive-file-name-p' tests only for file name syntax. It + ;; doesn't test, whether it is really a file archive. + (should + (tramp-archive-file-name-p + (file-name-as-directory tramp-archive-test-directory))) + (should + (file-directory-p (file-name-as-directory tramp-archive-test-directory))) + (should + (file-exists-p (expand-file-name "foo" tramp-archive-test-directory)))) + (ert-deftest tramp-archive-test06-directory-file-name () "Check `directory-file-name'. This checks also `file-name-as-directory', `file-name-directory', commit 59657c482d9c6a32821353be81d19ed6149557d9 Author: Martin Rudalics Date: Wed Jan 31 09:35:15 2018 +0100 Document 'window-at-side-p' in the Elisp manual * doc/lispref/windows.texi (Windows and Frames): Document 'window-at-side-p'. diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index 3691a2c04f..5ab6d6ee6a 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -338,8 +338,8 @@ The functions @code{window-next-sibling} and and previous window, respectively, in the cyclic ordering of windows (@pxref{Cyclic Window Ordering}). - You can use the following functions to find the first live window on a -frame and the window nearest to a given window. + The following functions can be useful to locate a window within its +frame. @defun frame-first-window &optional frame-or-window This function returns the live window at the upper left corner of the @@ -351,6 +351,20 @@ the assumption that the frame from our canonical example is selected @code{(frame-first-window)} returns @var{W2}. @end defun +@defun window-at-side-p &optional window side +This function returns @code{t} if @var{window} is located at +@var{side} of its containing frame. The argument @var{window} must be +a valid window and defaults to the selected one. The argument +@var{side} can be any of the symbols @code{left}, @code{top}, +@code{right} or @code{bottom}. The default value @code{nil} is +handled like @code{bottom}. + +Note that this function disregards the minibuffer window +(@pxref{Minibuffer Windows}). Hence, with @var{side} equal to +@code{bottom} it may return @code{t} also when the minibuffer window +appears right below @var{window}. +@end defun + @cindex window in direction @defun window-in-direction direction &optional window ignore sign wrap mini This function returns the nearest live window in direction @@ -385,7 +399,12 @@ the minibuffer window if and only if it is currently active. If window even when it's not active. However, if @var{wrap} is non-@code{nil}, it always acts as if @var{mini} were @code{nil}. -If it doesn't find a suitable window, this function returns @code{nil}. +If it doesn't find a suitable window, this function returns +@code{nil}. + +Don't use this function to check whether there is @emph{no} window in +@var{direction}. Calling @code{window-at-side-p} described above is a +much more efficient way to do that. @end defun The following function allows the entire window tree of a frame to be commit 2b35ed0b0c49698337758004bd5e6062a3aaffab Author: Noam Postavsky Date: Sun Jan 28 18:16:48 2018 -0500 Document external-debugging-output in the Elisp Manual (Bug#24051) * doc/lispref/streams.texi (Output Streams): List external-debugging-output. * src/print.c (Fexternal_debugging_output): Quote `print' in docstring. diff --git a/doc/lispref/streams.texi b/doc/lispref/streams.texi index bd7dc2d9af..6172392274 100644 --- a/doc/lispref/streams.texi +++ b/doc/lispref/streams.texi @@ -503,7 +503,7 @@ in reverse order. @end group @group -(print "This is the output" 'eat-output) +(print "This is the output" #'eat-output) @result{} "This is the output" @end group @@ -530,6 +530,22 @@ Now we can put the output in the proper order by reversing the list: Calling @code{concat} converts the list to a string so you can see its contents more clearly. +@cindex @code{stderr} stream, use for debugging +@anchor{external-debugging-output} +@defun external-debugging-output character +This function can be useful as an output stream when debugging. It +writes @var{character} to the standard error stream. + +For example +@example +@group +(print "This is the output" #'external-debugging-output) +@print{} This is the output +@result{} "This is the output" +@end group +@end example +@end defun + @node Output Functions @section Output Functions @@ -570,8 +586,9 @@ operation: @end example In the functions below, @var{stream} stands for an output stream. -(See the previous section for a description of output streams.) If -@var{stream} is @code{nil} or omitted, it defaults to the value of +(See the previous section for a description of output streams. Also +@xref{external-debugging-output}, a useful stream value for debugging.) +If @var{stream} is @code{nil} or omitted, it defaults to the value of @code{standard-output}. @defun print object &optional stream diff --git a/src/print.c b/src/print.c index d140f9973f..af1e85f6e7 100644 --- a/src/print.c +++ b/src/print.c @@ -748,7 +748,7 @@ is used instead. */) DEFUN ("external-debugging-output", Fexternal_debugging_output, Sexternal_debugging_output, 1, 1, 0, doc: /* Write CHARACTER to stderr. -You can call print while debugging emacs, and pass it this function +You can call `print' while debugging emacs, and pass it this function to make it write to the debugging output. */) (Lisp_Object character) { commit db6564cde0a9001311c38600d61f503e9d32bf0b Author: Noam Postavsky Date: Mon Jan 29 18:49:46 2018 -0500 Fix scroll-margin docstring (Bug#13791) * src/xdisp.c (syms_of_xdisp) : Explain that entering the margin may trigger any sort of auto scrolling, not recentering specifically. diff --git a/src/xdisp.c b/src/xdisp.c index 903815c658..7511e54ab1 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -32527,8 +32527,8 @@ A value of zero means always recenter point if it moves off screen. */); DEFVAR_INT ("scroll-margin", scroll_margin, doc: /* Number of lines of margin at the top and bottom of a window. -Recenter the window whenever point gets within this many lines -of the top or bottom of the window. */); +Trigger automatic scrolling whenever point gets within this many lines +of the top or bottom of the window (see info node `Auto Scrolling'). */); scroll_margin = 0; DEFVAR_LISP ("maximum-scroll-margin", Vmaximum_scroll_margin, commit 732d1b9383a9381896df12a2762991c3ed68b025 Author: Noam Postavsky Date: Sun Jan 28 20:17:43 2018 -0500 Clarify that `ansi-term' is almost the same as `term' (Bug#18106) * lisp/term.el (ansi-term): Clarify that it's almost the same as `term'. diff --git a/lisp/term.el b/lisp/term.el index 078a4baff5..3970e93cf1 100644 --- a/lisp/term.el +++ b/lisp/term.el @@ -4255,7 +4255,9 @@ the process. Any more args are arguments to PROGRAM." ;;;###autoload (defun ansi-term (program &optional new-buffer-name) - "Start a terminal-emulator in a new buffer." + "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'. " (interactive (list (read-from-minibuffer "Run program: " (or explicit-shell-file-name (getenv "ESHELL") commit f706c59093645a6306dd907833d597884e69c0ac Author: Noam Postavsky Date: Sun Jan 28 17:51:35 2018 -0500 Update manual description of locate-file (Bug#23650) * doc/lispref/files.texi (Locating Files): Add example of predicate when searching for a directory. diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index a5d0f9bda3..57428ab40f 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -1541,6 +1541,16 @@ argument. If @var{predicate} is @code{nil} or omitted, @xref{Kinds of Files}, for other useful predicates, e.g., @code{file-executable-p} and @code{file-directory-p}. +This function will normally skip directories, so if you want it to +find directories, make sure the @var{predicate} function returns +@code{dir-ok} for them. For example: + +@example +(locate-file "html" '("/var/www" "/srv") nil + (lambda (f) (if (file-directory-p f) 'dir-ok))) +@end example + + For compatibility, @var{predicate} can also be one of the symbols @code{executable}, @code{readable}, @code{writable}, @code{exists}, or a list of one or more of these symbols. commit 16022626ba86eb96e12b7d919edfb50912cb26bd Author: Noam Postavsky Date: Sun Jan 28 16:57:11 2018 -0500 Clarify effect of print-gensym (Bug#27776) * src/print.c (syms_of_print) : Clarify that use of #N# and #N= constructs depends on the value of `print-circle'. diff --git a/src/print.c b/src/print.c index 47cb33deeb..d140f9973f 100644 --- a/src/print.c +++ b/src/print.c @@ -2371,10 +2371,10 @@ I.e., (quote foo) prints as \\='foo, (function foo) as #\\='foo. */); DEFVAR_LISP ("print-gensym", Vprint_gensym, doc: /* Non-nil means print uninterned symbols so they will read as uninterned. I.e., the value of (make-symbol \"foobar\") prints as #:foobar. -When the uninterned symbol appears within a recursive data structure, -and the symbol appears more than once, in addition use the #N# and #N= -constructs as needed, so that multiple references to the same symbol are -shared once again when the text is read back. */); +When the uninterned symbol appears multiple times within the printed +expression, and `print-circle' is non-nil, in addition use the #N# +and #N= constructs as needed, so that multiple references to the same +symbol are shared once again when the text is read back. */); Vprint_gensym = Qnil; DEFVAR_LISP ("print-circle", Vprint_circle, commit 53e9fa2b5ab4b179258917aa2d9be9341d42820a Author: Noam Postavsky Date: Sun Jan 28 16:53:50 2018 -0500 * lisp/custom.el (defcustom): Fix docstring (Bug#27891). diff --git a/lisp/custom.el b/lisp/custom.el index edbbc8c144..b7539685a8 100644 --- a/lisp/custom.el +++ b/lisp/custom.el @@ -306,7 +306,8 @@ The following common keywords are also meaningful. VALUE should be a list with the form (PACKAGE . VERSION) specifying that the variable was first introduced, or its default value was changed, in PACKAGE version VERSION. This - keyword takes priority over :version. The PACKAGE and VERSION + keyword takes priority over :version. For packages which + are bundled with Emacs releases, the PACKAGE and VERSION must appear in the alist `customize-package-emacs-version-alist'. Since PACKAGE must be unique and the user might see it in an error message, a good choice is the official name of the commit 607cc4e24a08cfe4a14db9d1387dfb23ba94044c Author: Noam Postavsky Date: Sun Jan 28 13:59:06 2018 -0500 Define cl-type-definition button type as needed (Bug#28899) * lisp/emacs-lisp/eieio-opt.el (eieio-help-constructor): Require `cl-extra' before using the `cl-type-definition' button type. diff --git a/lisp/emacs-lisp/eieio-opt.el b/lisp/emacs-lisp/eieio-opt.el index dbec48d038..eeb0bc95d6 100644 --- a/lisp/emacs-lisp/eieio-opt.el +++ b/lisp/emacs-lisp/eieio-opt.el @@ -142,7 +142,10 @@ are not abstract." (find-lisp-object-file-name ctr def))) (when location (insert (substitute-command-keys " in `")) - (help-insert-xref-button + ;; The `cl-type-definition' button type can't be autoloaded + ;; due to circularity during bootstrap (Bug#28899). + (require 'cl-extra) + (help-insert-xref-button (help-fns-short-filename location) 'cl-type-definition ctr location 'define-type) (insert (substitute-command-keys "'"))) commit 9e6889c65af15b80db3f19064a765c1d3a198b87 Author: Noam Postavsky Date: Sun Jan 28 12:34:51 2018 -0500 Emphasize that GPG passphrase caching is temporary (Bug#29907) * doc/misc/epa.texi (Caching Passphrases): Clarify that caching is temporary. (GnuPG version compatibility): Fix typo. diff --git a/doc/misc/epa.texi b/doc/misc/epa.texi index 80ea43e803..8c21a262a1 100644 --- a/doc/misc/epa.texi +++ b/doc/misc/epa.texi @@ -455,7 +455,7 @@ GnuPG 2.1 uses a fixed address for the Unix domain socket used to communicate with gpg-agent. The @code{GPG_AGENT_INFO} environment variable, which is used by GnuPG 2.0 and 1.4, is ignored. That means, if your system has both GnuPG 2.1 and 1.4, the gpg command from GnuPG -1.4 is not able to use gpg-agent provided by 2.1 (at least out of box).q +1.4 is not able to use gpg-agent provided by 2.1 (at least out of box). @item GnuPG 2.1 (2.1.5 or later) has a mechanism to direct the Pinentry @@ -474,7 +474,9 @@ graphical prompt. Typing passphrases is a troublesome task if you frequently open and close the same file. GnuPG and EasyPG Assistant provide mechanisms to -remember your passphrases. However, the configuration is a bit +remember your passphrases for a limited time. Using these, you only +need to re-enter the passphrase occasionally. +However, the configuration is a bit confusing since it depends on your GnuPG installation@xref{GnuPG version compatibility}, encryption method (symmetric or public key), and whether or not you want to use gpg-agent. Here are some commit 4b5711b2b2095558cc94b0397a752e25f4bfd499 Author: Alan Mackenzie Date: Tue Jan 30 18:09:49 2018 +0000 Fix @examples in cc-mode.info, where lines were getting glued together. This happened because of false @c's in macro lines. * /doc/misc/cc-mode.texi (Line-up Functions): Remove the unneeded @c from macros sssTBasicOffset, sssTsssTBasicOffset, and hereFn. diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 292342cb4a..0132ab1775 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -5634,15 +5634,15 @@ Works with: @end ifinfo @macro sssTBasicOffset -<--> @i{c-basic-offset}@c +<--> @i{c-basic-offset} @end macro @macro sssTsssTBasicOffset -<--><--> @i{c-basic-offset}@c +<--><--> @i{c-basic-offset} @end macro @macro hereFn{func} -<- @i{\func\}@c +<- @i{\func\} @end macro @c The TeX backend seems to insert extra spaces around the argument. :P commit 71961f13c3db5925c7cf5b87fde8f19bdc5424dd Author: Eli Zaretskii Date: Tue Jan 30 18:24:08 2018 +0200 Minor change in "Mode Line" section of Emacs manual * doc/emacs/screen.texi (Mode Line): Mention tooltips shown when hovering the mouse over the mode line. Suggested by Eduardo Mercovich in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index c8b22aa68c..8dd5e5f9e5 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -279,7 +279,10 @@ the mode line of every window. @xref{Recursive Edit}. You can change the appearance of the mode line as well as the format of its contents. @xref{Optional Mode Line}. In addition, the mode line is mouse-sensitive; clicking on different parts of the mode line -performs various commands. @xref{Mode Line Mouse}. +performs various commands. @xref{Mode Line Mouse}. Also, hovering +the mouse pointer above mouse-sensitive portions of the mode line +shows tooltips (@pxref{Tooltips}) with information about commands you +can invoke by clicking on the mode line. @node Menu Bar @section The Menu Bar commit 55a2b769a1c0a55aa2c7fe81d2e182f83bc19528 Author: Eli Zaretskii Date: Tue Jan 30 18:09:28 2018 +0200 More fixes in the Emacs manual * doc/emacs/screen.texi (Mode Line): Fix markup and cross-references. (Menu Bar): Correct inaccurate description. * doc/emacs/macos.texi (Mac OS / GNUstep, Mac / GNUstep Events): * doc/emacs/frames.texi (Scroll Bars): * doc/emacs/emacs.texi (Top): * doc/emacs/ack.texi (Acknowledgments): Fix spelling of "macOS". * doc/emacs/misc.texi (Invoking emacsclient) (emacsclient Options): Fix markup of 'emacsclient'. Suggested by Michael Albinus in emacs-manual-bugs@gnu.org. diff --git a/doc/emacs/ack.texi b/doc/emacs/ack.texi index ee8649a045..20c8d4e610 100644 --- a/doc/emacs/ack.texi +++ b/doc/emacs/ack.texi @@ -209,8 +209,8 @@ for Korean Hanja. @item Andrew Choi and Yamamoto Mitsuharu wrote the Carbon support, used -prior to Emacs 23 for Mac OS@. Yamamoto Mitsuharu continued to -contribute to Mac OS support in the newer Nextstep port; and also +prior to Emacs 23 for macOS@. Yamamoto Mitsuharu continued to +contribute to macOS support in the newer Nextstep port; and also improved support for multi-monitor displays. @item diff --git a/doc/emacs/emacs.texi b/doc/emacs/emacs.texi index 5904740b1f..0051868fee 100644 --- a/doc/emacs/emacs.texi +++ b/doc/emacs/emacs.texi @@ -221,7 +221,7 @@ Appendices * Emacs Invocation:: Hairy startup options. * X Resources:: X resources for customizing Emacs. * Antinews:: Information about Emacs version 25. -* Mac OS / GNUstep:: Using Emacs under Mac OS and GNUstep. +* Mac OS / GNUstep:: Using Emacs under macOS and GNUstep. * Microsoft Windows:: Using Emacs on Microsoft Windows and MS-DOS. * Manifesto:: What's GNU? Gnu's Not Unix! @@ -1226,10 +1226,10 @@ GTK resources * GTK Names in Emacs:: GTK widgets used by Emacs. * GTK styles:: What can be customized in a GTK widget. -Emacs and Mac OS / GNUstep +Emacs and macOS / GNUstep -* Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or Mac OS. -* Mac / GNUstep Customization:: Customizations under GNUstep or Mac OS. +* Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or macOS. +* Mac / GNUstep Customization:: Customizations under GNUstep or macOS. * Mac / GNUstep Events:: How window system events are handled. * GNUstep Support:: Details on status of GNUstep support. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index 7a7e1fd563..7c1d36c720 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -975,7 +975,7 @@ variable @code{scroll-bar-mode}. Its value should be either @code{right} (put scroll bars on the right side of windows), @code{left} (put them on the left), or @code{nil} (disable vertical scroll bars). By default, Emacs puts scroll bars on the right if it was compiled with -GTK+ support on the X Window System, and on MS-Windows or Mac OS; Emacs +GTK+ support on the X Window System, and on MS-Windows or macOS; Emacs puts scroll bars on the left if compiled on the X Window System without GTK+ support (following the old convention for X applications). diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index 9af6f93b0c..cf4e48bacb 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -2,7 +2,7 @@ @c Copyright (C) 2000-2018 Free Software Foundation, Inc. @c See file emacs.texi for copying conditions. @node Mac OS / GNUstep -@appendix Emacs and Mac OS / GNUstep +@appendix Emacs and macOS / GNUstep @cindex macOS @cindex Macintosh @cindex GNUstep @@ -12,7 +12,7 @@ the GNUstep libraries on GNU/Linux or other operating systems, or on macOS with native window system support. On macOS, Emacs can be built either without window system support, with X11, or with the Cocoa interface; this section only applies to the Cocoa build. This -does not support versions before Mac OS X 10.6. +does not support versions before macOS 10.6. For various historical and technical reasons, Emacs uses the term @samp{Nextstep} internally, instead of ``Cocoa'' or ``macOS''; for @@ -25,14 +25,14 @@ this writing, Emacs GNUstep support is alpha status (@pxref{GNUstep Support}), but we hope to improve it in the future. @menu -* Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or Mac OS. -* Mac / GNUstep Customization:: Customizations under GNUstep or Mac OS. +* Mac / GNUstep Basics:: Basic Emacs usage under GNUstep or macOS. +* Mac / GNUstep Customization:: Customizations under GNUstep or macOS. * Mac / GNUstep Events:: How window system events are handled. * GNUstep Support:: Details on status of GNUstep support. @end menu @node Mac / GNUstep Basics -@section Basic Emacs usage under Mac OS and GNUstep +@section Basic Emacs usage under macOS and GNUstep By default, the @key{alt} and @key{option} keys are the same as @key{Meta}. The Mac @key{Cmd} key is the same as @key{Super}, and @@ -128,7 +128,7 @@ at the command-line before starting Emacs: @node Mac / GNUstep Events -@section Windowing System Events under Mac OS / GNUstep +@section Windowing System Events under macOS / GNUstep Nextstep applications receive a number of special events which have no X equivalent. These are sent as specially defined key events, which diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index aeb8560ea0..3300ed67c6 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1729,7 +1729,7 @@ different virtual terminals, and switch to the Emacs server's virtual terminal after calling @command{emacsclient}; or (ii) call @command{emacsclient} from within the Emacs server itself, using Shell mode (@pxref{Interactive Shell}) or Term mode (@pxref{Term Mode}); -@code{emacsclient} blocks only the subshell under Emacs, and you can +@command{emacsclient} blocks only the subshell under Emacs, and you can still use Emacs to edit the file. @kindex C-x # @@ -1794,13 +1794,13 @@ listed below: @table @samp @item -a @var{command} @itemx --alternate-editor=@var{command} -Specify a shell command to run if @code{emacsclient} fails to contact Emacs. -This is useful when running @code{emacsclient} in a script. -The command may include arguments, which may be quoted "like this". -Currently, escaping of quotes is not supported. +Specify a shell command to run if @command{emacsclient} fails to +contact Emacs. This is useful when running @code{emacsclient} in a +script. The command may include arguments, which may be quoted "like +this". Currently, escaping of quotes is not supported. As a special exception, if @var{command} is the empty string, then -@code{emacsclient} starts Emacs in daemon mode (as @command{emacs +@command{emacsclient} starts Emacs in daemon mode (as @samp{emacs --daemon}) and then tries connecting again. @cindex @env{ALTERNATE_EDITOR} environment variable diff --git a/doc/emacs/screen.texi b/doc/emacs/screen.texi index fb4eff9711..c8b22aa68c 100644 --- a/doc/emacs/screen.texi +++ b/doc/emacs/screen.texi @@ -228,8 +228,8 @@ modified, it shows two stars (@samp{**}). For a read-only buffer, it shows @samp{%*} if the buffer is modified, and @samp{%%} otherwise. The character after @var{ch} is normally a dash (@samp{-}). -However, if the default-directory for the current buffer is on a -remote machine (@pxref{File Names}), @samp{@@} is displayed instead. +However, if @code{default-directory} (@pxref{File Names}) for the +current buffer is on a remote machine, @samp{@@} is displayed instead. @var{fr} gives the selected frame name (@pxref{Frames}). It appears only on text terminals. The initial frame's name is @samp{F1}. @@ -296,10 +296,10 @@ at the end of a menu item means that the command will prompt you for further input before it actually does anything. Some of the commands in the menu bar have ordinary key bindings as -well; if so, a key binding is shown in parentheses after the item -itself. To view the full command name and documentation for a menu -item, type @kbd{C-h k}, and then select the menu bar with the mouse in -the usual way (@pxref{Key Help}). +well; if so, a key binding is shown after the item itself. To view +the full command name and documentation for a menu item, type +@kbd{C-h k}, and then select the menu bar with the mouse in the usual +way (@pxref{Key Help}). @kindex F10 @findex menu-bar-open