mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-13 09:32:47 +00:00
Merge from origin/emacs-26
bbc9d37
(origin/emacs-26) Fix previous change in minibuffer-default-a...7caeef1
* src/editfns.c (Fformat): Make %x easier to spot in doc stri...ecc29fb
Improve responsiveness while in 'replace-buffer-contents'8182d64
Improve documentation of 'server-start' and friendsdecdfed
Clarify wording about functions' argument lists5abac8b
* lisp/doc-view.el: Fix typos in the commentary. (Bug#31937)
This commit is contained in:
commit
16c2f03c15
@ -412,10 +412,14 @@ variables that tell you whether an argument was explicitly passed.
|
||||
binds @code{a} and @code{b} to the first two actual arguments, which are
|
||||
required. If one or two more arguments are provided, @code{c} and
|
||||
@code{d} are bound to them respectively; any arguments after the first
|
||||
four are collected into a list and @code{e} is bound to that list. If
|
||||
there are only two arguments, @code{c} is @code{nil}; if two or three
|
||||
arguments, @code{d} is @code{nil}; if four arguments or fewer, @code{e}
|
||||
is @code{nil}.
|
||||
four are collected into a list and @code{e} is bound to that list.
|
||||
Thus, if there are only two arguments, @code{c}, @code{d} and @code{e}
|
||||
are @code{nil}; if two or three arguments, @code{d} and @code{e} are
|
||||
@code{nil}; if four arguments or fewer, @code{e} is @code{nil}. Note
|
||||
that exactly five arguments with an explicit @code{nil} argument
|
||||
provided for @code{e} will cause that @code{nil} argument to be passed
|
||||
as a list with one element, @code{(nil)}, as with any other single
|
||||
value for @code{e}.
|
||||
|
||||
There is no way to have required arguments following optional
|
||||
ones---it would not make sense. To see why this must be so, suppose
|
||||
|
@ -614,14 +614,16 @@ with a prefix argument."
|
||||
|
||||
(declare-function mailcap-file-default-commands "mailcap" (files))
|
||||
|
||||
(defvar dired-aux-files)
|
||||
|
||||
(defun minibuffer-default-add-dired-shell-commands ()
|
||||
"Return a list of all commands associated with current dired files.
|
||||
This function is used to add all related commands retrieved by `mailcap'
|
||||
to the end of the list of defaults just after the default value."
|
||||
(interactive)
|
||||
(let* ((files minibuffer-completion-table)
|
||||
(commands (and (require 'mailcap nil t)
|
||||
(mailcap-file-default-commands files))))
|
||||
(let ((commands (and (boundp 'dired-aux-files)
|
||||
(require 'mailcap nil t)
|
||||
(mailcap-file-default-commands dired-aux-files))))
|
||||
(if (listp minibuffer-default)
|
||||
(append minibuffer-default commands)
|
||||
(cons minibuffer-default commands))))
|
||||
@ -639,9 +641,9 @@ This normally reads using `read-shell-command', but if the
|
||||
offer a smarter default choice of shell command."
|
||||
(minibuffer-with-setup-hook
|
||||
(lambda ()
|
||||
(set (make-local-variable 'minibuffer-completion-table) files)
|
||||
(set (make-local-variable 'minibuffer-default-add-function)
|
||||
'minibuffer-default-add-dired-shell-commands))
|
||||
(setq-local dired-aux-files files)
|
||||
(setq-local minibuffer-default-add-function
|
||||
#'minibuffer-default-add-dired-shell-commands))
|
||||
(setq prompt (format prompt (dired-mark-prompt arg files)))
|
||||
(if (functionp 'dired-guess-shell-command)
|
||||
(dired-mark-pop-up nil 'shell files
|
||||
|
@ -39,7 +39,7 @@
|
||||
;;
|
||||
;; C-x C-f ~/path/to/document RET
|
||||
;;
|
||||
;; and the document will be converted and displayed, if your emacs supports png
|
||||
;; and the document will be converted and displayed, if your emacs supports PNG
|
||||
;; images. With `C-c C-c' you can toggle between the rendered images
|
||||
;; representation and the source text representation of the document.
|
||||
;;
|
||||
@ -50,7 +50,7 @@
|
||||
;; `doc-view-clear-cache'. To open the cache with dired, so that you can tidy
|
||||
;; it out use `doc-view-dired-cache'.
|
||||
;;
|
||||
;; When conversion in underway the first page will be displayed as soon as it
|
||||
;; When conversion is underway the first page will be displayed as soon as it
|
||||
;; is available and the available pages are refreshed every
|
||||
;; `doc-view-conversion-refresh-interval' seconds. If that variable is nil the
|
||||
;; pages won't be displayed before conversion of the document finished
|
||||
|
@ -616,7 +616,10 @@ running, ask the user for confirmation first, unless optional
|
||||
argument INHIBIT-PROMPT is non-nil.
|
||||
|
||||
To force-start a server, do \\[server-force-delete] and then
|
||||
\\[server-start]."
|
||||
\\[server-start].
|
||||
|
||||
To check from a Lisp program whether a server is running, use
|
||||
the `server-process' variable."
|
||||
(interactive "P")
|
||||
(when (or (not server-clients)
|
||||
;; Ask the user before deleting existing clients---except
|
||||
@ -748,7 +751,11 @@ Return values:
|
||||
nil the server is definitely not running.
|
||||
t the server seems to be running.
|
||||
something else we cannot determine whether it's running without using
|
||||
commands which may have to wait for a long time."
|
||||
commands which may have to wait for a long time.
|
||||
|
||||
This function can return non-nil if the server was started by some other
|
||||
Emacs process. To check from a Lisp program whether a server was started
|
||||
by the current Emacs process, use the `server-process' variable."
|
||||
(unless name (setq name server-name))
|
||||
(condition-case nil
|
||||
(if server-use-tcp
|
||||
|
@ -3158,7 +3158,9 @@ SOURCE can be a buffer or a string that names a buffer.
|
||||
Interactively, prompt for SOURCE.
|
||||
As far as possible the replacement is non-destructive, i.e. existing
|
||||
buffer contents, markers, properties, and overlays in the current
|
||||
buffer stay intact. */)
|
||||
buffer stay intact.
|
||||
Warning: this function can be slow if there's a large number of small
|
||||
differences between the two buffers. */)
|
||||
(Lisp_Object source)
|
||||
{
|
||||
struct buffer *a = current_buffer;
|
||||
@ -3238,11 +3240,16 @@ buffer stay intact. */)
|
||||
walk backwards, we don’t have to keep the positions in sync. */
|
||||
while (i >= 0 || j >= 0)
|
||||
{
|
||||
/* Allow the user to quit if this gets too slow. */
|
||||
maybe_quit ();
|
||||
|
||||
/* Check whether there is a change (insertion or deletion)
|
||||
before the current position. */
|
||||
if ((i > 0 && bit_is_set (ctx.deletions, i - 1)) ||
|
||||
(j > 0 && bit_is_set (ctx.insertions, j - 1)))
|
||||
{
|
||||
maybe_quit ();
|
||||
|
||||
ptrdiff_t end_a = min_a + i;
|
||||
ptrdiff_t end_b = min_b + j;
|
||||
/* Find the beginning of the current change run. */
|
||||
@ -3316,14 +3323,20 @@ buffer_chars_equal (struct context *ctx,
|
||||
eassert (pos_b >= BUF_BEGV (ctx->buffer_b));
|
||||
eassert (pos_b < BUF_ZV (ctx->buffer_b));
|
||||
|
||||
bool a_unibyte = BUF_ZV (ctx->buffer_a) == BUF_ZV_BYTE (ctx->buffer_a);
|
||||
bool b_unibyte = BUF_ZV (ctx->buffer_b) == BUF_ZV_BYTE (ctx->buffer_b);
|
||||
|
||||
/* Allow the user to escape out of a slow compareseq call. */
|
||||
maybe_quit ();
|
||||
|
||||
ptrdiff_t bpos_a =
|
||||
NILP (BVAR (ctx->buffer_a, enable_multibyte_characters))
|
||||
? pos_a
|
||||
: buf_charpos_to_bytepos (ctx->buffer_a, pos_a);
|
||||
a_unibyte ? pos_a : buf_charpos_to_bytepos (ctx->buffer_a, pos_a);
|
||||
ptrdiff_t bpos_b =
|
||||
NILP (BVAR (ctx->buffer_b, enable_multibyte_characters))
|
||||
? pos_b
|
||||
: buf_charpos_to_bytepos (ctx->buffer_b, pos_b);
|
||||
b_unibyte ? pos_b : buf_charpos_to_bytepos (ctx->buffer_b, pos_b);
|
||||
|
||||
if (a_unibyte && b_unibyte)
|
||||
return BUF_FETCH_BYTE (ctx->buffer_a, bpos_a)
|
||||
== BUF_FETCH_BYTE (ctx->buffer_b, bpos_b);
|
||||
|
||||
return BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_a, bpos_a)
|
||||
== BUF_FETCH_CHAR_AS_MULTIBYTE (ctx->buffer_b, bpos_b);
|
||||
@ -4103,7 +4116,8 @@ the next available argument, or the argument explicitly specified:
|
||||
|
||||
%s means print a string argument. Actually, prints any object, with `princ'.
|
||||
%d means print as signed number in decimal.
|
||||
%o means print as unsigned number in octal, %x as unsigned number in hex.
|
||||
%o means print as unsigned number in octal.
|
||||
%x means print as unsigned number in hex.
|
||||
%X is like %x, but uses upper case.
|
||||
%e means print a number in exponential notation.
|
||||
%f means print a number in decimal-point notation.
|
||||
|
Loading…
Reference in New Issue
Block a user