Merge from origin/emacs-27

1dfc497fac Minor wording change in Introduction to Programming in Ema...
ff09b4eeac Fix 'flymake-show-diagnostics-buffer' when line numbers ar...
63e8d0ea87 Fix last changes describing mail commands
01212a762f Do setup Flymake in file-less Elisp buffers
36873ef2b2 Fix error message for ‘cl-struct-unknown-slot’ (bug#39995)
3f9310b0fe Fix and improve documentation of mail-related features
1482a75efa Fix build failure with Fx_gtk_debug
cf57663f2a Mention jit-lock deferred as an alternative to fast-but-im...

# Conflicts:
#	etc/NEWS
This commit is contained in:
Glenn Morris 2020-04-13 09:02:29 -07:00
commit 0a4b992c42
10 changed files with 74 additions and 64 deletions

View file

@ -141,6 +141,15 @@ default face. This can cause Emacs to scroll to somewhat wrong buffer
positions when the faces in use are not all the same size, even with
single (i.e., without auto-repeat) scrolling operations.
@vindex jit-lock-defer-time
As an alternative to setting @code{fast-but-imprecise-scrolling} you
might prefer to enable jit-lock deferred fontification (@pxref{Font
Lock}). To do this, customize @code{jit-lock-defer-time} to a small
positive number such as 0.25, or even 0.1 if you type quickly. This
gives you less jerky scrolling when you hold down @kbd{C-v}, but the
window contents after any action which scrolls into a fresh portion of
the buffer will be momentarily unfontified.
@vindex scroll-up
@vindex scroll-down
@findex scroll-up-line

View file

@ -32,13 +32,14 @@ In the mail buffer, send the message and bury the buffer
The mail buffer is an ordinary Emacs buffer, so you can switch to
other buffers while composing the mail. If you want to send another
mail before finishing the current one, type @kbd{C-x m} again to open
a new mail buffer whose name has a different numeric suffix
(@pxref{Misc Buffer}). If you invoke the command with a prefix
argument, @w{@kbd{C-u C-x m}}, Emacs switches back to the last mail
buffer, and asks if you want to erase the message in that buffer; if
you answer no, this lets you pick up editing the message where you
left off.
message before finishing the current one, type @kbd{C-x m} again to
open a new mail buffer whose name has a different numeric suffix
(@pxref{Misc Buffer}). (This only works if you use the default
Message mode to compose email; see @ref{Mail Commands}.) If you know
that you'd like to continue composing the unsent message you were
editing, invoke this command with a prefix argument, @w{@kbd{C-u C-x
m}}, and Emacs will switch to the last mail buffer you used and let
you pick up editing the message where you left off.
@kindex C-x 4 m
@findex compose-mail-other-window
@ -122,26 +123,6 @@ environment variables (@pxref{General Variables}). If this
information is unavailable or wrong, you should customize the
variables yourself (@pxref{Easy Customization}).
@vindex mail-from-style
The value of the variable @code{mail-from-style} specifies how to
format the contents of the @samp{From} field:
@table @asis
@item @code{nil}
Use just the address, as in @samp{king@@grassland.com}.
@item @code{parens}
Use both address and full name, as in:@*
@samp{king@@grassland.com (Elvis Parsley)}.
@item @code{angles}
Use both address and full name, as in:@*
@samp{Elvis Parsley <king@@grassland.com>}.
@item any other value
Use @code{angles} normally. But if the address must be quoted to
remain syntactically valid under the @code{angles} format but not
under the @code{parens} format, use @code{parens} instead. This is
the default.
@end table
Apart from @samp{From}, here is a table of commonly-used fields:
@table @samp

View file

@ -3667,7 +3667,8 @@ automatically undone when the @code{let} is finished. The setting
only affects expressions that are inside the bounds of the @code{let}
expression. In computer science jargon, we would say the binding of
a symbol is visible only in functions called in the @code{let} form;
in Emacs Lisp, scoping is dynamic, not lexical.
in Emacs Lisp, the default scoping is dynamic, not lexical. (The
non-default lexical binding is not discussed in this manual.)
@code{let} can create more than one variable at once. Also,
@code{let} gives each variable it creates an initial value, either a

View file

@ -2239,6 +2239,10 @@ The option is useful for two reasons when verifying the signature:
2.2.17 to fully benefit from this feature. See gpg(1) man page for
"--auto-key-retrieve".
+++
*** The 'mail-from-style' variable is now obsolete.
According to RFC 5322, only the 'angles' value is valid.
---
** EasyPG

View file

@ -3118,7 +3118,7 @@ slots skipped by :initial-offset may appear in the list."
descs)))
(nreverse descs)))
(define-error 'cl-struct-unknown-slot "struct %S has no slot %S")
(define-error 'cl-struct-unknown-slot "struct has no slot")
(defun cl-struct-slot-offset (struct-type slot-name)
"Return the offset of slot SLOT-NAME in STRUCT-TYPE.

View file

@ -73,7 +73,7 @@ Otherwise, most addresses look like `angles', but they look like
:version "27.1")
(make-obsolete-variable
'mail-from-style
"only the `angles' value is valid according to RFC2822." "27.1" 'set)
"only the `angles' value is valid according to RFC5322." "27.1" 'set)
;;;###autoload
(defcustom mail-specify-envelope-from nil

View file

@ -291,9 +291,9 @@ Blank lines separate paragraphs. Semicolons start comments.
(unless
(let* ((bfname (buffer-file-name))
(fname (and (stringp bfname) (file-name-nondirectory bfname))))
(or (not (stringp fname))
(string-match "\\`\\.#" fname)
(string-equal dir-locals-file fname)))
(and (stringp fname)
(or (string-match "\\`\\.#" fname)
(string-equal dir-locals-file fname))))
(add-hook 'flymake-diagnostic-functions #'elisp-flymake-checkdoc nil t)
(add-hook 'flymake-diagnostic-functions
#'elisp-flymake-byte-compile nil t)))

View file

@ -1321,35 +1321,42 @@ POS can be a buffer position or a button"
(flymake-show-diagnostic (if (button-type pos) (button-start pos) pos))))
(defun flymake--diagnostics-buffer-entries ()
(with-current-buffer flymake--diagnostics-buffer-source
(cl-loop for diag in
(cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg)
for (line . col) =
(save-excursion
(goto-char (flymake--diag-beg diag))
(cons (line-number-at-pos)
(- (point)
(line-beginning-position))))
for type = (flymake--diag-type diag)
collect
(list (list :diagnostic diag
:line line
:severity (flymake--lookup-type-property
type
'severity (warning-numeric-level :error)))
`[,(format "%s" line)
,(format "%s" col)
,(propertize (format "%s"
(flymake--lookup-type-property
type 'flymake-type-name type))
'face (flymake--lookup-type-property
type 'mode-line-face 'flymake-error))
(,(format "%s" (flymake--diag-text diag))
mouse-face highlight
help-echo "mouse-2: visit this diagnostic"
face nil
action flymake-goto-diagnostic
mouse-action flymake-goto-diagnostic)]))))
;; Do nothing if 'flymake--diagnostics-buffer-source' has not yet
;; been set to a valid buffer. This could happen when this function
;; is called too early. For example 'global-display-line-numbers-mode'
;; calls us from its mode hook, when the diagnostic buffer has just
;; been created by 'flymake-show-diagnostics-buffer', but is not yet
;; set up properly.
(when (bufferp flymake--diagnostics-buffer-source)
(with-current-buffer flymake--diagnostics-buffer-source
(cl-loop for diag in
(cl-sort (flymake-diagnostics) #'< :key #'flymake-diagnostic-beg)
for (line . col) =
(save-excursion
(goto-char (flymake--diag-beg diag))
(cons (line-number-at-pos)
(- (point)
(line-beginning-position))))
for type = (flymake--diag-type diag)
collect
(list (list :diagnostic diag
:line line
:severity (flymake--lookup-type-property
type
'severity (warning-numeric-level :error)))
`[,(format "%s" line)
,(format "%s" col)
,(propertize (format "%s"
(flymake--lookup-type-property
type 'flymake-type-name type))
'face (flymake--lookup-type-property
type 'mode-line-face 'flymake-error))
(,(format "%s" (flymake--diag-text diag))
mouse-face highlight
help-echo "mouse-2: visit this diagnostic"
face nil
action flymake-goto-diagnostic
mouse-action flymake-goto-diagnostic)])))))
(define-derived-mode flymake-diagnostics-buffer-mode tabulated-list-mode
"Flymake diagnostics"

View file

@ -8057,8 +8057,12 @@ OTHER-HEADERS is an alist specifying additional
header fields. Elements look like (HEADER . VALUE) where both
HEADER and VALUE are strings.
CONTINUE, if non-nil, says to continue editing a message already
being composed. Interactively, CONTINUE is the prefix argument.
By default, if an unsent message is already being composed, this
command will ask whether to erase the unsent message, and will not
start a new message if the user doesn't allow erasing. However, if
CONTINUE is non-nil, it means to continue editing a message already
being composed without asking. Interactively, CONTINUE is the prefix
argument.
SWITCH-FUNCTION, if non-nil, is a function to use to
switch to and display the buffer used for mail composition.

View file

@ -7747,6 +7747,7 @@ Note: Text drawn with the `x' font backend is shown with hollow boxes. */)
#ifdef USE_GTK
#ifdef HAVE_GTK3
#if GTK_CHECK_VERSION (3, 14, 0)
DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1, 0,
doc: /* Toggle interactive GTK debugging. */)
(Lisp_Object enable)
@ -7759,6 +7760,7 @@ DEFUN ("x-gtk-debug", Fx_gtk_debug, Sx_gtk_debug, 1, 1, 0,
return NILP (enable) ? Qnil : Qt;
}
#endif /* GTK_CHECK_VERSION (3, 14, 0) */
#endif /* HAVE_GTK3 */
#endif /* USE_GTK */
@ -8146,7 +8148,9 @@ eliminated in future versions of Emacs. */);
#endif
#ifdef USE_GTK
#ifdef HAVE_GTK3
#if GTK_CHECK_VERSION (3, 14, 0)
defsubr (&Sx_gtk_debug);
#endif
#endif
#endif
}