Merge from origin/emacs-27
92f080dda8
Tab-bar related finishing touches.224e8d1464
Make call_process call signal_after_change. This fixes bu...d02f2a793e
* lisp/simple.el: Minor fixes to commentary.196c42b8bf
Fix a few typos4f2b967795
Fix doc strings for image-dired rotation commands # Conflicts: # etc/NEWS
This commit is contained in:
commit
635e55e812
8 changed files with 64 additions and 29 deletions
|
@ -38,7 +38,7 @@ HarfBuzz text shaping engine. It is on by default; use './configure
|
|||
--without-harfbuzz' to build without it. The HarfBuzz text shaping is
|
||||
available via new font backend drivers 'xfthb' and 'ftcrhb' for Xft
|
||||
and Cairo drawings, respectively, and via the 'harfbuzz' backend on
|
||||
MS-Windows. The Harfbuzz text shaping is preferred to the previously
|
||||
MS-Windows. The HarfBuzz text shaping is preferred to the previously
|
||||
supported ones, so the font backends that use older shaping engines
|
||||
(FLT on GNU and Unix systems and Uniscribe on MS-Windows) are not
|
||||
enabled by default; they can be enabled via the 'font-backend' frame
|
||||
|
|
|
@ -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"))
|
||||
|
||||
|
|
|
@ -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
|
||||
|
|
|
@ -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))
|
||||
|
||||
|
|
|
@ -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))))
|
||||
|
||||
|
||||
|
|
|
@ -746,6 +746,8 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
|
|||
int carryover = 0;
|
||||
bool display_on_the_fly = display_p;
|
||||
struct coding_system saved_coding = process_coding;
|
||||
ptrdiff_t prepared_pos = 0; /* prepare_to_modify_buffer was last
|
||||
called here. */
|
||||
|
||||
while (1)
|
||||
{
|
||||
|
@ -773,6 +775,33 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
|
|||
if (display_on_the_fly)
|
||||
break;
|
||||
}
|
||||
/* CHANGE FUNCTIONS
|
||||
For each iteration of the enclosing while (1) loop which
|
||||
yields data (i.e. nread > 0), before- and
|
||||
after-change-functions are each invoked exactly once.
|
||||
This is done directly from the current function only, by
|
||||
calling prepare_to_modify_buffer and signal_after_change.
|
||||
It is not done here by directing another function such as
|
||||
insert_1_both to call them. The call to
|
||||
prepare_to_modify_buffer follows this comment, and there
|
||||
is one call to signal_after_change in each of the
|
||||
branches of the next `else if'.
|
||||
|
||||
Exceptionally, the insertion into the buffer is aborted
|
||||
at the call to del_range_2 ~45 lines further down, this
|
||||
function removing the newly inserted data. At this stage
|
||||
prepare_to_modify_buffer has been called, but
|
||||
signal_after_change hasn't. A continue statement
|
||||
restarts the enclosing while (1) loop. A second,
|
||||
unwanted, call to `prepare_to_modify_buffer' is inhibited
|
||||
by the test perpared_pos < PT. The data are inserted
|
||||
again, and this time signal_after_change gets called,
|
||||
balancing the previous call to prepare_to_modify_buffer. */
|
||||
if ((prepared_pos < PT) && nread)
|
||||
{
|
||||
prepare_to_modify_buffer (PT, PT, NULL);
|
||||
prepared_pos = PT;
|
||||
}
|
||||
|
||||
/* Now NREAD is the total amount of data in the buffer. */
|
||||
|
||||
|
@ -780,15 +809,16 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
|
|||
;
|
||||
else if (NILP (BVAR (current_buffer, enable_multibyte_characters))
|
||||
&& ! CODING_MAY_REQUIRE_DECODING (&process_coding))
|
||||
insert_1_both (buf, nread, nread, 0, 1, 0);
|
||||
{
|
||||
insert_1_both (buf, nread, nread, 0, 0, 0);
|
||||
signal_after_change (PT, 0, nread);
|
||||
}
|
||||
else
|
||||
{ /* We have to decode the input. */
|
||||
Lisp_Object curbuf;
|
||||
ptrdiff_t count1 = SPECPDL_INDEX ();
|
||||
|
||||
XSETBUFFER (curbuf, current_buffer);
|
||||
/* FIXME: Call signal_after_change! */
|
||||
prepare_to_modify_buffer (PT, PT, NULL);
|
||||
/* We cannot allow after-change-functions be run
|
||||
during decoding, because that might modify the
|
||||
buffer, while we rely on process_coding.produced to
|
||||
|
@ -824,6 +854,7 @@ call_process (ptrdiff_t nargs, Lisp_Object *args, int filefd,
|
|||
|
||||
TEMP_SET_PT_BOTH (PT + process_coding.produced_char,
|
||||
PT_BYTE + process_coding.produced);
|
||||
signal_after_change (PT, 0, process_coding.produced_char);
|
||||
carryover = process_coding.carryover_bytes;
|
||||
if (carryover > 0)
|
||||
memcpy (buf, process_coding.carryover,
|
||||
|
|
|
@ -4361,7 +4361,7 @@ scrolling_window (struct window *w, int tab_line_p)
|
|||
|
||||
/* Can't scroll the display of w32 GUI frames when position of point
|
||||
is indicated by the system caret, because scrolling the display
|
||||
will then "copy" the pixles used by the caret. */
|
||||
will then "copy" the pixels used by the caret. */
|
||||
#ifdef HAVE_NTGUI
|
||||
if (w32_use_visible_system_caret)
|
||||
return 0;
|
||||
|
|
|
@ -19193,7 +19193,7 @@ try_window_reusing_current_matrix (struct window *w)
|
|||
|
||||
/* Can't scroll the display of w32 GUI frames when position of point
|
||||
is indicated by the system caret, because scrolling the display
|
||||
will then "copy" the pixles used by the caret. */
|
||||
will then "copy" the pixels used by the caret. */
|
||||
#ifdef HAVE_NTGUI
|
||||
if (w32_use_visible_system_caret)
|
||||
return false;
|
||||
|
@ -20185,7 +20185,7 @@ try_window_id (struct window *w)
|
|||
|
||||
/* Can't let scroll_run_hook below run on w32 GUI frames when
|
||||
position of point is indicated by the system caret, because
|
||||
scrolling the display will then "copy" the pixles used by the
|
||||
scrolling the display will then "copy" the pixels used by the
|
||||
caret. */
|
||||
#ifdef HAVE_NTGUI
|
||||
if (FRAME_W32_P (f) && w32_use_visible_system_caret)
|
||||
|
|
Loading…
Add table
Reference in a new issue