diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/image-dired.el | 24 | ||||
-rw-r--r-- | lisp/simple.el | 5 | ||||
-rw-r--r-- | lisp/tab-bar.el | 17 | ||||
-rw-r--r-- | lisp/tab-line.el | 2 |
4 files changed, 26 insertions, 22 deletions
diff --git a/lisp/image-dired.el b/lisp/image-dired.el index 7774b82d514..768e941490d 100644 --- a/lisp/image-dired.el +++ b/lisp/image-dired.el @@ -1980,20 +1980,12 @@ With prefix argument ARG, display image in its original size." (clear-image-cache thumb)))) (defun image-dired-rotate-thumbnail-left () - "Rotate thumbnail left (counter clockwise) 90 degrees. -The result of the rotation is displayed in the image display area -and a confirmation is needed before the original image files is -overwritten. This confirmation can be turned off using -`image-dired-rotate-original-ask-before-overwrite'." + "Rotate thumbnail left (counter clockwise) 90 degrees." (interactive) (image-dired-rotate-thumbnail "270")) (defun image-dired-rotate-thumbnail-right () - "Rotate thumbnail counter right (clockwise) 90 degrees. -The result of the rotation is displayed in the image display area -and a confirmation is needed before the original image files is -overwritten. This confirmation can be turned off using -`image-dired-rotate-original-ask-before-overwrite'." + "Rotate thumbnail counter right (clockwise) 90 degrees." (interactive) (image-dired-rotate-thumbnail "90")) @@ -2035,12 +2027,20 @@ overwritten. This confirmation can be turned off using (image-dired-display-image file)))))) (defun image-dired-rotate-original-left () - "Rotate original image left (counter clockwise) 90 degrees." + "Rotate original image left (counter clockwise) 90 degrees. +The result of the rotation is displayed in the image display area +and a confirmation is needed before the original image files is +overwritten. This confirmation can be turned off using +`image-dired-rotate-original-ask-before-overwrite'." (interactive) (image-dired-rotate-original "270")) (defun image-dired-rotate-original-right () - "Rotate original image right (clockwise) 90 degrees." + "Rotate original image right (clockwise) 90 degrees. +The result of the rotation is displayed in the image display area +and a confirmation is needed before the original image files is +overwritten. This confirmation can be turned off using +`image-dired-rotate-original-ask-before-overwrite'." (interactive) (image-dired-rotate-original "90")) diff --git a/lisp/simple.el b/lisp/simple.el index 9bfd58f7d61..8be27745b1c 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -3507,10 +3507,9 @@ whose `car' is BUFFER." (let ((win (car (get-buffer-window-list buf))) (pmax (with-current-buffer buf (point-max)))) - ;; The first time we run a command in a fresh created buffer + ;; The first time we run a command in a freshly created buffer ;; we have not saved positions yet; advance to `point-max', so that - ;; succesive commands knows the position where the new comman start. - ;; (unless (and pos (memq sym '(save-point beg-last-out))) + ;; successive commands know where to start. (unless (and pos (memq sym '(save-point beg-last-out end-last-out))) (setq pos pmax)) ;; Set point in the window displaying buf, if any; otherwise diff --git a/lisp/tab-bar.el b/lisp/tab-bar.el index f70fb6baeee..eccab268dc9 100644 --- a/lisp/tab-bar.el +++ b/lisp/tab-bar.el @@ -360,19 +360,19 @@ to `tab-bar-tab-name-truncated'." :group 'tab-bar :version "27.1") -(defvar tab-bar-tab-name-truncated-ellipsis +(defvar tab-bar-tab-name-ellipsis (if (char-displayable-p ?…) "…" "...")) (defun tab-bar-tab-name-truncated () "Generate tab name from the buffer of the selected window. Truncate it to the length specified by `tab-bar-tab-name-truncated-max'. -Append ellipsis `tab-bar-tab-name-truncated-ellipsis' in this case." +Append ellipsis `tab-bar-tab-name-ellipsis' in this case." (let ((tab-name (buffer-name (window-buffer (minibuffer-selected-window))))) (if (< (length tab-name) tab-bar-tab-name-truncated-max) tab-name (propertize (truncate-string-to-width tab-name tab-bar-tab-name-truncated-max nil nil - tab-bar-tab-name-truncated-ellipsis) + tab-bar-tab-name-ellipsis) 'help-echo tab-name)))) @@ -722,11 +722,14 @@ Interactively, ARG selects the ARGth different frame to move to." If `leftmost', create as the first tab. If `left', create to the left from the current tab. If `right', create to the right from the current tab. -If `rightmost', create as the last tab." +If `rightmost', create as the last tab. +If the value is a function, it should return a number as a position +on the tab bar specifying where to insert a new tab." :type '(choice (const :tag "First tab" leftmost) (const :tag "To the left" left) (const :tag "To the right" right) - (const :tag "Last tab" rightmost)) + (const :tag "Last tab" rightmost) + (function :tag "Function")) :group 'tab-bar :version "27.1") @@ -773,7 +776,9 @@ After the tab is created, the hooks in ('leftmost 0) ('rightmost (length tabs)) ('left (1- (or from-index 1))) - ('right (1+ (or from-index 0))))))) + ('right (1+ (or from-index 0))) + ((pred functionp) + (funcall tab-bar-new-tab-to)))))) (setq to-index (max 0 (min (or to-index 0) (length tabs)))) (cl-pushnew to-tab (nthcdr to-index tabs)) diff --git a/lisp/tab-line.el b/lisp/tab-line.el index ad4050fec59..149fe8289c4 100644 --- a/lisp/tab-line.el +++ b/lisp/tab-line.el @@ -709,7 +709,7 @@ from the tab line." (set-window-prev-buffers nil (assq-delete-all buffer (window-prev-buffers))) (set-window-next-buffers nil (delq buffer (window-next-buffers))))) ((functionp tab-line-close-tab-function) - (funcall tab-line-close-tab-function))) + (funcall tab-line-close-tab-function tab))) (force-mode-line-update)))) |