commit 3c810669f7b913f63049826a89e08c1691767506 (HEAD, refs/remotes/origin/master) Author: Stefan Kangas Date: Thu Apr 30 10:36:54 2020 +0200 Use lexical-binding in qp.el and add tests * test/lisp/mail/qp-tests.el: New file. * lisp/mail/qp.el: Use lexical-binding. diff --git a/lisp/mail/qp.el b/lisp/mail/qp.el index 388c3981c9..35ff47fd09 100644 --- a/lisp/mail/qp.el +++ b/lisp/mail/qp.el @@ -1,4 +1,4 @@ -;;; qp.el --- Quoted-Printable functions +;;; qp.el --- Quoted-Printable functions -*- lexical-binding:t -*- ;; Copyright (C) 1998-2020 Free Software Foundation, Inc. diff --git a/test/lisp/mail/qp-tests.el b/test/lisp/mail/qp-tests.el new file mode 100644 index 0000000000..8d70449933 --- /dev/null +++ b/test/lisp/mail/qp-tests.el @@ -0,0 +1,74 @@ +;;; qp-tests.el --- Tests for qp.el -*- lexical-binding:t; coding:utf-8 -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; Author: Stefan Kangas + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'qp) + +;; Quote by Antoine de Saint-Exupéry, Citadelle (1948) +;; from https://en.wikipedia.org/wiki/Quoted-printable +(defvar qp-tests-quote-qp + (concat "J'interdis aux marchands de vanter trop leurs marchandises. Car ils se font =\n" + "vite p=C3=A9dagogues et t'enseignent comme but ce qui n'est par essence qu'=\n" + "un moyen, et te trompant ainsi sur la route =C3=A0 suivre les voil=C3=A0 bi=\n" + "ent=C3=B4t qui te d=C3=A9gradent, car si leur musique est vulgaire ils te f=\n" + "abriquent pour te la vendre une =C3=A2me vulgaire.")) +(defvar qp-tests-quote-utf8 + (concat "J'interdis aux marchands de vanter trop leurs marchandises. Car ils se font " + "vite pédagogues et t'enseignent comme but ce qui n'est par essence qu'" + "un moyen, et te trompant ainsi sur la route à suivre les voilà bi" + "entôt qui te dégradent, car si leur musique est vulgaire ils te f" + "abriquent pour te la vendre une âme vulgaire.")) + +(ert-deftest qp-test--quoted-printable-decode-region () + (with-temp-buffer + (insert qp-tests-quote-qp) + (encode-coding-region (point-min) (point-max) 'utf-8) + (quoted-printable-decode-region (point-min) (point-max) 'utf-8) + (should (equal (buffer-string) qp-tests-quote-utf8)))) + +(ert-deftest qp-test--quoted-printable-decode-string () + (should (equal (quoted-printable-decode-string "foo!") "foo!")) + (should (equal (quoted-printable-decode-string "=0C") "\^L")) + (should (equal (quoted-printable-decode-string "=3D") "=")) + (should (equal (quoted-printable-decode-string "=A1Hola, se=F1or!?") + "\241Hola, se\361or!?"))) + +(ert-deftest qp-test--quoted-printable-encode-region () + (with-temp-buffer + (insert (make-string 26 ?=)) + ;; (encode-coding-region (point-min) (point-max) 'utf-8) + (quoted-printable-encode-region (point-min) (point-max) t) + (should (equal (buffer-string) + (concat "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D" + "=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=\n=3D"))))) + +(ert-deftest qp-test--quoted-printable-encode-string () + (should (equal (quoted-printable-encode-string "\241Hola, se\361or!?") + "=A1Hola, se=F1or!?")) + ;; Multibyte character. + (should-error (quoted-printable-encode-string "å"))) + +(provide 'qp-tests) +;;; qp-tests.el ends here commit 6c1b12e7d2ff38e313eae97bfd01746ecacdb02f Author: Lars Ingebrigtsen Date: Thu Apr 30 06:05:17 2020 +0200 Add new function dom-remove-attribute * doc/lispref/text.texi (Document Object Model): Document it. * lisp/dom.el (dom-remove-attribute): Add new function. diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index 58424a4231..9317362a70 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -5161,6 +5161,9 @@ The following are functions for altering the @acronym{DOM}. @item dom-set-attribute @var{node} @var{attribute} @var{value} Set the @var{attribute} of the node to @var{value}. +@item dom-remove-attribute @var{node} @var{attribute} +Remove @var{attribute} from @var{node}. + @item dom-append-child @var{node} @var{child} Append @var{child} as the last child of @var{node}. diff --git a/etc/NEWS b/etc/NEWS index 025d5c14a7..c4911726a8 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -358,6 +358,9 @@ optional argument specifying whether to follow symbolic links. ** 'parse-time-string' can now parse ISO 8601 format strings, such as "2020-01-15T16:12:21-08:00". ++++ +** The new function 'dom-remove-attribute' has been added. + --- ** 'make-network-process', 'make-serial-process' :coding behavior change. Previously, passing ":coding nil" to either of these functions would diff --git a/lisp/dom.el b/lisp/dom.el index 34df0e9af4..7ff9e07b72 100644 --- a/lisp/dom.el +++ b/lisp/dom.el @@ -67,6 +67,12 @@ (setcdr old value) (setcar (cdr node) (nconc (cadr node) (list (cons attribute value))))))) +(defun dom-remove-attribute (node attribute) + "Remove ATTRIBUTE from NODE." + (setq node (dom-ensure-node node)) + (when-let ((old (assoc attribute (cadr node)))) + (setcar (cdr node) (delq old (cadr node))))) + (defmacro dom-attr (node attr) "Return the attribute ATTR from NODE. A typical attribute is `href'." diff --git a/test/lisp/dom-tests.el b/test/lisp/dom-tests.el index d44851eb13..eb15500d84 100644 --- a/test/lisp/dom-tests.el +++ b/test/lisp/dom-tests.el @@ -84,6 +84,13 @@ (dom-set-attribute dom attr value) (should (equal (dom-attr dom attr) value)))) +(ert-deftest dom-tests-remove-attribute () + (let ((dom `(body ((foo . "bar") (zot . "foobar"))))) + (should (equal (dom-attr dom 'foo) "bar")) + (dom-remove-attribute dom 'foo) + (should (equal (dom-attr dom 'foo) nil)) + (should (equal dom '(body ((zot . "foobar"))))))) + (ert-deftest dom-tests-attr () (let ((dom (dom-tests--tree))) (should-not (dom-attr dom 'id)) commit 0a982c077e7393d865622ff780906a0cb252348d Author: Stephen Gildea Date: Wed Apr 29 07:36:07 2020 -0700 Test iso8601-parse-zone vs format-time-string %z * test/lisp/calendar/iso8601-tests.el (iso8601-format-time-string-zone-round-trip): New unit test that format-time-string %z and iso8601-parse-zone are inverses. (test-iso8601-format-time-string-zone-round-trip): New helper function. diff --git a/test/lisp/calendar/iso8601-tests.el b/test/lisp/calendar/iso8601-tests.el index e8b155a7aa..c835f5792b 100644 --- a/test/lisp/calendar/iso8601-tests.el +++ b/test/lisp/calendar/iso8601-tests.el @@ -232,6 +232,37 @@ (should (equal (iso8601-parse-time "15:27:46-05") '(46 27 15 nil nil nil nil nil -18000)))) + +(defun test-iso8601-format-time-string-zone-round-trip (offset-minutes z-format) + "Pass OFFSET-MINUTES to format-time-string with Z-FORMAT, a %z variation, +and then to iso8601-parse-zone. The result should be the original offset." + (let* ((offset-seconds (* 60 offset-minutes)) + (zone-string (format-time-string z-format 0 offset-seconds)) + (offset-rt + (condition-case nil + (iso8601-parse-zone zone-string) + (wrong-type-argument (format "(failed to parse %S)" zone-string)))) + ;; compare strings that contain enough info to debug failures + (success (format "%s(%s) -> %S -> %s" + z-format offset-minutes zone-string offset-minutes)) + (actual (format "%s(%s) -> %S -> %s" + z-format offset-minutes zone-string offset-rt))) + (should (equal success actual)))) + +(ert-deftest iso8601-format-time-string-zone-round-trip () + "Round trip zone offsets through format-time-string and iso8601-parse-zone. +Passing a time zone created by format-time-string %z to +iso8601-parse-zone should yield the original offset." + (dolist (offset-minutes + (list + ;; compare hours (1- and 2-digit), minutes, both, neither + (* 5 60) (* 11 60) 5 11 (+ (* 5 60) 30) (+ (* 11 60) 30) 0 + ;; do negative values, too + (* -5 60) (* -11 60) -5 -11 (- (* -5 60) 30) (- (* -11 60) 30))) + (dolist (z-format '("%z" "%:z" "%:::z")) + (test-iso8601-format-time-string-zone-round-trip + offset-minutes z-format)))) + (ert-deftest standard-test-date-and-time-of-day () (should (equal (iso8601-parse "19850412T101530") '(30 15 10 12 4 1985 nil -1 nil))) commit b56401f3849cf6d00717ab8a64a221f2c01455a6 Merge: 17eae91cb1 2f9bfaef21 Author: Glenn Morris Date: Wed Apr 29 07:50:20 2020 -0700 Merge from origin/emacs-27 2f9bfaef21 (origin/emacs-27) ; Fix last change 520fd3e728 * lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948) 85544f8ef5 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting... d83cc05a73 Fix error in ERC when 'erc-server-coding-system' is custom... 16fed05ba8 Avoid crashes on TTY frames with over-long compositions 0278741676 Fix typo in custom.texi 9f5ae717fb * test/lisp/simple-tests.el (with-shell-command-dont-erase... 1f76a16ed3 * lisp/image-mode.el (image-mode-map): Update menu items. f0e1bf56f0 Fix bugs in tab-bar and tab-line and mention remaining fea... f0b9f18457 Make shell-command tests fit for tcsh. 68f4a740a1 Remove doc duplication ac31cd384c * etc/NEWS: Fix inconsistencies. # Conflicts: # etc/NEWS commit 2f9bfaef21043d7894334b33b8538a165250f499 Author: Eli Zaretskii Date: Wed Apr 29 14:15:03 2020 +0300 ; Fix last change diff --git a/lisp/env.el b/lisp/env.el index c2cf0888eb..6de90385a3 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -68,10 +68,10 @@ with a character not a letter, digit or underscore; otherwise, enclose the entire variable name in braces. For instance, in `ab$cd-x', `$cd' is treated as an environment variable. -If WHEN-UNDEFINED is nil, references to undefined environment variables -are replaced by the empty string; if it is a function, the function is called -with the variable name as argument and should return the text with which -to replace it or nil to leave it unchanged. +If WHEN-UNDEFINED is omitted or nil, references to undefined environment +variables are replaced by the empty string; if it is a function, the +function is called with the variable's name as argument, and should return +the text with which to replace it, or nil to leave it unchanged. If it is non-nil and not a function, references to undefined variables are left unchanged. commit 520fd3e728d46702a04f6a19f23ed64a66900d51 Author: Eli Zaretskii Date: Wed Apr 29 14:06:35 2020 +0300 * lisp/env.el (substitute-env-vars): Doc fix. (Bug#40948) diff --git a/lisp/env.el b/lisp/env.el index ca2a9773b4..c2cf0888eb 100644 --- a/lisp/env.el +++ b/lisp/env.el @@ -68,7 +68,7 @@ with a character not a letter, digit or underscore; otherwise, enclose the entire variable name in braces. For instance, in `ab$cd-x', `$cd' is treated as an environment variable. -If WHEN-DEFINED is nil, references to undefined environment variables +If WHEN-UNDEFINED is nil, references to undefined environment variables are replaced by the empty string; if it is a function, the function is called with the variable name as argument and should return the text with which to replace it or nil to leave it unchanged. commit 17eae91cb1b45711be676bce79bcc5fcd7df2d3d Author: Stefan Kangas Date: Wed Apr 29 10:28:07 2020 +0200 Use lexical-binding in most eshell tests * test/lisp/eshell/em-hist-tests.el: * test/lisp/eshell/em-ls-tests.el: * test/lisp/eshell/esh-opt-tests.el: Use lexical-binding. diff --git a/test/lisp/eshell/em-hist-tests.el b/test/lisp/eshell/em-hist-tests.el index a08a7a2afc..5bb16f64a4 100644 --- a/test/lisp/eshell/em-hist-tests.el +++ b/test/lisp/eshell/em-hist-tests.el @@ -1,4 +1,4 @@ -;;; tests/em-hist-tests.el --- em-hist test suite +;;; tests/em-hist-tests.el --- em-hist test suite -*- lexical-binding:t -*- ;; Copyright (C) 2017-2020 Free Software Foundation, Inc. diff --git a/test/lisp/eshell/em-ls-tests.el b/test/lisp/eshell/em-ls-tests.el index da3e224a94..975701e383 100644 --- a/test/lisp/eshell/em-ls-tests.el +++ b/test/lisp/eshell/em-ls-tests.el @@ -1,4 +1,4 @@ -;;; tests/em-ls-tests.el --- em-ls test suite +;;; tests/em-ls-tests.el --- em-ls test suite -*- lexical-binding:t -*- ;; Copyright (C) 2017-2020 Free Software Foundation, Inc. diff --git a/test/lisp/eshell/esh-opt-tests.el b/test/lisp/eshell/esh-opt-tests.el index af6c089c16..caba153cf7 100644 --- a/test/lisp/eshell/esh-opt-tests.el +++ b/test/lisp/eshell/esh-opt-tests.el @@ -1,4 +1,4 @@ -;;; tests/esh-opt-tests.el --- esh-opt test suite +;;; tests/esh-opt-tests.el --- esh-opt test suite -*- lexical-binding:t -*- ;; Copyright (C) 2018-2020 Free Software Foundation, Inc. commit 702d9d86f2a7ba9df693a1140565aa111135f1bb Author: Stefan Kangas Date: Wed Apr 29 09:52:34 2020 +0200 Add new tests to bindat-tests.el * test/lisp/emacs-lisp/bindat-tests.el (bindat-test-format-vector) (bindat-test-vector-to-dec, bindat-test-vector-to-hex) (bindat-test-ip-to-string): New tests. * lisp/emacs-lisp/bindat.el (bindat-vector-to-hex): Fix typo. diff --git a/lisp/emacs-lisp/bindat.el b/lisp/emacs-lisp/bindat.el index b5d99e3451..d168c25512 100644 --- a/lisp/emacs-lisp/bindat.el +++ b/lisp/emacs-lisp/bindat.el @@ -632,7 +632,7 @@ If optional second arg SEP is a string, use that as separator." (bindat-format-vector vect "%d" (if (stringp sep) sep "."))) (defun bindat-vector-to-hex (vect &optional sep) - "Format vector VECT in hex format separated by dots. + "Format vector VECT in hex format separated by colons. If optional second arg SEP is a string, use that as separator." (bindat-format-vector vect "%02x" (if (stringp sep) sep ":"))) diff --git a/test/lisp/emacs-lisp/bindat-tests.el b/test/lisp/emacs-lisp/bindat-tests.el index f8efa7902a..14f95a8bf8 100644 --- a/test/lisp/emacs-lisp/bindat-tests.el +++ b/test/lisp/emacs-lisp/bindat-tests.el @@ -96,4 +96,20 @@ (dest-ip . [192 168 1 100])))))) +(ert-deftest bindat-test-format-vector () + (should (equal (bindat-format-vector [1 2 3] "%d" "x" 2) "1x2")) + (should (equal (bindat-format-vector [1 2 3] "%d" "x") "1x2x3"))) + +(ert-deftest bindat-test-vector-to-dec () + (should (equal (bindat-vector-to-dec [1 2 3]) "1.2.3")) + (should (equal (bindat-vector-to-dec [2048 1024 512] ".") "2048.1024.512"))) + +(ert-deftest bindat-test-vector-to-hex () + (should (equal (bindat-vector-to-hex [1 2 3]) "01:02:03")) + (should (equal (bindat-vector-to-hex [2048 1024 512] ".") "800.400.200"))) + +(ert-deftest bindat-test-ip-to-string () + (should (equal (bindat-ip-to-string [192 168 0 1]) "192.168.0.1")) + (should (equal (bindat-ip-to-string "\300\250\0\1") "192.168.0.1"))) + ;;; bindat-tests.el ends here commit c8115e88f180bf33154dcc9de9767bba797af827 Author: Stefan Kangas Date: Wed Apr 29 00:11:56 2020 +0200 Use lexical-binding in float-sup.el and add tests * lisp/emacs-lisp/float-sup.el: Use lexical-binding. * test/lisp/emacs-lisp/float-sup-tests.el: New file. diff --git a/lisp/emacs-lisp/float-sup.el b/lisp/emacs-lisp/float-sup.el index 50b157b16a..d92ca5b933 100644 --- a/lisp/emacs-lisp/float-sup.el +++ b/lisp/emacs-lisp/float-sup.el @@ -1,4 +1,4 @@ -;;; float-sup.el --- define some constants useful for floating point numbers. +;;; float-sup.el --- define some constants useful for floating point numbers. -*- lexical-binding:t -*- ;; Copyright (C) 1985-1987, 2001-2020 Free Software Foundation, Inc. diff --git a/test/lisp/emacs-lisp/float-sup-tests.el b/test/lisp/emacs-lisp/float-sup-tests.el new file mode 100644 index 0000000000..9f9a3daa28 --- /dev/null +++ b/test/lisp/emacs-lisp/float-sup-tests.el @@ -0,0 +1,33 @@ +;;; float-sup-tests.el --- Tests for float-sup.el -*- lexical-binding:t -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) + +(ert-deftest float-sup-degrees-and-radians () + (should (equal (degrees-to-radians 180.0) float-pi)) + (should (equal (radians-to-degrees float-pi) 180.0)) + (should (equal (radians-to-degrees (degrees-to-radians 360.0)) 360.0)) + (should (equal (degrees-to-radians (radians-to-degrees float-pi)) float-pi))) + +(provide 'float-sup-tests) +;;; float-sup-tests.el ends here commit 85544f8ef5dafee4425d011dc2067c3bca1305a6 Author: Juri Linkov Date: Wed Apr 29 02:49:44 2020 +0300 * lisp/isearch.el: Fix lazy-highlighting and lazy-counting of hidden matches * lisp/isearch.el (isearch-lazy-highlight-search): Let-bind search-invisible to t when search-invisible is 'open' or when both isearch-lazy-count and search-invisible are non-nil. (Bug#40808) diff --git a/lisp/isearch.el b/lisp/isearch.el index ddf9190dc6..1a414830ee 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el @@ -319,7 +319,7 @@ this variable is set to the symbol `all-windows'." "Show match numbers in the search prompt. When both this option and `isearch-lazy-highlight' are non-nil, show the current match number and the total number of matches -in the buffer (or its restriction)." +in the buffer (or its restriction), including all hidden matches." :type 'boolean :group 'lazy-count :group 'isearch @@ -3866,7 +3866,10 @@ Attempt to do the search exactly the way the pending Isearch would." (isearch-regexp-lax-whitespace isearch-lazy-highlight-regexp-lax-whitespace) (isearch-forward isearch-lazy-highlight-forward) - (search-invisible nil) ; don't match invisible text + ;; Don't match invisible text unless it can be opened + ;; or when counting matches and user can visit hidden matches + (search-invisible (or (eq search-invisible 'open) + (and isearch-lazy-count search-invisible))) (retry t) (success nil)) ;; Use a loop like in `isearch-search'. commit f998e6297dde6c968f7a9f9a5a959d3533c45f02 Author: Stefan Kangas Date: Tue Apr 28 23:54:28 2020 +0200 Use lexical-binding in rfc2368.el and add tests * lisp/mail/rfc2368.el: Use lexical-binding. * test/lisp/mail/rfc2368-tests.el: New file. diff --git a/lisp/mail/rfc2368.el b/lisp/mail/rfc2368.el index 7b38288be2..afa3059005 100644 --- a/lisp/mail/rfc2368.el +++ b/lisp/mail/rfc2368.el @@ -1,4 +1,4 @@ -;;; rfc2368.el --- support for rfc2368 +;;; rfc2368.el --- support for rfc2368 -*- lexical-binding:t -*- ;; Copyright (C) 1998, 2000-2020 Free Software Foundation, Inc. diff --git a/test/lisp/mail/rfc2368-tests.el b/test/lisp/mail/rfc2368-tests.el new file mode 100644 index 0000000000..c35b8e33ad --- /dev/null +++ b/test/lisp/mail/rfc2368-tests.el @@ -0,0 +1,39 @@ +;;; rfc2368-tests.el --- Tests for rfc2368.el -*- lexical-binding:t -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) +(require 'rfc2368) + +(ert-deftest rfc2368-unhexify-string () + (should (equal (rfc2368-unhexify-string "hello%20there") "hello there"))) + +(ert-deftest rfc2368-parse-mailto-url () + (should (equal (rfc2368-parse-mailto-url "mailto:foo@example.org?subject=Foo&bar=baz") + '(("To" . "foo@example.org") ("Subject" . "Foo") ("Bar" . "baz")))) + (should (equal (rfc2368-parse-mailto-url "mailto:foo@bar.com?to=bar@example.org") + '(("To" . "foo@bar.com, bar@example.org")))) + (should (equal (rfc2368-parse-mailto-url "mailto:foo@bar.com?subject=bar%20baz") + '(("To" . "foo@bar.com") ("Subject" . "bar baz"))))) + +(provide 'rfc2368-tests) +;;; rfc2368-tests.el ends here commit e309b329bb42fdf65a1ca0792859d099d04010da Author: Stefan Kangas Date: Tue Apr 28 23:35:00 2020 +0200 Use lexical-binding in version.el and add tests * lisp/version.el: Use lexical-binding. * test/lisp/version-tests.el: New file. diff --git a/lisp/version.el b/lisp/version.el index 012cb2175e..046b4a2ded 100644 --- a/lisp/version.el +++ b/lisp/version.el @@ -1,4 +1,4 @@ -;;; version.el --- record version number of Emacs +;;; version.el --- record version number of Emacs -*- lexical-binding:t -*- ;; Copyright (C) 1985, 1992, 1994-1995, 1999-2020 Free Software ;; Foundation, Inc. diff --git a/test/lisp/version-tests.el b/test/lisp/version-tests.el new file mode 100644 index 0000000000..8fbd4a19fc --- /dev/null +++ b/test/lisp/version-tests.el @@ -0,0 +1,31 @@ +;;; version-tests.el --- Tests for version.el -*- lexical-binding: t -*- + +;; Copyright (C) 2020 Free Software Foundation, Inc. + +;; This file is part of GNU Emacs. + +;; GNU Emacs is free software: you can redistribute it and/or modify +;; it under the terms of the GNU General Public License as published by +;; the Free Software Foundation, either version 3 of the License, or +;; (at your option) any later version. + +;; GNU Emacs is distributed in the hope that it will be useful, +;; but WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the +;; GNU General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with GNU Emacs. If not, see . + +;;; Commentary: + +;;; Code: + +(require 'ert) + +(ert-deftest test-emacs-version () + (should (string-match emacs-version (emacs-version))) + (should (string-match system-configuration (emacs-version)))) + +(provide 'version-tests) +;;; version-tests.el ends here commit d83cc05a73645f23558590e0415ecb7d5ae2d02d Author: Eli Zaretskii Date: Tue Apr 28 20:22:50 2020 +0300 Fix error in ERC when 'erc-server-coding-system' is customized * lisp/erc/erc-backend.el (erc-split-line): Handle the case where 'erc-coding-system-for-target' returns a coding-system's symbol. (Bug#40914) diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el index 0e3495e139..526e854bec 100644 --- a/lisp/erc/erc-backend.el +++ b/lisp/erc/erc-backend.el @@ -466,7 +466,8 @@ If this is set to nil, never try to reconnect." The length is specified in `erc-split-line-length'. Currently this is called by `erc-send-input'." - (let ((charset (car (erc-coding-system-for-target nil)))) + (let* ((coding (erc-coding-system-for-target nil)) + (charset (if (consp coding) (car coding) coding))) (with-temp-buffer (insert longline) ;; The line lengths are in octets, not characters (because these commit 16fed05ba85c3d92d3c913657dd50a648ad3884a Author: Eli Zaretskii Date: Tue Apr 28 11:57:16 2020 +0300 Avoid crashes on TTY frames with over-long compositions * src/term.c (encode_terminal_code): Each character from an automatic composition is a multibyte character, so its multibyte representation can take up to MAX_MULTIBYTE_LENGTH bytes. Account for that when allocating storage for characters to be encoded. (Bug#40913) diff --git a/src/term.c b/src/term.c index a3aef31ec2..94bf013f4a 100644 --- a/src/term.c +++ b/src/term.c @@ -563,8 +563,8 @@ encode_terminal_code (struct glyph *src, int src_len, { cmp = composition_table[src->u.cmp.id]; required = cmp->glyph_len; - required *= MAX_MULTIBYTE_LENGTH; } + required *= MAX_MULTIBYTE_LENGTH; if (encode_terminal_src_size - nbytes < required) { commit 0278741676e2eca89ecf085344be6bc4fd586396 Author: Stefan Kangas Date: Mon Apr 27 17:09:11 2020 +0200 Fix typo in custom.texi * doc/emacs/custom.texi (Variables): Fix typo. Pointed out by ej32u@protonmail.com. (Bug#40890) diff --git a/doc/emacs/custom.texi b/doc/emacs/custom.texi index e7e879065e..406f0c96c1 100644 --- a/doc/emacs/custom.texi +++ b/doc/emacs/custom.texi @@ -755,7 +755,7 @@ non-@code{nil} value). If you set a variable using the customization buffer, you need not worry about giving it an invalid type: the customization buffer usually only allows you to enter meaningful values. When in doubt, use @kbd{C-h v} (@code{describe-variable}) to -check the variable's documentation string to see kind of value it +check the variable's documentation string to see what kind of value it expects (@pxref{Examining}). @menu commit 9f5ae717fba13de3d670eea9572be0866a313a50 Author: Michael Albinus Date: Mon Apr 27 10:36:33 2020 +0200 * test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer): Use `shell-quote-argument' instead of quoting 'like this'. diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index b23b080457..03f7260f55 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -724,8 +724,9 @@ See Bug#21722." (,output-buf (if ,output-buffer-is-current ,caller-buf (generate-new-buffer "output-buf"))) (emacs (expand-file-name invocation-name invocation-directory)) - (,command (format "%s -Q --batch --eval '(princ %S)'" - emacs ,str)) + (,command + (format "%s -Q --batch --eval %s" + emacs (shell-quote-argument (format "(princ %S)" ,str)))) (inhibit-message t)) (unwind-protect ;; Feature must work the same regardless how we specify the 2nd arg of `shell-command', ie, commit 1f76a16ed349b9556ab711fc12ffb876c8488596 Author: Juri Linkov Date: Mon Apr 27 01:33:36 2020 +0300 * lisp/image-mode.el (image-mode-map): Update menu items. * lisp/image-mode.el (image-mode-map): Move "Fit Image to Window (Best Fit)" higher. Add "Zoom In" (image-increase-size), "Zoom Out" (image-decrease-size) and "Rotate Clockwise" (image-rotate). Use name "Set Rotation..." for image-transform-set-rotation. Swap "Next Image" and "Previous Image". Swap "Next Frame" and "Previous Frame". diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 3ee185a0dc..480b2e6b26 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -505,16 +505,22 @@ call." "--" ["Fit Frame to Image" image-mode-fit-frame :active t :help "Resize frame to match image"] + ["Fit Image to Window (Best Fit)" image-transform-fit-both + :help "Resize image to match the window height and width"] ["Fit to Window Height" image-transform-fit-to-height :help "Resize image to match the window height"] ["Fit to Window Width" image-transform-fit-to-width :help "Resize image to match the window width"] - ["Fit to Window Height and Width" image-transform-fit-both - :help "Resize image to match the window height and width"] + ["Zoom In" image-increase-size + :help "Enlarge the image"] + ["Zoom Out" image-decrease-size + :help "Shrink the image"] ["Set Scale..." image-transform-set-scale :help "Resize image by specified scale factor"] - ["Rotate Image..." image-transform-set-rotation + ["Rotate Clockwise" image-rotate :help "Rotate the image"] + ["Set Rotation..." image-transform-set-rotation + :help "Set rotation angle of the image"] ["Reset Transformations" image-transform-reset :help "Reset all image transformations"] "--" @@ -524,10 +530,10 @@ call." (image-dired default-directory)) :active default-directory :help "Show thumbnails for all images in this directory"] - ["Next Image" image-next-file :active buffer-file-name - :help "Move to next image in this directory"] ["Previous Image" image-previous-file :active buffer-file-name :help "Move to previous image in this directory"] + ["Next Image" image-next-file :active buffer-file-name + :help "Move to next image in this directory"] ["Copy File Name" image-mode-copy-file-name-as-kill :active buffer-file-name :help "Copy the current file name to the kill ring"] @@ -565,10 +571,10 @@ call." ["Reset Animation Speed" image-reset-speed :active image-multi-frame :help "Reset the speed of this image's animation"] - ["Next Frame" image-next-frame :active image-multi-frame - :help "Show the next frame of this image"] ["Previous Frame" image-previous-frame :active image-multi-frame :help "Show the previous frame of this image"] + ["Next Frame" image-next-frame :active image-multi-frame + :help "Show the next frame of this image"] ["Goto Frame..." image-goto-frame :active image-multi-frame :help "Show a specific frame of this image"] )) commit f0e1bf56f041a7f104839678db61e47006b5657c Author: Juri Linkov Date: Mon Apr 27 01:28:36 2020 +0300 Fix bugs in tab-bar and tab-line and mention remaining features in manual. * doc/emacs/frames.texi (Tab Bars): Mention tab-bar-new-tab-to, tab-bar-close-last-tab-choice, tab-bar-close-tab-select, tab-undo, tab-select, tab-bar-history-mode. * doc/emacs/windows.texi (Tab Line): Mention tab-line-tabs-function. * lisp/tab-bar.el (tab-bar-select-tab-modifiers): Mention tab-bar-tab-hints in docstring. (tab-bar-tab-hints): Mention tab-bar-select-tab-modifiers in docstring. (tab-bar-select-tab): Mention tab-bar-select-tab-modifiers in docstring. (tab-bar-switch-to-tab): Expand the docstring. (tab-bar-new-tab-to): Fix bug in handling 'left' value. (tab-bar-close-tab): Fix bug in handling 'left' value. (tab-bar-undo-close-tab): Use funcall tab-bar-tabs-function instead of direct call to tab-bar-tabs. (tab-bar-history-back, tab-bar-history-forward): Add docstrings. (tab-bar-history-mode): Expand docstring. * lisp/tab-line.el (tab-line-format): Fix bug for handling window switching that should set face 'tab-line-tab-current'. diff --git a/doc/emacs/frames.texi b/doc/emacs/frames.texi index d9373b8bc7..8f448e1aed 100644 --- a/doc/emacs/frames.texi +++ b/doc/emacs/frames.texi @@ -1266,7 +1266,7 @@ Note that the Tab Bar is different from the Tab Line (@pxref{Tab Line}). Whereas tabs on the Tab Line at the top of each window are used to switch between buffers, tabs on the Tab Bar at the top of each frame are used to switch between window configurations containing several -windows. +windows with buffers. @findex tab-bar-mode To toggle the use of tab bars, type @kbd{M-x tab-bar-mode}. This @@ -1324,6 +1324,10 @@ current before calling the command that adds a new tab. To start a new tab with other buffers, customize the variable @code{tab-bar-new-tab-choice}. +@vindex tab-bar-new-tab-to + The variable @code{tab-bar-new-tab-to} defines where to place a new tab. +By default, a new tab is added on the right side of the current tab. + The following commands can be used to delete tabs: @table @kbd @@ -1331,7 +1335,8 @@ To start a new tab with other buffers, customize the variable @kindex C-x t 0 @findex tab-close Close the selected tab (@code{tab-close}). It has no effect if there -is only one tab. +is only one tab, unless the variable @code{tab-bar-close-last-tab-choice} +is customized to a non-default value. @item C-x t 1 @kindex C-x t 1 @@ -1339,6 +1344,14 @@ is only one tab. Close all tabs on the selected frame, except the selected one. @end table +@vindex tab-bar-close-tab-select + The variable @code{tab-bar-close-tab-select} defines what tab to +select after closing the current tab. By default, it selects +a recently used tab. + +@findex tab-undo + The command @code{tab-undo} restores the last closed tab. + The following commands can be used to switch between tabs: @table @kbd @@ -1358,22 +1371,60 @@ switches back to the previous Nth tab. Switch to the previous tab. With a positive numeric argument N, it switches to the previous Nth tab; with a negative argument −N, it switches back to the next Nth tab. + +@item C-x t @key{RET} @var{tabname} @key{RET} +Switch to the tab by its name, with completion on all tab names. +Default values are tab names sorted by recency, so you can use +@kbd{M-n} (@code{next-history-element}) to get the name of the last +visited tab, the second last, and so on. + +@item @var{modifier}-@var{tabnumber} +@findex tab-select +Switch to the tab by its number. After customizing the variable +@code{tab-bar-select-tab-modifiers} to specify a @var{modifier} key, you +can select a tab by its ordinal number using the specified modifier in +combination with the tab number to select. To display the tab number +alongside the tab name, you can customize another variable +@code{tab-bar-tab-hints}. This will help you to decide what key to press +to select the tab by its number. + +@item @var{modifier}-@kbd{0} +@findex tab-recent +Switch to the recent tab. The key combination is the modifier key +defined by @code{tab-bar-select-tab-modifiers} and the key @kbd{0}. +With a numeric argument N, switch to the Nth recent tab. @end table The following commands can be used to operate on tabs: @table @kbd @item C-x t r @var{tabname} @key{RET} +@findex tab-rename Rename the current tab to @var{tabname}. You can control the programmatic name given to a tab by default by customizing the variable @code{tab-bar-tab-name-function}. @item C-x t m +@findex tab-move Move the current tab N positions to the right with a positive numeric -argument N. With a negative argument −N, it moves the current tab +argument N. With a negative argument −N, move the current tab N positions to the left. @end table +@findex tab-bar-history-mode + You can enable @code{tab-bar-history-mode} to remember window +configurations used in every tab, and restore them. + +@table @kbd +@item tab-bar-history-back +Restore a previous window configuration used in the current tab. +This navigates back in the history of window configurations. + +@item tab-bar-history-forward +Cancel restoration of the previous window configuration. +This navigates forward in the history of window configurations. +@end table + @node Dialog Boxes @section Using Dialog Boxes @cindex dialog boxes diff --git a/doc/emacs/windows.texi b/doc/emacs/windows.texi index cb5e9bce4d..4c67660b92 100644 --- a/doc/emacs/windows.texi +++ b/doc/emacs/windows.texi @@ -628,8 +628,16 @@ Selecting the previous window-local tab is the same as typing @kbd{C-x same as @kbd{C-x @key{RIGHT}} (@code{next-buffer}). Both commands support a numeric prefix argument as a repeat count. +You can customize the variable @code{tab-line-tabs-function} to define +the preferred contents of the tab line. By default, it displays all +buffers previously visited in the window, as described above. But you +can also set it to display a list of buffers with the same major mode +as the current buffer, or to display buffers grouped by their major +mode, where clicking on the mode name in the first tab displays a list +of all major modes where you can select another group of buffers. + Note that the Tab Line is different from the Tab Bar (@pxref{Tab Bars}). Whereas tabs on the Tab Bar at the top of each frame are used to -switch between window configurations containing several windows, +switch between window configurations containing several windows with buffers, tabs on the Tab Line at the top of each window are used to switch -between buffers. +between buffers in the window. diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index 8c2027eb6a..a1ff2b0ca8 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -87,10 +87,11 @@ (defcustom tab-bar-select-tab-modifiers '() - "List of key modifiers for selecting a tab by its index digit. -Possible modifiers are `control', `meta', `shift', `hyper', `super' and -`alt'." - :type '(set :tag "Tab selection key modifiers" + "List of modifier keys for selecting a tab by its index digit. +Possible modifier keys are `control', `meta', `shift', `hyper', `super' and +`alt'. To help you to select a tab by its number, you can customize +`tab-bar-tab-hints' that will show tab numbers alongside the tab name." + :type '(set :tag "Tab selection modifier keys" (const control) (const meta) (const shift) @@ -310,7 +311,8 @@ If nil, don't show it at all." (defcustom tab-bar-tab-hints nil "Show absolute numbers on tabs in the tab bar before the tab name. -This helps to select the tab by its number using `tab-bar-select-tab'." +This helps to select the tab by its number using `tab-bar-select-tab' +and `tab-bar-select-tab-modifiers'." :type 'boolean :initialize 'custom-initialize-default :set (lambda (sym val) @@ -563,9 +565,10 @@ Return its existing value or a new value." (defun tab-bar-select-tab (&optional arg) "Switch to the tab by its absolute position ARG in the tab bar. -When this command is bound to a numeric key (with a prefix or modifier), -calling it without an argument will translate its bound numeric key -to the numeric argument. ARG counts from 1." +When this command is bound to a numeric key (with a prefix or modifier key +using `tab-bar-select-tab-modifiers'), calling it without an argument +will translate its bound numeric key to the numeric argument. +ARG counts from 1." (interactive "P") (unless (integerp arg) (let ((key (event-basic-type last-command-event))) @@ -664,7 +667,10 @@ to the numeric argument. ARG counts from 1." (message "No more recent tabs")))) (defun tab-bar-switch-to-tab (name) - "Switch to the tab by NAME." + "Switch to the tab by NAME. +Default values are tab names sorted by recency, so you can use \ +\\\\[next-history-element] +to get the name of the last visited tab, the second last, and so on." (interactive (let* ((recent-tabs (mapcar (lambda (tab) (alist-get 'name tab)) @@ -789,7 +795,7 @@ After the tab is created, the hooks in (pcase tab-bar-new-tab-to ('leftmost 0) ('rightmost (length tabs)) - ('left (1- (or from-index 1))) + ('left (or from-index 1)) ('right (1+ (or from-index 0))) ((pred functionp) (funcall tab-bar-new-tab-to)))))) @@ -920,7 +926,7 @@ for the last tab on a frame is determined by ;; Select another tab before deleting the current tab (let ((to-index (or (if to-index (1- to-index)) (pcase tab-bar-close-tab-select - ('left (1- current-index)) + ('left (1- (if (< current-index 1) 2 current-index))) ('right (if (> (length tabs) (1+ current-index)) (1+ current-index) (1- current-index))) @@ -1004,7 +1010,7 @@ for the last tab on a frame is determined by (unless (eq frame (selected-frame)) (select-frame-set-input-focus frame)) - (let ((tabs (tab-bar-tabs))) + (let ((tabs (funcall tab-bar-tabs-function))) (setq index (max 0 (min index (length tabs)))) (cl-pushnew tab (nthcdr index tabs)) (when (eq index 0) @@ -1102,6 +1108,8 @@ function `tab-bar-tab-name-function'." (setq tab-bar-history-omit nil))) (defun tab-bar-history-back () + "Restore a previous window configuration used in the current tab. +This navigates back in the history of window configurations." (interactive) (setq tab-bar-history-omit t) (let* ((history (pop (gethash (selected-frame) tab-bar-history-back))) @@ -1119,6 +1127,8 @@ function `tab-bar-tab-name-function'." (message "No more tab back history")))) (defun tab-bar-history-forward () + "Cancel restoration of the previous window configuration. +This navigates forward in the history of window configurations." (interactive) (setq tab-bar-history-omit t) (let* ((history (pop (gethash (selected-frame) tab-bar-history-forward))) @@ -1136,7 +1146,9 @@ function `tab-bar-tab-name-function'." (message "No more tab forward history")))) (define-minor-mode tab-bar-history-mode - "Toggle tab history mode for the tab bar." + "Toggle tab history mode for the tab bar. +Tab history mode remembers window configurations used in every tab, +and can restore them." :global t :group 'tab-bar (if tab-bar-history-mode (progn diff --git a/lisp/tab-line.el b/lisp/tab-line.el index eb279deab4..7a2bdc0b72 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -474,8 +474,12 @@ variable `tab-line-tabs-function'." "Template for displaying tab line for selected window." (let* ((tabs (funcall tab-line-tabs-function)) (cache-key (list tabs + ;; handle buffer renames (buffer-name (window-buffer)) - (window-parameter nil 'tab-line-hscroll))) + ;; handle tab-line scrolling + (window-parameter nil 'tab-line-hscroll) + ;; for setting face 'tab-line-tab-current' + (eq (selected-window) (old-selected-window)))) (cache (window-parameter nil 'tab-line-cache))) ;; Enable auto-hscroll again after it was disabled on manual scrolling. ;; The moment to enable it is when the window-buffer was updated. commit f0b9f184576a326f4359b4955a5ecff69c11c3aa Author: Michael Albinus Date: Sun Apr 26 11:39:40 2020 +0200 Make shell-command tests fit for tcsh. * test/lisp/simple-tests.el (with-shell-command-dont-erase-buffer): Fix debug spec. Format command to run also under tcsh. (simple-tests-shell-command-39067) (simple-tests-shell-command-dont-erase-buffer): Quote newline in string. diff --git a/test/lisp/simple-tests.el b/test/lisp/simple-tests.el index 8c477165a4..b23b080457 100644 --- a/test/lisp/simple-tests.el +++ b/test/lisp/simple-tests.el @@ -715,7 +715,7 @@ See Bug#21722." ;;; Tests for shell-command-dont-erase-buffer (defmacro with-shell-command-dont-erase-buffer (str output-buffer-is-current &rest body) - (declare (debug (form &body)) (indent 2)) + (declare (debug (sexp form body)) (indent 2)) (let ((expected (make-symbol "expected")) (command (make-symbol "command")) (caller-buf (make-symbol "caller-buf")) @@ -724,7 +724,7 @@ See Bug#21722." (,output-buf (if ,output-buffer-is-current ,caller-buf (generate-new-buffer "output-buf"))) (emacs (expand-file-name invocation-name invocation-directory)) - (,command (format "%s -Q --batch --eval \"(princ \\\"%s\\\")\"" + (,command (format "%s -Q --batch --eval '(princ %S)'" emacs ,str)) (inhibit-message t)) (unwind-protect @@ -745,7 +745,7 @@ See Bug#21722." (ert-deftest simple-tests-shell-command-39067 () "The output buffer is erased or not according to `shell-command-dont-erase-buffer'." - (let ((str "foo\n")) + (let ((str "foo\\n")) (dolist (output-current '(t nil)) (with-shell-command-dont-erase-buffer str output-current (let ((expected (cond ((eq shell-command-dont-erase-buffer 'erase) str) @@ -757,7 +757,7 @@ See Bug#21722." (ert-deftest simple-tests-shell-command-dont-erase-buffer () "The point is set at the expected position after execution of the command." - (let* ((str "foo\n") + (let* ((str "foo\\n") (expected-point `((beg-last-out . ,(1+ (length str))) (end-last-out . ,(1+ (* 2 (length str)))) (save-point . 1)))) commit 68f4a740a13ee6a1d98079ef655dd42924d24d41 Author: Paul Eggert Date: Sat Apr 25 11:22:01 2020 -0700 Remove doc duplication * doc/lispref/objects.texi (Constants and Mutability): Remove duplication. From a suggestion by Andreas Schwab (Bug#40671#150). diff --git a/doc/lispref/objects.texi b/doc/lispref/objects.texi index b4e9ff4411..1d5b2c690f 100644 --- a/doc/lispref/objects.texi +++ b/doc/lispref/objects.texi @@ -2402,8 +2402,7 @@ call @code{(make-string 3 ?a)} yields a mutable string that can be changed via later calls to @code{aset}. A mutable object can become constant if it is part of an expression -that is evaluated, because a program should not modify an object -that is being evaluated. The reverse does not occur: constant objects +that is evaluated. The reverse does not occur: constant objects should stay constant. Trying to modify a constant variable signals an error commit ac31cd384ca0ecbc89a4d75723817ac3c4d3e554 Author: Michael Albinus Date: Sat Apr 25 16:54:28 2020 +0200 * etc/NEWS: Fix inconsistencies. diff --git a/etc/NEWS b/etc/NEWS index 1eb391f135..42133b8bad 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -28,7 +28,7 @@ applies, and please also update docstrings as needed. ** Emacs now uses GMP, the GNU Multiple Precision library. By default, if 'configure' does not find a suitable libgmp, it arranges for the included mini-gmp library to be built and used. -The new 'configure' option '--without-libgmp' uses mini-gmp even if a +The new configure option '--without-libgmp' uses mini-gmp even if a suitable libgmp is available. --- @@ -132,7 +132,7 @@ can enable it when configuring, e.g., './configure CFLAGS="-g3 -O2 ** Emacs now normally uses a C pointer type instead of a C integer type to implement Lisp_Object, which is the fundamental machine word type internal to the Emacs Lisp interpreter. This change aims to -catch typos and supports '-fcheck-pointer-bounds'. The 'configure' +catch typos and supports '-fcheck-pointer-bounds'. The configure option '--enable-check-lisp-object-type' is therefore no longer as useful and so is no longer enabled by default in developer builds, to reduce differences between developer and production builds. @@ -868,7 +868,7 @@ to allow controlling how the conversion to text is done. +++ *** The prefix key 's' was changed to 'c' for slicing commands -to avoid conflicts with image-mode key 's'. The new key 'c' still +to avoid conflicts with 'image-mode' key 's'. The new key 'c' still has good mnemonics of "cut", "clip", "crop". ** Ido @@ -2090,11 +2090,11 @@ variable for remote shells. It still defaults to "/bin/sh". +++ *** New values of 'shell-command-dont-erase-buffer'. -This option can now have the value 'erase' to force to erase the +This user option can now have the value 'erase' to force to erase the output buffer before execution of the command, even if the output goes to the current buffer. Additional values 'beg-last-out', 'end-last-out', and 'save-point' control where to put point in the -output buffer after inserting the shell-command output. +output buffer after inserting the 'shell-command' output. --- *** The new functions 'shell-command-save-pos-or-erase' and @@ -3538,9 +3538,9 @@ With a prefix argument, 'image-rotate' now rotates the image at point By default, the image will resize upon first display and whenever the window's dimensions change. Two user options 'image-auto-resize' and 'image-auto-resize-on-window-resize' control the resizing behavior -(including the possibility to disable auto-resizing). A new key -prefix 's' contains the commands that can be used to fit the image to -the window manually. +(including the possibility to disable auto-resizing). A new prefix +key 's' contains the commands that can be used to fit the image to the +window manually. --- *** Some 'image-mode' variables are now buffer-local.