commit cfa59d6a26b55d81d5df3d5a0ba618c8c5808aa0 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Tue May 10 08:05:49 2016 +0200 ; Instrument tramp-tests.el diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index 6bbe969..0f40468 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -639,9 +639,13 @@ This checks also `file-name-as-directory', `file-name-directory', (should-not (unhandled-file-name-directory "/method:host:/path/to/file")) + (unwind-protect ;; Bug#10085. (dolist (n-e '(nil t)) (let ((non-essential n-e)) + (when (getenv "NIX_STORE") + (dolist (elt (all-completions "tramp-" obarray 'functionp)) + (trace-function-background (intern elt)))) (dolist (file `(,(file-remote-p tramp-test-temporary-file-directory 'method) ,(file-remote-p tramp-test-temporary-file-directory 'host))) @@ -656,7 +660,10 @@ This checks also `file-name-as-directory', `file-name-directory', (file-name-as-directory file) (if (tramp-completion-mode-p) file (concat file "./")))) (should (string-equal (file-name-directory file) file)) - (should (string-equal (file-name-nondirectory file) ""))))))) + (should (string-equal (file-name-nondirectory file) "")))))) + (when (getenv "NIX_STORE") + (untrace-all) + (message "%s" (with-current-buffer trace-buffer (buffer-string)))))) (ert-deftest tramp-test07-file-exists-p () "Check `file-exist-p', `write-region' and `delete-file'." commit c20cc0986cdade6577d6ce169330db19e2169794 Author: Lars Ingebrigtsen Date: Mon May 9 22:06:25 2016 +0200 Move "Recent messages" earlier in report-emacs-bug * lisp/mail/emacsbug.el (report-emacs-bug): Move the "Recent messages" part earlier so that users can see it and remove it if they want. diff --git a/lisp/mail/emacsbug.el b/lisp/mail/emacsbug.el index ce3c50b..18eaa22 100644 --- a/lisp/mail/emacsbug.el +++ b/lisp/mail/emacsbug.el @@ -242,7 +242,7 @@ usually do not have translators for other languages.\n\n"))) (let ((txt (delete-and-extract-region (1+ user-point) (point)))) (insert (propertize "\n" 'display txt))) - (insert "\n\nIn " (emacs-version)) + (insert "\nIn " (emacs-version)) (if emacs-build-system (insert " built on " emacs-build-system)) (insert "\n") @@ -263,6 +263,18 @@ usually do not have translators for other languages.\n\n"))) (buffer-string))))) (if (stringp lsb) (insert "System " lsb "\n"))) + (let ((message-buf (get-buffer "*Messages*"))) + (if message-buf + (let (beg-pos + (end-pos message-end-point)) + (with-current-buffer message-buf + (goto-char end-pos) + (forward-line -10) + (setq beg-pos (point))) + (terpri (current-buffer) t) + (insert "Recent messages:\n") + (insert-buffer-substring message-buf beg-pos end-pos)))) + (insert "\n") (when (and system-configuration-options (not (equal system-configuration-options ""))) (insert "Configured using:\n 'configure " @@ -295,20 +307,6 @@ usually do not have translators for other languages.\n\n"))) (and (boundp mode) (buffer-local-value mode from-buffer) (insert (format " %s: %s\n" mode (buffer-local-value mode from-buffer))))) - (let ((message-buf (get-buffer "*Messages*"))) - (if message-buf - (let (beg-pos - (end-pos message-end-point)) - (with-current-buffer message-buf - (goto-char end-pos) - (forward-line -10) - (setq beg-pos (point))) - (insert "\nRecent messages:\n") - (insert-buffer-substring message-buf beg-pos end-pos)))) - ;; After Recent messages, to avoid the messages produced by - ;; list-load-path-shadows. - (unless (looking-back "\n" (1- (point))) - (insert "\n")) (insert "\n") (insert "Load-path shadows:\n") (let* ((msg "Checking for load-path shadows...") commit a88f22bddef5be36a3227f0630c1465f76a87f78 Author: Michael Albinus Date: Mon May 9 21:08:51 2016 +0200 Pacify byte compiler in tramp.el * lisp/net/tramp.el (tramp-time-diff): Use `tramp-compat-funcall'. diff --git a/lisp/net/tramp-compat.el b/lisp/net/tramp-compat.el index f1f31d0..0e9fcb5 100644 --- a/lisp/net/tramp-compat.el +++ b/lisp/net/tramp-compat.el @@ -50,9 +50,9 @@ (unless (boundp 'remote-file-name-inhibit-cache) (defvar remote-file-name-inhibit-cache nil)) -;; For not existing functions, or functions with a changed argument -;; list, there are compiler warnings. We want to avoid them in cases -;; we know what we do. +;; For not existing functions, obsolete functions, or functions with a +;; changed argument list, there are compiler warnings. We want to +;; avoid them in cases we know what we do. (defmacro tramp-compat-funcall (function &rest arguments) `(when (or (subrp ,function) (functionp ,function)) (with-no-warnings (funcall ,function ,@arguments)))) diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 57a6594..9f67855 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -1723,7 +1723,6 @@ For definition of that list see `tramp-set-completion-function'." ;;; Fontification of `read-file-name': -;; rfn-eshadow.el is part of Emacs 22. It is autoloaded. (defvar tramp-rfn-eshadow-overlay) (make-variable-buffer-local 'tramp-rfn-eshadow-overlay) @@ -4147,7 +4146,7 @@ Invokes `password-read' if available, `read-passwd' else." "Return the difference between the two times, in seconds. T1 and T2 are time values (as returned by `current-time' for example)." ;; Starting with Emacs 25.1, we could change this to use `time-subtract'. - (float-time (subtract-time t1 t2))) + (float-time (tramp-compat-funcall 'subtract-time t1 t2))) ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' ;; does not deal well with newline characters. Newline is replaced by commit c8b7a6abd90aab76185202def7049a0ea981d335 Merge: 9418ab3 3b47898 Author: Paul Eggert Date: Mon May 9 10:59:29 2016 -0700 Merge from origin/emacs-25 3b47898 Fix doc string in `insert' b479dea * doc/misc/emacs-mime.texi (time-date): Document now-builtins... cd27f73 Say 'All results processed' at the end 4ffec91 Document automatic adjustment of process' logical window dime... dc66271 ; Fix typos and stylistic glitches in NEWS commit 9418ab39bf970dd82b5d6f2e7b40a5d8cd134a43 Merge: d6dac36 c760a60 Author: Paul Eggert Date: Mon May 9 10:59:29 2016 -0700 ; Merge from origin/emacs-25 The following commit was skipped: c760a60 tramp-sh.el: Work around a stat bug (backport from master) commit d6dac367ccf2d9fc8a0e50d47e8a753adf9a0770 Author: Michael Albinus Date: Mon May 9 19:55:49 2016 +0200 ; Instrument tramp.el diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index 118da57..57a6594 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el @@ -2847,6 +2847,20 @@ User is always nil." (let ((v (tramp-dissect-file-name file t))) ;; Run the command on the localname portion only unless we are in ;; completion mode. + (when (getenv "NIX_STORE") + (message + "tramp-handle-file-name-as-directory file %s tramp-completion-mode-p %s result %s" + file (tramp-completion-mode-p) + (tramp-make-tramp-file-name + (tramp-file-name-method v) + (tramp-file-name-user v) + (tramp-file-name-host v) + (if (and (tramp-completion-mode-p) + (zerop (length (tramp-file-name-localname v)))) + "" + (tramp-run-real-handler + 'file-name-as-directory (list (or (tramp-file-name-localname v) "")))) + (tramp-file-name-hop v)))) (tramp-make-tramp-file-name (tramp-file-name-method v) (tramp-file-name-user v) commit a8231e00cbad60652ff7ab6ae51a758f1d939971 Author: Alan Mackenzie Date: Mon May 9 17:49:45 2016 +0000 CC Mode now uses the new :after-hook feature of define-derived-mode It now runs internal variable setting functions after the mode hooks, no longer runs the mode hooks twice, and declares the configuration variables for noise macros and macros with semicolons as safe variables (when given suitable arguments). Fixes bug #16759 and bug #23476. * .dir-locals: Put the c-noise-macros-with-paren-names setting back into the C Mode value. * lisp/progmodes/cc-mode.el: (c-basic-common-init): Remove the call to c-make-macro-with-semi-re. (c-mode, c++-mode, objc-mode, java-mode, idl-mode, pike-mode, awk-mode): Move c-make-noise-macro-regexps and c-make-macro-with-semi-re (where appropriate) and c-update-modeline into the :after-hook form. Remove the explicit settings of the syntax table, the abbreviation table and the local key map, since they duplicate forms generated by define-derived-mode. Remove the explicit invocation of each mode's mode hook, since they duplicate ones generated by define-derived-mode. * lisp/progmodes/cc-vars.el: (c-string-list-p, c-string-or-string-list-p): New functions. (c-noise-macro-names, c-noise-macro-with-parens-names): give the save-local-variable property c-string-list-p. (c-macro-names-with-semicolon): give the save-local-variable property c-string-or-string-list-p. * doc/misc/cc-mode.texi: (Macros with ;, Noise Macros): Note that it's not necessary to call the regexp generating functions after setting the pertinent configuration values in a mode hook. diff --git a/.dir-locals.el b/.dir-locals.el index 9853d7b..7c14802 100644 --- a/.dir-locals.el +++ b/.dir-locals.el @@ -1,7 +1,8 @@ ((nil . ((tab-width . 8) (sentence-end-double-space . t) (fill-column . 70))) - (c-mode . ((c-file-style . "GNU"))) + (c-mode . ((c-file-style . "GNU") + (c-noise-macro-with-parens-names . ("IF_LINT")))) (objc-mode . ((c-file-style . "GNU"))) (log-edit-mode . ((log-edit-font-lock-gnu-style . t) (log-edit-setup-add-author . t))) diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index 70146b2..82f8cbc 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -6767,10 +6767,10 @@ example: @defun c-make-macro-with-semi-re @findex make-macro-with-semi-re (c-) Call this (non-interactive) function, which sets internal variables, -each time you change the value of -@code{c-macro-names-with-semicolon}. It takes no arguments, and its +each time you change the value of @code{c-macro-names-with-semicolon} +after the major mode function has run. It takes no arguments, and its return value has no meaning. This function is called by @ccmode{}'s -initialization code. +initialization code, after the mode hooks have run. @end defun @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! @@ -6822,9 +6822,10 @@ but doing so is OK. @defun c-make-noise-macro-regexps @findex make-noise-macro-regexps (c-) Call this (non-interactive) function, which sets internal variables, -after changing the value of @code{c-noise-macro-names} or -@code{c-noise-macro-with-parens-names} (e.g. in a hook (@pxref{CC -Hooks})). This function is called by @ccmode{}'s initialization code. +on changing the value of @code{c-noise-macro-names} or +@code{c-noise-macro-with-parens-names} after the major mode's function +has run. This function is called by @ccmode{}'s initialization code, +after the mode hooks have run. @end defun @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! diff --git a/lisp/progmodes/cc-mode.el b/lisp/progmodes/cc-mode.el index 2ab1d6b..6a78992 100644 --- a/lisp/progmodes/cc-mode.el +++ b/lisp/progmodes/cc-mode.el @@ -596,7 +596,6 @@ that requires a literal mode spec at compile time." (not (string-equal c-indentation-style style))))))) (c-setup-paragraph-variables) - (c-make-noise-macro-regexps) ;; we have to do something special for c-offsets-alist so that the ;; buffer local value has its own alist structure. @@ -1487,18 +1486,16 @@ initialization, then `c-mode-hook'. Key bindings: \\{c-mode-map}" + :after-hook (progn (c-make-noise-macro-regexps) + (c-make-macro-with-semi-re) + (c-update-modeline)) (c-initialize-cc-mode t) - (set-syntax-table c-mode-syntax-table) - (setq local-abbrev-table c-mode-abbrev-table - abbrev-mode t) - (use-local-map c-mode-map) + (setq abbrev-mode t) (c-init-language-vars-for 'c-mode) - (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'c-mode) (easy-menu-add c-c-menu) (cc-imenu-init cc-imenu-c-generic-expression) - (c-run-mode-hooks 'c-mode-common-hook 'c-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; Support for C++ @@ -1542,18 +1539,16 @@ initialization, then `c++-mode-hook'. Key bindings: \\{c++-mode-map}" + :after-hook (progn (c-make-noise-macro-regexps) + (c-make-macro-with-semi-re) + (c-update-modeline)) (c-initialize-cc-mode t) - (set-syntax-table c++-mode-syntax-table) - (setq local-abbrev-table c++-mode-abbrev-table - abbrev-mode t) - (use-local-map c++-mode-map) + (setq abbrev-mode t) (c-init-language-vars-for 'c++-mode) - (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'c++-mode) (easy-menu-add c-c++-menu) (cc-imenu-init cc-imenu-c++-generic-expression) - (c-run-mode-hooks 'c-mode-common-hook 'c++-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; Support for Objective-C @@ -1595,18 +1590,16 @@ initialization, then `objc-mode-hook'. Key bindings: \\{objc-mode-map}" + :after-hook (progn (c-make-noise-macro-regexps) + (c-make-macro-with-semi-re) + (c-update-modeline)) (c-initialize-cc-mode t) - (set-syntax-table objc-mode-syntax-table) - (setq local-abbrev-table objc-mode-abbrev-table - abbrev-mode t) - (use-local-map objc-mode-map) + (setq abbrev-mode t) (c-init-language-vars-for 'objc-mode) - (c-make-macro-with-semi-re) ; matches macro names whose expansion ends with ; (c-common-init 'objc-mode) (easy-menu-add c-objc-menu) (cc-imenu-init nil 'cc-imenu-objc-function) - (c-run-mode-hooks 'c-mode-common-hook 'objc-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; Support for Java @@ -1656,17 +1649,14 @@ initialization, then `java-mode-hook'. Key bindings: \\{java-mode-map}" + :after-hook (c-update-modeline) (c-initialize-cc-mode t) - (set-syntax-table java-mode-syntax-table) - (setq local-abbrev-table java-mode-abbrev-table - abbrev-mode t) - (use-local-map java-mode-map) + (setq abbrev-mode t) (c-init-language-vars-for 'java-mode) (c-common-init 'java-mode) (easy-menu-add c-java-menu) (cc-imenu-init cc-imenu-java-generic-expression) - (c-run-mode-hooks 'c-mode-common-hook 'java-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; Support for CORBA's IDL language @@ -1705,16 +1695,13 @@ initialization, then `idl-mode-hook'. Key bindings: \\{idl-mode-map}" + :after-hook (c-update-modeline) (c-initialize-cc-mode t) - (set-syntax-table idl-mode-syntax-table) - (setq local-abbrev-table idl-mode-abbrev-table) - (use-local-map idl-mode-map) (c-init-language-vars-for 'idl-mode) (c-common-init 'idl-mode) (easy-menu-add c-idl-menu) ;;(cc-imenu-init cc-imenu-idl-generic-expression) ;TODO - (c-run-mode-hooks 'c-mode-common-hook 'idl-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; Support for Pike @@ -1757,17 +1744,14 @@ initialization, then `pike-mode-hook'. Key bindings: \\{pike-mode-map}" + :after-hook (c-update-modeline) (c-initialize-cc-mode t) - (set-syntax-table pike-mode-syntax-table) - (setq local-abbrev-table pike-mode-abbrev-table - abbrev-mode t) - (use-local-map pike-mode-map) + (setq abbrev-mode t) (c-init-language-vars-for 'pike-mode) (c-common-init 'pike-mode) (easy-menu-add c-pike-menu) ;;(cc-imenu-init cc-imenu-pike-generic-expression) ;TODO - (c-run-mode-hooks 'c-mode-common-hook 'pike-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; Support for AWK @@ -1821,22 +1805,18 @@ initialization, then `awk-mode-hook'. Key bindings: \\{awk-mode-map}" + :after-hook (c-update-modeline) ;; We need the next line to stop the macro defining ;; `awk-mode-syntax-table'. This would mask the real table which is ;; declared in cc-awk.el and hasn't yet been loaded. :syntax-table nil (require 'cc-awk) ; Added 2003/6/10. (c-initialize-cc-mode t) - (set-syntax-table awk-mode-syntax-table) - (setq local-abbrev-table awk-mode-abbrev-table - abbrev-mode t) - (use-local-map awk-mode-map) + (setq abbrev-mode t) (c-init-language-vars-for 'awk-mode) (c-common-init 'awk-mode) (c-awk-unstick-NL-prop) - - (c-run-mode-hooks 'c-mode-common-hook 'awk-mode-hook) - (c-update-modeline)) + (c-run-mode-hooks 'c-mode-common-hook)) ;; bug reporting diff --git a/lisp/progmodes/cc-vars.el b/lisp/progmodes/cc-vars.el index 98195da..8cad27f 100644 --- a/lisp/progmodes/cc-vars.el +++ b/lisp/progmodes/cc-vars.el @@ -229,7 +229,20 @@ See `c-offsets-alist'." (setq offset (cdr offset))) (null offset))))) - +(defun c-string-list-p (val) + "Return non-nil if VAL is a list of strings." + (and + (listp val) + (catch 'string + (dolist (elt val) + (if (not (stringp elt)) + (throw 'string nil))) + t))) + +(defun c-string-or-string-list-p (val) + "Return non-nil if VAL is a string or a list of strings." + (or (stringp val) + (c-string-list-p val))) ;;; User variables @@ -1633,6 +1646,7 @@ If you change this variable's value, call the function this implicitly by reinitializing C/C++/Objc Mode on any buffer)." :type '(repeat :tag "List of names" string) :group 'c) +(put 'c-noise-macro-names 'safe-local-variable #'c-string-list-p) (defcustom c-noise-macro-with-parens-names nil "A list of names of macros \(or compiler extensions like \"__attribute__\") @@ -1640,6 +1654,7 @@ which optionally have arguments in parentheses, and which expand to nothing. These are recognized by CC Mode only in declarations." :type '(regexp :tag "List of names (possibly empty)" string) :group 'c) +(put 'c-noise-macro-with-parens-names 'safe-local-variable #'c-string-list-p) (defun c-make-noise-macro-regexps () ;; Convert `c-noise-macro-names' and `c-noise-macro-with-parens-names' into @@ -1690,6 +1705,8 @@ variables. Note that currently \(2008-11-04) this variable is a prototype, and is likely to disappear or change its form soon.") (make-variable-buffer-local 'c-macro-names-with-semicolon) +(put 'c-macro-names-with-semicolon 'safe-local-variable + #'c-string-or-string-list-p) (defun c-make-macro-with-semi-re () ;; Convert `c-macro-names-with-semicolon' into the regexp commit 3b478989df59cc33886d260137c433da5cfe4863 Author: Lars Ingebrigtsen Date: Mon May 9 17:08:58 2016 +0200 Fix doc string in `insert' * src/editfns.c (Finsert_and_inherit): The before-insertion markers do not move. (Finsert): Ditto. diff --git a/src/editfns.c b/src/editfns.c index a858e6e..360ec12 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -2484,7 +2484,7 @@ insert1 (Lisp_Object arg) DEFUN ("insert", Finsert, Sinsert, 0, MANY, 0, doc: /* Insert the arguments, either strings or characters, at point. -Point and before-insertion markers move forward to end up +Point and after-insertion markers move forward to end up after the inserted text. Any other markers at the point of insertion remain before the text. @@ -2508,7 +2508,7 @@ usage: (insert &rest ARGS) */) DEFUN ("insert-and-inherit", Finsert_and_inherit, Sinsert_and_inherit, 0, MANY, 0, doc: /* Insert the arguments at point, inheriting properties from adjoining text. -Point and before-insertion markers move forward to end up +Point and after-insertion markers move forward to end up after the inserted text. Any other markers at the point of insertion remain before the text. commit 608f2bd0ac9d950a04ad73bf36d96d25b469b9be Author: Michael Albinus Date: Mon May 9 16:53:49 2016 +0200 ; Instrument tramp-tests.el diff --git a/test/lisp/net/tramp-tests.el b/test/lisp/net/tramp-tests.el index a85eed0..6bbe969 100644 --- a/test/lisp/net/tramp-tests.el +++ b/test/lisp/net/tramp-tests.el @@ -648,6 +648,9 @@ This checks also `file-name-as-directory', `file-name-directory', (unless (zerop (length file)) (setq file (format "/%s:" file)) (should (string-equal (directory-file-name file) file)) + (when (getenv "NIX_STORE") + (message "file %s non-essential %s tramp-completion-mode-p %s" + file non-essential (tramp-completion-mode-p))) (should (string-equal (file-name-as-directory file) commit fd45b5276ba1454c8b4f06cd53367830c1389d84 Author: Dmitry Gutov Date: Mon May 9 12:29:18 2016 +0300 Fix the jit-lock-fontify-now test names * test/lisp/jit-lock-tests.el (jit-lock-fontify-now-mends-the-gaps) (jit-lock-fontify-now-does-not-refontify-unnecessarily): Fix the test names. diff --git a/test/lisp/jit-lock-tests.el b/test/lisp/jit-lock-tests.el index 3d1db85..dcb6936 100644 --- a/test/lisp/jit-lock-tests.el +++ b/test/lisp/jit-lock-tests.el @@ -38,7 +38,7 @@ (jit-lock-fontify-now (point-min) (point-max)) (should-not (text-property-not-all (point-min) (point-max) 'fontified t)))) -(ert-deftest jit-lock-fontify-mends-the-gaps () +(ert-deftest jit-lock-fontify-now-mends-the-gaps () (ert-with-test-buffer (:name "xxx") (jit-lock-tests--setup-buffer) (insert "aaabbbcccddd") @@ -48,7 +48,7 @@ (jit-lock-fontify-now (point-min) (point-max)) (should-not (text-property-not-all (point-min) (point-max) 'fontified t)))) -(ert-deftest jit-lock-does-not-refontify-unnecessarily () +(ert-deftest jit-lock-fontify-now-does-not-refontify-unnecessarily () (ert-with-test-buffer (:name "xxx") (setq font-lock-defaults (list '(((lambda () (error "Don't call me")))) t)) commit b479deadf400cb751a09a80344aa1961168d2143 Author: Paul Eggert Date: Sun May 8 11:49:55 2016 -0700 * doc/misc/emacs-mime.texi (time-date): Document now-builtins better. diff --git a/doc/misc/emacs-mime.texi b/doc/misc/emacs-mime.texi index c9c4b7c..4d68246 100644 --- a/doc/misc/emacs-mime.texi +++ b/doc/misc/emacs-mime.texi @@ -1554,7 +1554,7 @@ Here's a bunch of time/date/second/day examples: (time-less-p '(13818 19266) '(13818 19145)) @result{} nil -(subtract-time '(13818 19266) '(13818 19145)) +(time-subtract '(13818 19266) '(13818 19145)) @result{} (0 121) (days-between "Sat Sep 12 12:21:54 1998 +0200" @@ -1632,14 +1632,14 @@ return a ``zero'' time. @item time-less-p Take two times and say whether the first time is less (i.e., earlier) -than the second time. +than the second time. (This is a built-in function.) @item time-since Take a time and return a time saying how long it was since that time. -@item subtract-time +@item time-subtract Take two times and subtract the second from the first. I.e., return -the time between the two times. +the time between the two times. (This is a built-in function.) @item days-between Take two days and return the number of days between those two days. commit cd27f7396b77086b6c02eff5b2648bfba439d264 Author: Dmitry Gutov Date: Sun May 8 00:23:54 2016 +0300 Say 'All results processed' at the end * lisp/progmodes/xref.el (xref--query-replace-1): Say 'All results processed' at the end if the user hadn't cancelled the process (bug#23284). diff --git a/lisp/progmodes/xref.el b/lisp/progmodes/xref.el index f651dc9..05cd979 100644 --- a/lisp/progmodes/xref.el +++ b/lisp/progmodes/xref.el @@ -624,7 +624,9 @@ references displayed in the current *xref* buffer." (setq pairs (cdr buf-pairs)) (setq continue (perform-replace from to t t nil nil multi-query-replace-map))) - (unless did-it-once (user-error "No suitable matches here")))) + (unless did-it-once (user-error "No suitable matches here")) + (when (and continue (not buf-pairs)) + (message "All results processed")))) (defvar xref--xref-buffer-mode-map (let ((map (make-sparse-keymap))) commit 4ffec91aa1fe668609f460cf6377644597c23306 Author: Eli Zaretskii Date: Sat May 7 12:16:27 2016 +0300 Document automatic adjustment of process' logical window dimensions * doc/lispref/processes.texi (Process Buffers): Document 'set-process-window-size' and 'window-adjust-process-window-size-function'. * etc/NEWS: Mention the new functionality and variable. * src/process.c (Fset_process_window_size): Improve the doc string. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index f660b15..03ae1f0 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -1381,6 +1381,58 @@ Killing the process's buffer deletes the process, which kills the subprocess with a @code{SIGHUP} signal (@pxref{Signals to Processes}). @end defun +If the process's buffer is displayed in a window, your Lisp program +may wish telling the process the dimensions of that window, so that +the process could adapt its output to those dimensions, much as it +adapts to the screen dimensions. The following functions allow to +communicate this kind of information to processes; however, not all +systems support the underlying functionality, so it is best to provide +fallbacks, e.g., via command-line arguments or environment variables. + +@defun set-process-window-size process height width +Tell @var{process} that its logical window size has dimensions +@var{width} by @var{height}, in character units. If this function +succeeds in communicating this information to the process, it returns +@code{t}; otherwise it returns @code{nil}. +@end defun + +When windows that display buffers associated with process change their +dimensions, the affected processes should be told about these changes. +By default, when the window configuration changes, Emacs will +automatically call @code{set-process-window-size} on behalf of every +process whose buffer is displayed in a window, passing it the smallest +dimensions of all the windows displaying the process's buffer. This +works via @code{window-configuration-change-hook} (@pxref{Window +Hooks}), which is told to invoke the function that is the value of +the variable @code{window-adjust-process-window-size-function} for +each process whose buffer is displayed in at least one window. You +can customize this behavior by setting the value of that variable. + +@defopt window-adjust-process-window-size-function +The value of this variable should be a function of two arguments: a +process and the list of windows displaying the process's buffer. When +the function is called, the process's buffer is the current buffer. +The function should return a cons cell @w{@code{(@var{width} +. @var{height})}} that describes the dimensions of the logical process +window to be passed via a call to @code{set-process-window-size}. The +function can also return @code{nil}, in which case Emacs will not call +@code{set-process-window-size} for this process. + +Emacs supplies two predefined values for this variable: +@code{window-adjust-process-window-size-smallest}, which returns the +smallest of all the dimensions of the windows that display a process's +buffer; and @code{window-adjust-process-window-size-largest}, which +returns the largest dimensions. For more complex strategies, write +your own function. + +This variable can be buffer-local. +@end defopt + +If the process has the @code{adjust-window-size-function} property +(@pxref{Process Information}), its value overrides the global and +buffer-local values of +@code{window-adjust-process-window-size-function}. + @node Filter Functions @subsection Process Filter Functions @cindex filter function diff --git a/etc/NEWS b/etc/NEWS index cfda333..785d14b 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -1588,6 +1588,14 @@ process filter, sentinel, etc., through keyword arguments (similar to 'make-network-process'). +++ +** Subprocesses are automatically told about changes in window dimensions +The new option 'window-adjust-process-window-size-function' controls +how subprocesses are told to adapt their logical window sizes to +changes in the Emacs window configuration. Its default value calls +'set-process-window-size' with the smallest dimensions of all the +windows that display the subprocess's buffer. + ++++ ** A new function 'directory-files-recursively' returns all matching files (recursively) under a directory. diff --git a/src/process.c b/src/process.c index 2c758a4..14d7b6d 100644 --- a/src/process.c +++ b/src/process.c @@ -1108,7 +1108,9 @@ See `set-process-sentinel' for more info on sentinels. */) DEFUN ("set-process-window-size", Fset_process_window_size, Sset_process_window_size, 3, 3, 0, - doc: /* Tell PROCESS that it has logical window size HEIGHT and WIDTH. */) + doc: /* Tell PROCESS that it has logical window size WIDTH by HEIGHT. +Value is t if PROCESS was successfully told about the window size, +nil otherwise. */) (Lisp_Object process, Lisp_Object height, Lisp_Object width) { CHECK_PROCESS (process); commit dc662713e235c9c55c71636168af7e14519f180d Author: Michael Albinus Date: Fri May 6 17:53:18 2016 +0200 ; Fix typos and stylistic glitches in NEWS diff --git a/etc/NEWS b/etc/NEWS index 6c522e0..cfda333 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -89,7 +89,7 @@ build with 'make V=1'. --- ** The configure option '--with-gameuser' now allows you to specify a group instead of a user if its argument is prefixed by ':' (a colon). -This will cause the game score files in ${localstatedir}/games/emacs +This will cause the game score files in "${localstatedir}/games/emacs" to be owned by that group, and the helper program for updating them to be installed setgid. The option now defaults to the 'games' group. @@ -116,7 +116,7 @@ tests which take more time to perform. 'initial-buffer-choice' is non-nil, display both the file and 'initial-buffer-choice'. When Emacs is given more than one file and 'initial-buffer-choice' is non-nil, show 'initial-buffer-choice' -and *Buffer List*. This makes Emacs convenient to use from the +and '*Buffer List*'. This makes Emacs convenient to use from the command line when 'initial-buffer-choice' is non-nil. +++ @@ -192,14 +192,14 @@ added via the new Network Security Manager (NSM) and controlled via the 'network-security-level' variable. +++ -** C-h l now also lists the commands that were run. +** 'C-h l' now also lists the commands that were run. +++ -** x-select-enable-clipboard is renamed select-enable-clipboard -and x-select-enable-primary is renamed select-enable-primary. +** 'x-select-enable-clipboard' is renamed 'select-enable-clipboard' +and 'x-select-enable-primary' is renamed 'select-enable-primary'. Additionally they both now apply to all systems (OSX, GNUstep, Windows, you name it), with the proviso that on some systems (e.g. Windows) -select-enable-primary is ineffective since the system doesn't +'select-enable-primary' is ineffective since the system doesn't have the equivalent of a primary selection. +++ @@ -212,7 +212,7 @@ selected window is strongly dedicated to its buffer. 'even-window-sizes' and now handles window widths as well. +++ -** terpri gets an optional arg ENSURE to conditionally output a newline. +** 'terpri' gets an optional arg ENSURE to conditionally output a newline. +++ ** 'insert-register' now leaves point after the inserted text @@ -235,9 +235,9 @@ variable 'read-hide-char'. +++ ** The Emacs pseudo-random number generator can be securely seeded. -On system where Emacs can access the system entropy or some other +On systems where Emacs can access the system entropy or some other cryptographically secure random stream, it now uses that when 'random' -is called with its argument 't'. This allows cryptographically strong +is called with its argument t. This allows cryptographically strong random values; in particular, the Emacs server now uses this facility to produce its authentication key. @@ -248,7 +248,7 @@ to produce its authentication key. * Editing Changes in Emacs 25.1 +++ -** M-x suggests shorthands and ignores obsolete commands for completion. +** 'M-x' suggests shorthands and ignores obsolete commands for completion. ** Changes in undo @@ -270,19 +270,20 @@ affected by the command. ** New and improved facilities for inserting Unicode characters --- -*** Unicode names entered via C-x 8 RET now use substring completion by default. +*** Unicode names entered via 'C-x 8 RET' now use substring completion +by default. +++ -*** C-x 8 now has shorthands for several chars, such as U+2010 +*** 'C-x 8' now has shorthands for several chars, such as U+2010 (HYPHEN), U+2011 (NON-BREAKING HYPHEN), and U+2012 (FIGURE DASH). As -before, you can type C-x 8 C-h to list shorthands. +before, you can type 'C-x 8 C-h' to list shorthands. +++ -*** New minor mode electric-quote-mode for using curved quotes as you +*** New minor mode 'electric-quote-mode' for using curved quotes as you type. See also the new variable 'text-quoting-style'. --- -** New minor mode global-eldoc-mode is enabled by default. +** New minor mode 'global-eldoc-mode' is enabled by default. --- ** Emacs now uses "bracketed paste mode" on text terminals that support it. @@ -307,7 +308,7 @@ Bidirectional Parentheses Algorithm (BPA) specified by these Unicode standards. +++ -** You can access 'mouse-buffer-menu' (C-down-mouse-1) using C-f10. +** You can access 'mouse-buffer-menu' ('C-down-mouse-1') using 'C-f10'. +++ ** New buffer-local 'electric-pair-local-mode'. @@ -315,7 +316,7 @@ standards. +++ ** New variable 'fast-but-imprecise-scrolling' inhibits fontification during full screen scrolling operations, giving less -hesitant operation during auto-repeat of C-v, M-v at the cost of +hesitant operation during auto-repeat of 'C-v', 'M-v' at the cost of possible inaccuracies in the end position. +++ @@ -329,8 +330,8 @@ unsaved customizations and prompts user to customize (if found). It is intended for adding to 'kill-emacs-query-functions'. +++ -** The old 'C-x w' bindings in hi-lock-mode are officially deprecated -in favor of the global 'M-s h' bindings introduced in Emacs-23.1. +** The old 'C-x w' bindings in 'hi-lock-mode' are officially deprecated +in favor of the global 'M-s h' bindings introduced in Emacs 23.1. They'll disappear soon. @@ -355,13 +356,13 @@ emacs -batch --eval "(checkdoc-file \"subr.el\")" *** The desktop format version has been upgraded from 206 to 208. Although Emacs 25.1 can read a version 206 desktop, earlier Emacsen cannot read a version 208 desktop. To upgrade your desktop file, you -must explicitly request the upgrade, by C-u M-x desktop-save. You are +must explicitly request the upgrade, by 'C-u M-x desktop-save'. You are recommended to do this as soon as you have firmly upgraded to Emacs 25.1 (or later). Should you ever need to downgrade your desktop file -to version 206, you can do this with C-u C-u M-x desktop-save. +to version 206, you can do this with 'C-u C-u M-x desktop-save'. +++ -** New function 'bookmark-set-no-overwrite' bound to C-x r M. +** New function 'bookmark-set-no-overwrite' bound to 'C-x r M'. It raises an error if a bookmark of that name already exists, unlike 'bookmark-set' which silently updates an existing bookmark. @@ -468,10 +469,10 @@ being made case-sensitive in Emacs 24.2. **** New play/pause command 'mpc-toggle-play' bound to 's' **** 'g' bound to new command 'mpc-seek-current' will navigate current - track. +track. **** New commands 'mpc-toggle-{consume,repeat,single,shuffle}' for - toggling playback modes. +toggling playback modes. --- *** Now supports connecting to a UNIX domain socket. @@ -564,10 +565,10 @@ installed strictly as dependencies but are no longer needed. +++ ** Shell -When you invoke 'shell' interactively, the *shell* buffer will now +When you invoke 'shell' interactively, the '*shell*' buffer will now display in a new window. However, you can customize this behavior via the 'display-buffer-alist' variable. For example, to get -the old behavior -- *shell* buffer displays in current window -- use +the old behavior -- '*shell*' buffer displays in current window -- use (add-to-list 'display-buffer-alist '("^\\*shell\\*$" . (display-buffer-same-window))). @@ -588,13 +589,14 @@ If you need your objects to be named, do it by inheriting from 'eieio-named'. Use the equivalent facilities from cl-generic.el instead. +++ *** 'constructor' is now an obsolete alias for 'make-instance'. ---- 'pcase' accepts a new UPattern 'eieio'. +--- +*** 'pcase' accepts a new UPattern 'eieio'. ** ido +++ -*** New command 'ido-bury-buffer-at-head' bound to C-S-b -Bury the buffer at the head of 'ido-matches', analogous to how C-k +*** New command 'ido-bury-buffer-at-head' bound to 'C-S-b'. +Bury the buffer at the head of 'ido-matches', analogous to how 'C-k' kills the buffer at head. --- @@ -650,13 +652,13 @@ by searching commands to produce a regexp matching anything that character-folds into STRING. +++ -*** The new M-s M-w key binding uses eww to search the web for the +*** The new 'M-s M-w' key binding uses eww to search the web for the text in the region. The search engine to use for this is specified by the customizable variable 'eww-search-prefix'. +++ -*** Query-replace history is enhanced. -When query-replace reads the FROM string from the minibuffer, typing +*** 'query-replace' history is enhanced. +When 'query-replace' reads the FROM string from the minibuffer, typing 'M-p' will now show previous replacements as "FROM SEP TO", where FROM and TO are the original text and its replacement, and SEP is an arrow string defined by the new variable 'query-replace-from-to-separator'. @@ -670,19 +672,19 @@ typing RET. result of the calculation into the current buffer. +++ -** In Edebug, you can now set the initial mode with C-x C-a C-m. With -this you can tell Edebug not to stop at the start of the first +** In Edebug, you can now set the initial mode with 'C-x C-a C-m'. +With this you can tell Edebug not to stop at the start of the first instrumented function. ** ElDoc +++ -*** New minor mode 'global-eldoc-mode' +*** New minor mode 'global-eldoc-mode'. It is turned on by default, and affects '*scratch*' and other buffers whose major mode supports Emacs Lisp. --- -*** 'eldoc-documentation-function' now defaults to 'ignore' +*** 'eldoc-documentation-function' now defaults to 'ignore'. --- *** 'describe-char-eldoc' displays information about character at point, @@ -774,7 +776,7 @@ CLOS class and slot documentation. *** Rectangle Mark mode can have corners past EOL or in the middle of a TAB. +++ -*** C-x C-x in rectangle-mark-mode now cycles through the four corners. +*** 'C-x C-x' in 'rectangle-mark-mode' now cycles through the four corners. *** 'string-rectangle' provides on-the-fly preview of the result. +++ @@ -800,7 +802,7 @@ prepending it. ** Calendar and diary +++ -*** The default 'diary-file' is now located in .emacs.d. +*** The default 'diary-file' is now located in "~/.emacs.d". +++ *** New commands to insert diary entries with Chinese dates: @@ -877,7 +879,7 @@ to delete or undelete multiple messages. libxml2 or if you have the Lynx browser installed. By default, Rmail will display the HTML version of a mail message that has both HTML and plain text parts, if display of HTML email is possible; customize the -'rmail-mime-prefer-html' option to 'nil' if you don't want that. +'rmail-mime-prefer-html' option to nil if you don't want that. +++ *** In the commands that make summaries by subject, recipients, or senders, @@ -930,7 +932,7 @@ variable, meaning you can bind it around an 'url-retrieve' call. --- *** If URL is used with a https connection, the first callback argument -plist will contain a :peer element that has the output of +PLIST will contain a :peer element that has the output of 'gnutls-peer-status' (if Emacs is built with GnuTLS support). ** Tramp @@ -971,10 +973,10 @@ comments. +++ *** Basic push support, via 'vc-push', bound to 'C-x v P'. Implemented for Bzr, Git, Hg. As part of this change, the pre-existing -(undocumented) command vc-hg-push now behaves slightly differently. +(undocumented) command 'vc-hg-push' now behaves slightly differently. +++ -*** The new command vc-region-history shows the log+diff of the active region. +*** The new command 'vc-region-history' shows the log+diff of the active region. +++ *** You can refresh the VC state of a file buffer with 'M-x vc-refresh-state'. @@ -1059,7 +1061,7 @@ file name patterns. Defaults to files whose extension is one of '.h', *** New custom variable 'hide-ifdef-expand-reinclusion-protection' to prevent reinclusion protected (a.k.a. "idempotent") header files from being hidden. (This could happen when an idempotent header file is visited again, -when its guard symbol is already defined.) Defaults to 't'. +when its guard symbol is already defined.) Defaults to t. --- *** New custom variable 'hide-ifdef-exclude-define-regexp' to define symbol @@ -1092,7 +1094,7 @@ New options 'tildify-space-string', 'tildify-pattern', and helper functions) obsolete. +++ -** New package Xref replaces Etags's front-end and UI +** New package Xref replaces Etags's front-end and UI. The new package Xref provides a generic framework and new commands to find and move to definitions of functions, macros, data structures @@ -1204,7 +1206,8 @@ EUDC's PH backend (eudcb-ph.el) is obsolete. +++ *** The new built-in command 'clear' can scroll window contents out of sight. -If provided with an optional non-nil argument, the scrollback contents will be cleared. +If provided with an optional non-nil argument, the scrollback contents +will be cleared. +++ *** New buffer syntax '#', which is equivalent to @@ -1234,7 +1237,7 @@ make the new option 'eshell-destroy-buffer-when-process-dies' non-nil. *** Support for several ancient browsers is now officially obsolete. +++ -** tar-mode: new 'tar-new-entry' command, allowing for new members to +** 'tar-mode': new 'tar-new-entry' command, allowing for new members to be added to the archive. ** Autorevert @@ -1263,11 +1266,11 @@ notification descriptor still corresponds to an activate watch. ** Dired +++ -*** The command 'dired-do-compress' bound to 'Z' now can compress +*** The command 'dired-do-compress', bound to 'Z', now can compress directories and decompress zip files. +++ -*** New command 'dired-do-compress-to' bound to 'c' can be used to +*** New command 'dired-do-compress-to', bound to 'c', can be used to compress many marked files into a single named archive. The compression command is determined from the new 'dired-compress-files-alist' variable. @@ -1292,7 +1295,7 @@ call 'tabulated-list-init-header', in which case it will have no header. +++ -*** 'tabulated-list-print' takes a second optional argument, update, +*** 'tabulated-list-print' takes a second optional argument, UPDATE, which specifies an alternative printing method which is faster when few or no entries have changed. @@ -1322,11 +1325,11 @@ The main entry points are 'cl-defgeneric' and 'cl-defmethod'. See the node "Generic Functions" in the Emacs Lisp manual for more details. --- -** scss-mode (a minor variant of css-mode) is a major mode for editing +** 'scss-mode' (a minor variant of 'css-mode') is a major mode for editing SCSS (Sassy CSS) files. --- -** let-alist is a new macro (and a package) that allows one to easily +** 'let-alist' is a new macro (and a package) that allows one to easily let-bind the values stored in an alist. --- @@ -1352,7 +1355,7 @@ alists, hash-table and arrays. All functions are prefixed with evaluation of forms. --- -** js-jsx-mode (a minor variant of js-mode) provides indentation +** 'js-jsx-mode' (a minor variant of 'js-mode') provides indentation support for JSX, an XML-like syntax extension to ECMAScript. @@ -1366,8 +1369,8 @@ eliminated. +++ ** 'syntax-begin-function' is declared obsolete. -Removed font-lock-beginning-of-syntax-function and the SYNTAX-BEGIN -slot in font-lock-defaults. +Removed 'font-lock-beginning-of-syntax-function' and the SYNTAX-BEGIN +slot in 'font-lock-defaults'. +++ ** The new implementation of Subword mode affects word movement everywhere. @@ -1399,24 +1402,24 @@ pointer shape during dragging, should bind the variable 'track-mouse' to the special value 'dragging' in the body of the form. --- -** The optional 'predicate' argument of 'lisp-complete-symbol' no longer +** The optional PREDICATE argument of 'lisp-complete-symbol' no longer has any effect. (This change was made in Emacs 24.4 but was not advertised at the time.) +++ ** 'indirect-function' does not signal 'void-function' any more. This is mostly a bug-fix, since this change was missed back in 24.4 when -symbol-function was changed not to signal 'void-function' any more. +'symbol-function' was changed not to signal 'void-function' any more. +++ *** As a consequence, the second arg of 'indirect-function' is now obsolete. +++ -** M-x shell and M-x compile no longer set the EMACS environment variable. +** 'M-x shell' and 'M-x compile' no longer set the EMACS environment variable. This avoids clashing when other programs use the variable for other purposes. -Although M-x term still sets EMACS for compatibility with Bash 4.3 and earlier, -this is deprecated and will be phased out when Bash 4.4 or later takes over. -Use the INSIDE_EMACS environment variable instead. +Although 'M-x term' still sets EMACS for compatibility with Bash 4.3 +and earlier, this is deprecated and will be phased out when Bash 4.4 +or later takes over. Use the INSIDE_EMACS environment variable instead. +++ ** 'save-excursion' does not save&restore the mark any more. @@ -1424,31 +1427,31 @@ Use 'save-mark-and-excursion' if you want the old behavior. +++ ** 'read-buffer' and 'read-buffer-function' can now be called with a 4th -argument ('predicate'). +argument (PREDICATE). +++ ** 'completion-table-dynamic' by default stays in the minibuffer. The minibuffer will be the current buffer when the function is called. If you want the old behavior of calling the function in the buffer from which the minibuffer was entered, use the new argument -'switch-buffer' to 'completion-table-dynamic'. +SWITCH-BUFFER to 'completion-table-dynamic'. --- ** window-configurations no longer record the buffers' marks. --- -** inhibit-modification-hooks now also inhibits lock-file checks, as well as -active region handling. +** 'inhibit-modification-hooks' now also inhibits lock-file checks, as +well as active region handling. +++ -** deactivate-mark is now buffer-local. +** 'deactivate-mark' is now buffer-local. +++ ** 'cl-the' now asserts that its argument is of the given type. +++ ** 'process-running-child-p' may now return a numeric process -group ID instead of 't'. +group ID instead of t. +++ ** Mouse click events on mode line or header line no longer include @@ -1458,7 +1461,7 @@ position list returned for such events is now nil. --- ** Menu items in keymaps do not support the "key shortcut cache" any more. These slots used to hold key-shortcut data, but have been obsolete since -Emacs-21. +Emacs 21. --- ** Emacs no longer downcases the first letter of a system diagnostic @@ -1484,7 +1487,7 @@ not affected by 'text-quoting-style', e.g., (message "%s" (format "...." foo bar)). +++ -** substitute-command-keys now replaces quotes. +** 'substitute-command-keys' now replaces quotes. That is, it converts documentation strings' quoting style as per the value of 'text-quoting-style'. Doc strings in source code can use either curved single quotes or grave accents and apostrophes. As @@ -1528,7 +1531,7 @@ that happen, 'unhandled-file-name-directory' now defaults to calling * Lisp Changes in Emacs 25.1 -** pcase +** 'pcase' +++ *** New UPatterns 'quote', 'app'. +++ @@ -1537,7 +1540,7 @@ that happen, 'unhandled-file-name-directory' now defaults to calling *** New vector QPattern. --- -** syntax-propertize is now automatically called on-demand during forward +** 'syntax-propertize' is now automatically called on-demand during forward parsing functions like 'forward-sexp'. +++ @@ -1552,7 +1555,7 @@ file byte offsets, given the file's encoding. +++ ** The default value of 'load-read-function' is now 'read'. -Previously, the default value of 'nil' implied using 'read'. +Previously, the default value of nil implied using 'read'. +++ ** New hook 'pre-redisplay-functions'. @@ -1569,13 +1572,13 @@ implemented by the new 'cursor-intangible-mode' and 'cursor-sensor-mode' minor modes. +++ -** 'inhibit-point-motion-hooks' now defaults to 't' and is obsolete. +** 'inhibit-point-motion-hooks' now defaults to t and is obsolete. Use the new minor modes 'cursor-intangible-mode' and 'cursor-sensor-mode' instead. +++ ** New process type 'pipe', which can be used in combination with the -':stderr' keyword of make-process to handle standard error output +':stderr' keyword of 'make-process' to handle standard error output of subprocess. +++ @@ -1591,7 +1594,7 @@ files (recursively) under a directory. +++ ** New variable 'inhibit-message', when bound to non-nil, inhibits 'message' and related functions from displaying messages in the echo -area. The output is still logged to the *Messages* buffer. +area. The output is still logged to the '*Messages*' buffer. +++ ** A new text property 'inhibit-read-only' can be used in read-only @@ -1599,8 +1602,8 @@ buffers to allow certain parts of the text to be writable. +++ ** A new variable 'comment-end-can-be-escaped' is useful in languages - such as C and C++ where line comments with escaped newlines are - continued to the next line. +such as C and C++ where line comments with escaped newlines are +continued to the next line. +++ ** New macro 'define-advice'. @@ -1615,24 +1618,24 @@ See the "Finalizer Type" subsection in the ELisp manual for the details. --- -** lexical closures can use (:documentation FORM) to build their docstring. +** Lexical closures can use '(:documentation FORM)' to build their docstring. It should be placed right where the docstring would be, and FORM is then evaluated (and should return a string) when the closure is built. +++ -** define-inline provides a new way to define inlinable functions. +** 'define-inline' provides a new way to define inlinable functions. +++ ** New function 'macroexpand-1' to perform a single step of macro expansion. +++ ** Some "x-*" functions were obsoleted and/or renamed: -*** x-select-text is renamed gui-select-text. -*** x-selection-value is renamed gui-selection-value. -*** x-get-selection is renamed gui-get-selection. -*** x-get-clipboard and x-clipboard-yank are marked obsolete. -*** x-get-selection-value is renamed to gui-get-primary-selection. -*** x-set-selection is renamed to gui-set-selection +*** 'x-select-text' is renamed 'gui-select-text'. +*** 'x-selection-value' is renamed 'gui-selection-value'. +*** 'x-get-selection' is renamed 'gui-get-selection'. +*** 'x-get-clipboard' and 'x-clipboard-yank' are marked obsolete. +*** 'x-get-selection-value' is renamed to 'gui-get-primary-selection'. +*** 'x-set-selection' is renamed to 'gui-set-selection'. +++ ** New function 'string-greaterp', which return the opposite result of @@ -1691,9 +1694,9 @@ text and directional control characters. +++ ** New properties that can be specified with 'declare': -*** (interactive-only INSTEAD), says to use INSTEAD for non-interactive use. -*** (pure VAL), if VAL is non-nil, indicates the function is pure. -*** (side-effect-free VAL), if VAL is non-nil, indicates the function does not +*** '(interactive-only INSTEAD)', says to use INSTEAD for non-interactive use. +*** '(pure VAL)', if VAL is non-nil, indicates the function is pure. +*** '(side-effect-free VAL)', if VAL is non-nil, indicates the function does not have side effects. +++ @@ -1752,10 +1755,12 @@ font, and (iii) the specified window. --- ** New utilities in subr-x.el: + *** New macros 'if-let' and 'when-let' allow defining bindings and to - execute code depending whether all values are true. +execute code depending whether all values are true. + *** New macros 'thread-first' and 'thread-last' allow threading a form - as the first or last argument of subsequent forms. +as the first or last argument of subsequent forms. +++ ** Documentation strings now support quoting with curved single quotes @@ -1774,7 +1779,7 @@ curved single quotes, grave accents and apostrophes as per 'text-quoting-style'. +++ -** show-help-function's arg is converted via substitute-command-keys +** 'show-help-function's arg is converted via 'substitute-command-keys' before being passed to the function. Help strings, help-echo properties, etc. can therefore contain command key escapes and quotation marks. @@ -1824,12 +1829,12 @@ the name is a directory separator character (forward slash on GNU and Unix systems, forward- or backslash on MS-Windows and MS-DOS). --- -** ASCII approximations to curved quotes are put in standard-display-table +** ASCII approximations to curved quotes are put in 'standard-display-table' if the terminal cannot display curved quotes. +++ ** Standard output and error streams now transliterate characters via -standard-display-table, and encode output using locale-coding-system. +'standard-display-table', and encode output using 'locale-coding-system'. To force a specific encoding, bind 'coding-system-for-write' to the coding-system of your choice when invoking functions like 'prin1' and 'message'. @@ -1856,30 +1861,30 @@ provide toolkit scroll bars, namely Gtk+, Lucid, Motif and Windows. Horizontal scroll bars are turned off by default. **** New function 'horizontal-scroll-bars-available-p' telling whether - horizontal scroll bars are available on the underlying system. +horizontal scroll bars are available on the underlying system. **** New mode 'horizontal-scroll-bar-mode' to toggle horizontal scroll - bars on all existing and future frames. +bars on all existing and future frames. **** New function 'toggle-horizontal-scroll-bar' to toggle horizontal - scroll bars on the selected frame. +scroll bars on the selected frame. **** New frame parameters 'horizontal-scroll-bars' and - 'scroll-bar-height' to set horizontal scroll bars and their height - for individual frames and in 'default-frame-alist'. +'scroll-bar-height' to set horizontal scroll bars and their height +for individual frames and in 'default-frame-alist'. **** New functions 'frame-scroll-bar-height' and - 'window-scroll-bar-height' return the height of horizontal scroll - bars on a specific frame or window. +'window-scroll-bar-height' return the height of horizontal scroll +bars on a specific frame or window. **** 'set-window-scroll-bars' now accepts five parameters where the last - two specify height and type of the window's horizontal scroll bar. +two specify height and type of the window's horizontal scroll bar. **** 'window-scroll-bars' now returns type and sizes of horizontal scroll - bars too. +bars too. **** New buffer-local variables 'horizontal-scroll-bar' and - 'scroll-bar-height'. +'scroll-bar-height'. +++ *** New functions 'frame-geometry' and 'frame-edges' give access to a @@ -1918,10 +1923,11 @@ they display when setting default font, menu bar, fringe width, or scroll bars. In particular, maximized and fullscreen frames are conceptually never resized if such settings change. For fullheight and fullwidth frames, the behavior may depend on the toolkit used. + **** New option 'frame-inhibit-implied-resize' if non-nil, means that - setting default font, menu bar, fringe width, or scroll bars of a - specific frame does not resize that frame in order to preserve the - number of columns or lines it displays. +setting default font, menu bar, fringe width, or scroll bars of a +specific frame does not resize that frame in order to preserve the +number of columns or lines it displays. +++ *** New function 'window-preserve-size' allows you to preserve the size of @@ -1991,7 +1997,7 @@ whitespace at line beginning. * Changes in Emacs 25.1 on Non-Free Operating Systems --- -** MS-Windows specific Emacs build scripts are no longer in the distribution +** MS-Windows specific Emacs build scripts are no longer in the distribution. This includes the makefile.w32-in files in various subdirectories, and the support files. The file nt/configure.bat now just tells the user to use the procedure described in nt/INSTALL, by running the Posix commit c760a600da6dbfa495613aa5042ab073b9490c85 Author: Michael Albinus Date: Thu May 5 10:23:06 2016 +0200 tramp-sh.el: Work around a stat bug (backport from master) * lisp/net/tramp-sh.el (tramp-get-remote-stat): Do not use stat versions which produce shell quoted output. See also coreutils Bug#23422. (cherry picked from commit 6aad36ace9953b9672b13be68416d205532d5e59) diff --git a/lisp/net/tramp-sh.el b/lisp/net/tramp-sh.el index 4d529f7..bff6ec3 100644 --- a/lisp/net/tramp-sh.el +++ b/lisp/net/tramp-sh.el @@ -5522,13 +5522,15 @@ Return ATTR." vec "stat" (tramp-get-remote-path vec))) tmp) ;; Check whether stat(1) returns usable syntax. "%s" does not - ;; work on older AIX systems. + ;; work on older AIX systems. Recent GNU stat versions (8.24?) + ;; use shell quoted format for "%N", we check the boundaries "`" + ;; and "'", therefore. See Bug#23422 in coreutils. (when result (setq tmp (tramp-send-command-and-read vec (format "%s -c '(\"%%N\" %%s)' /" result) 'noerror)) (unless (and (listp tmp) (stringp (car tmp)) - (string-match "^./.$" (car tmp)) + (string-match "^`/'$" (car tmp)) (integerp (cadr tmp))) (setq result nil))) result)))