aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorGlenn Morris2020-04-29 07:50:20 -0700
committerGlenn Morris2020-04-29 07:50:20 -0700
commitb56401f3849cf6d00717ab8a64a221f2c01455a6 (patch)
tree936d8d0fc04faf7aa2ec069c9376a8be09ec5f79 /lisp
parent17eae91cb1b45711be676bce79bcc5fcd7df2d3d (diff)
parent2f9bfaef21043d7894334b33b8538a165250f499 (diff)
downloademacs-b56401f3849cf6d00717ab8a64a221f2c01455a6.tar.gz
emacs-b56401f3849cf6d00717ab8a64a221f2c01455a6.zip
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
Diffstat (limited to 'lisp')
-rw-r--r--lisp/env.el8
-rw-r--r--lisp/erc/erc-backend.el3
-rw-r--r--lisp/image-mode.el20
-rw-r--r--lisp/isearch.el7
-rw-r--r--lisp/tab-bar.el38
-rw-r--r--lisp/tab-line.el6
6 files changed, 54 insertions, 28 deletions
diff --git a/lisp/env.el b/lisp/env.el
index ca2a9773b4e..6de90385a35 100644
--- a/lisp/env.el
+++ b/lisp/env.el
@@ -68,10 +68,10 @@ with a character not a letter, digit or underscore; otherwise, enclose
68the entire variable name in braces. For instance, in `ab$cd-x', 68the entire variable name in braces. For instance, in `ab$cd-x',
69`$cd' is treated as an environment variable. 69`$cd' is treated as an environment variable.
70 70
71If WHEN-DEFINED is nil, references to undefined environment variables 71If WHEN-UNDEFINED is omitted or nil, references to undefined environment
72are replaced by the empty string; if it is a function, the function is called 72variables are replaced by the empty string; if it is a function, the
73with the variable name as argument and should return the text with which 73function is called with the variable's name as argument, and should return
74to replace it or nil to leave it unchanged. 74the text with which to replace it, or nil to leave it unchanged.
75If it is non-nil and not a function, references to undefined variables are 75If it is non-nil and not a function, references to undefined variables are
76left unchanged. 76left unchanged.
77 77
diff --git a/lisp/erc/erc-backend.el b/lisp/erc/erc-backend.el
index 57c8e730b83..1e2526f35ce 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."
466The length is specified in `erc-split-line-length'. 466The length is specified in `erc-split-line-length'.
467 467
468Currently this is called by `erc-send-input'." 468Currently this is called by `erc-send-input'."
469 (let ((charset (car (erc-coding-system-for-target nil)))) 469 (let* ((coding (erc-coding-system-for-target nil))
470 (charset (if (consp coding) (car coding) coding)))
470 (with-temp-buffer 471 (with-temp-buffer
471 (insert longline) 472 (insert longline)
472 ;; The line lengths are in octets, not characters (because these 473 ;; The line lengths are in octets, not characters (because these
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index 3ee185a0dc5..480b2e6b26e 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -505,16 +505,22 @@ call."
505 "--" 505 "--"
506 ["Fit Frame to Image" image-mode-fit-frame :active t 506 ["Fit Frame to Image" image-mode-fit-frame :active t
507 :help "Resize frame to match image"] 507 :help "Resize frame to match image"]
508 ["Fit Image to Window (Best Fit)" image-transform-fit-both
509 :help "Resize image to match the window height and width"]
508 ["Fit to Window Height" image-transform-fit-to-height 510 ["Fit to Window Height" image-transform-fit-to-height
509 :help "Resize image to match the window height"] 511 :help "Resize image to match the window height"]
510 ["Fit to Window Width" image-transform-fit-to-width 512 ["Fit to Window Width" image-transform-fit-to-width
511 :help "Resize image to match the window width"] 513 :help "Resize image to match the window width"]
512 ["Fit to Window Height and Width" image-transform-fit-both 514 ["Zoom In" image-increase-size
513 :help "Resize image to match the window height and width"] 515 :help "Enlarge the image"]
516 ["Zoom Out" image-decrease-size
517 :help "Shrink the image"]
514 ["Set Scale..." image-transform-set-scale 518 ["Set Scale..." image-transform-set-scale
515 :help "Resize image by specified scale factor"] 519 :help "Resize image by specified scale factor"]
516 ["Rotate Image..." image-transform-set-rotation 520 ["Rotate Clockwise" image-rotate
517 :help "Rotate the image"] 521 :help "Rotate the image"]
522 ["Set Rotation..." image-transform-set-rotation
523 :help "Set rotation angle of the image"]
518 ["Reset Transformations" image-transform-reset 524 ["Reset Transformations" image-transform-reset
519 :help "Reset all image transformations"] 525 :help "Reset all image transformations"]
520 "--" 526 "--"
@@ -524,10 +530,10 @@ call."
524 (image-dired default-directory)) 530 (image-dired default-directory))
525 :active default-directory 531 :active default-directory
526 :help "Show thumbnails for all images in this directory"] 532 :help "Show thumbnails for all images in this directory"]
527 ["Next Image" image-next-file :active buffer-file-name
528 :help "Move to next image in this directory"]
529 ["Previous Image" image-previous-file :active buffer-file-name 533 ["Previous Image" image-previous-file :active buffer-file-name
530 :help "Move to previous image in this directory"] 534 :help "Move to previous image in this directory"]
535 ["Next Image" image-next-file :active buffer-file-name
536 :help "Move to next image in this directory"]
531 ["Copy File Name" image-mode-copy-file-name-as-kill 537 ["Copy File Name" image-mode-copy-file-name-as-kill
532 :active buffer-file-name 538 :active buffer-file-name
533 :help "Copy the current file name to the kill ring"] 539 :help "Copy the current file name to the kill ring"]
@@ -565,10 +571,10 @@ call."
565 ["Reset Animation Speed" image-reset-speed 571 ["Reset Animation Speed" image-reset-speed
566 :active image-multi-frame 572 :active image-multi-frame
567 :help "Reset the speed of this image's animation"] 573 :help "Reset the speed of this image's animation"]
568 ["Next Frame" image-next-frame :active image-multi-frame
569 :help "Show the next frame of this image"]
570 ["Previous Frame" image-previous-frame :active image-multi-frame 574 ["Previous Frame" image-previous-frame :active image-multi-frame
571 :help "Show the previous frame of this image"] 575 :help "Show the previous frame of this image"]
576 ["Next Frame" image-next-frame :active image-multi-frame
577 :help "Show the next frame of this image"]
572 ["Goto Frame..." image-goto-frame :active image-multi-frame 578 ["Goto Frame..." image-goto-frame :active image-multi-frame
573 :help "Show a specific frame of this image"] 579 :help "Show a specific frame of this image"]
574 )) 580 ))
diff --git a/lisp/isearch.el b/lisp/isearch.el
index e13a4dda83f..81e83d79509 100644
--- a/lisp/isearch.el
+++ b/lisp/isearch.el
@@ -319,7 +319,7 @@ this variable is set to the symbol `all-windows'."
319 "Show match numbers in the search prompt. 319 "Show match numbers in the search prompt.
320When both this option and `isearch-lazy-highlight' are non-nil, 320When both this option and `isearch-lazy-highlight' are non-nil,
321show the current match number and the total number of matches 321show the current match number and the total number of matches
322in the buffer (or its restriction)." 322in the buffer (or its restriction), including all hidden matches."
323 :type 'boolean 323 :type 'boolean
324 :group 'lazy-count 324 :group 'lazy-count
325 :group 'isearch 325 :group 'isearch
@@ -3869,7 +3869,10 @@ Attempt to do the search exactly the way the pending Isearch would."
3869 (isearch-regexp-lax-whitespace 3869 (isearch-regexp-lax-whitespace
3870 isearch-lazy-highlight-regexp-lax-whitespace) 3870 isearch-lazy-highlight-regexp-lax-whitespace)
3871 (isearch-forward isearch-lazy-highlight-forward) 3871 (isearch-forward isearch-lazy-highlight-forward)
3872 (search-invisible nil) ; don't match invisible text 3872 ;; Don't match invisible text unless it can be opened
3873 ;; or when counting matches and user can visit hidden matches
3874 (search-invisible (or (eq search-invisible 'open)
3875 (and isearch-lazy-count search-invisible)))
3873 (retry t) 3876 (retry t)
3874 (success nil)) 3877 (success nil))
3875 ;; Use a loop like in `isearch-search'. 3878 ;; Use a loop like in `isearch-search'.
diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el
index 30ed1a4cf68..ce6d8c33dd1 100644
--- a/lisp/tab-bar.el
+++ b/lisp/tab-bar.el
@@ -87,10 +87,11 @@
87 87
88 88
89(defcustom tab-bar-select-tab-modifiers '() 89(defcustom tab-bar-select-tab-modifiers '()
90 "List of key modifiers for selecting a tab by its index digit. 90 "List of modifier keys for selecting a tab by its index digit.
91Possible modifiers are `control', `meta', `shift', `hyper', `super' and 91Possible modifier keys are `control', `meta', `shift', `hyper', `super' and
92`alt'." 92`alt'. To help you to select a tab by its number, you can customize
93 :type '(set :tag "Tab selection key modifiers" 93`tab-bar-tab-hints' that will show tab numbers alongside the tab name."
94 :type '(set :tag "Tab selection modifier keys"
94 (const control) 95 (const control)
95 (const meta) 96 (const meta)
96 (const shift) 97 (const shift)
@@ -310,7 +311,8 @@ If nil, don't show it at all."
310 311
311(defcustom tab-bar-tab-hints nil 312(defcustom tab-bar-tab-hints nil
312 "Show absolute numbers on tabs in the tab bar before the tab name. 313 "Show absolute numbers on tabs in the tab bar before the tab name.
313This helps to select the tab by its number using `tab-bar-select-tab'." 314This helps to select the tab by its number using `tab-bar-select-tab'
315and `tab-bar-select-tab-modifiers'."
314 :type 'boolean 316 :type 'boolean
315 :initialize 'custom-initialize-default 317 :initialize 'custom-initialize-default
316 :set (lambda (sym val) 318 :set (lambda (sym val)
@@ -563,9 +565,10 @@ Return its existing value or a new value."
563 565
564(defun tab-bar-select-tab (&optional arg) 566(defun tab-bar-select-tab (&optional arg)
565 "Switch to the tab by its absolute position ARG in the tab bar. 567 "Switch to the tab by its absolute position ARG in the tab bar.
566When this command is bound to a numeric key (with a prefix or modifier), 568When this command is bound to a numeric key (with a prefix or modifier key
567calling it without an argument will translate its bound numeric key 569using `tab-bar-select-tab-modifiers'), calling it without an argument
568to the numeric argument. ARG counts from 1." 570will translate its bound numeric key to the numeric argument.
571ARG counts from 1."
569 (interactive "P") 572 (interactive "P")
570 (unless (integerp arg) 573 (unless (integerp arg)
571 (let ((key (event-basic-type last-command-event))) 574 (let ((key (event-basic-type last-command-event)))
@@ -664,7 +667,10 @@ to the numeric argument. ARG counts from 1."
664 (message "No more recent tabs")))) 667 (message "No more recent tabs"))))
665 668
666(defun tab-bar-switch-to-tab (name) 669(defun tab-bar-switch-to-tab (name)
667 "Switch to the tab by NAME." 670 "Switch to the tab by NAME.
671Default values are tab names sorted by recency, so you can use \
672\\<minibuffer-local-map>\\[next-history-element]
673to get the name of the last visited tab, the second last, and so on."
668 (interactive 674 (interactive
669 (let* ((recent-tabs (mapcar (lambda (tab) 675 (let* ((recent-tabs (mapcar (lambda (tab)
670 (alist-get 'name tab)) 676 (alist-get 'name tab))
@@ -789,7 +795,7 @@ After the tab is created, the hooks in
789 (pcase tab-bar-new-tab-to 795 (pcase tab-bar-new-tab-to
790 ('leftmost 0) 796 ('leftmost 0)
791 ('rightmost (length tabs)) 797 ('rightmost (length tabs))
792 ('left (1- (or from-index 1))) 798 ('left (or from-index 1))
793 ('right (1+ (or from-index 0))) 799 ('right (1+ (or from-index 0)))
794 ((pred functionp) 800 ((pred functionp)
795 (funcall tab-bar-new-tab-to)))))) 801 (funcall tab-bar-new-tab-to))))))
@@ -920,7 +926,7 @@ for the last tab on a frame is determined by
920 ;; Select another tab before deleting the current tab 926 ;; Select another tab before deleting the current tab
921 (let ((to-index (or (if to-index (1- to-index)) 927 (let ((to-index (or (if to-index (1- to-index))
922 (pcase tab-bar-close-tab-select 928 (pcase tab-bar-close-tab-select
923 ('left (1- current-index)) 929 ('left (1- (if (< current-index 1) 2 current-index)))
924 ('right (if (> (length tabs) (1+ current-index)) 930 ('right (if (> (length tabs) (1+ current-index))
925 (1+ current-index) 931 (1+ current-index)
926 (1- current-index))) 932 (1- current-index)))
@@ -1004,7 +1010,7 @@ for the last tab on a frame is determined by
1004 (unless (eq frame (selected-frame)) 1010 (unless (eq frame (selected-frame))
1005 (select-frame-set-input-focus frame)) 1011 (select-frame-set-input-focus frame))
1006 1012
1007 (let ((tabs (tab-bar-tabs))) 1013 (let ((tabs (funcall tab-bar-tabs-function)))
1008 (setq index (max 0 (min index (length tabs)))) 1014 (setq index (max 0 (min index (length tabs))))
1009 (cl-pushnew tab (nthcdr index tabs)) 1015 (cl-pushnew tab (nthcdr index tabs))
1010 (when (eq index 0) 1016 (when (eq index 0)
@@ -1102,6 +1108,8 @@ function `tab-bar-tab-name-function'."
1102 (setq tab-bar-history-omit nil))) 1108 (setq tab-bar-history-omit nil)))
1103 1109
1104(defun tab-bar-history-back () 1110(defun tab-bar-history-back ()
1111 "Restore a previous window configuration used in the current tab.
1112This navigates back in the history of window configurations."
1105 (interactive) 1113 (interactive)
1106 (setq tab-bar-history-omit t) 1114 (setq tab-bar-history-omit t)
1107 (let* ((history (pop (gethash (selected-frame) tab-bar-history-back))) 1115 (let* ((history (pop (gethash (selected-frame) tab-bar-history-back)))
@@ -1119,6 +1127,8 @@ function `tab-bar-tab-name-function'."
1119 (message "No more tab back history")))) 1127 (message "No more tab back history"))))
1120 1128
1121(defun tab-bar-history-forward () 1129(defun tab-bar-history-forward ()
1130 "Cancel restoration of the previous window configuration.
1131This navigates forward in the history of window configurations."
1122 (interactive) 1132 (interactive)
1123 (setq tab-bar-history-omit t) 1133 (setq tab-bar-history-omit t)
1124 (let* ((history (pop (gethash (selected-frame) tab-bar-history-forward))) 1134 (let* ((history (pop (gethash (selected-frame) tab-bar-history-forward)))
@@ -1136,7 +1146,9 @@ function `tab-bar-tab-name-function'."
1136 (message "No more tab forward history")))) 1146 (message "No more tab forward history"))))
1137 1147
1138(define-minor-mode tab-bar-history-mode 1148(define-minor-mode tab-bar-history-mode
1139 "Toggle tab history mode for the tab bar." 1149 "Toggle tab history mode for the tab bar.
1150Tab history mode remembers window configurations used in every tab,
1151and can restore them."
1140 :global t :group 'tab-bar 1152 :global t :group 'tab-bar
1141 (if tab-bar-history-mode 1153 (if tab-bar-history-mode
1142 (progn 1154 (progn
diff --git a/lisp/tab-line.el b/lisp/tab-line.el
index eb279deab4c..7a2bdc0b72f 100644
--- a/lisp/tab-line.el
+++ b/lisp/tab-line.el
@@ -474,8 +474,12 @@ variable `tab-line-tabs-function'."
474 "Template for displaying tab line for selected window." 474 "Template for displaying tab line for selected window."
475 (let* ((tabs (funcall tab-line-tabs-function)) 475 (let* ((tabs (funcall tab-line-tabs-function))
476 (cache-key (list tabs 476 (cache-key (list tabs
477 ;; handle buffer renames
477 (buffer-name (window-buffer)) 478 (buffer-name (window-buffer))
478 (window-parameter nil 'tab-line-hscroll))) 479 ;; handle tab-line scrolling
480 (window-parameter nil 'tab-line-hscroll)
481 ;; for setting face 'tab-line-tab-current'
482 (eq (selected-window) (old-selected-window))))
479 (cache (window-parameter nil 'tab-line-cache))) 483 (cache (window-parameter nil 'tab-line-cache)))
480 ;; Enable auto-hscroll again after it was disabled on manual scrolling. 484 ;; Enable auto-hscroll again after it was disabled on manual scrolling.
481 ;; The moment to enable it is when the window-buffer was updated. 485 ;; The moment to enable it is when the window-buffer was updated.