emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

master 0a4b992 1/3: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 0a4b992 1/3: Merge from origin/emacs-27
Date: Mon, 13 Apr 2020 12:07:45 -0400 (EDT)

branch: master
commit 0a4b992c422d98fbb351d3b03265eb1029012c1d
Merge: d0b9cf8 1dfc497
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    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
---
 doc/emacs/display.texi              |  9 +++++
 doc/emacs/sending.texi              | 35 +++++---------------
 doc/lispintro/emacs-lisp-intro.texi |  3 +-
 etc/NEWS.27                         |  4 +++
 lisp/emacs-lisp/cl-macs.el          |  2 +-
 lisp/mail/sendmail.el               |  2 +-
 lisp/progmodes/elisp-mode.el        |  6 ++--
 lisp/progmodes/flymake.el           | 65 ++++++++++++++++++++-----------------
 lisp/simple.el                      |  8 +++--
 src/xfns.c                          |  4 +++
 10 files changed, 74 insertions(+), 64 deletions(-)

diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi
index 4ecebc7..cbc00ee 100644
--- a/doc/emacs/display.texi
+++ b/doc/emacs/display.texi
@@ -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
diff --git a/doc/emacs/sending.texi b/doc/emacs/sending.texi
index 190549a..e3f9fbe 100644
--- a/doc/emacs/sending.texi
+++ b/doc/emacs/sending.texi
@@ -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
diff --git a/doc/lispintro/emacs-lisp-intro.texi 
b/doc/lispintro/emacs-lisp-intro.texi
index 9834952..1726936 100644
--- a/doc/lispintro/emacs-lisp-intro.texi
+++ b/doc/lispintro/emacs-lisp-intro.texi
@@ -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
diff --git a/etc/NEWS.27 b/etc/NEWS.27
index 44a92ec..f4edfaf 100644
--- a/etc/NEWS.27
+++ b/etc/NEWS.27
@@ -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
 
diff --git a/lisp/emacs-lisp/cl-macs.el b/lisp/emacs-lisp/cl-macs.el
index 45a308e..bb10194 100644
--- a/lisp/emacs-lisp/cl-macs.el
+++ b/lisp/emacs-lisp/cl-macs.el
@@ -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.
diff --git a/lisp/mail/sendmail.el b/lisp/mail/sendmail.el
index 14adb5a..65d598c 100644
--- a/lisp/mail/sendmail.el
+++ b/lisp/mail/sendmail.el
@@ -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
diff --git a/lisp/progmodes/elisp-mode.el b/lisp/progmodes/elisp-mode.el
index 20ec370..f85fd77 100644
--- a/lisp/progmodes/elisp-mode.el
+++ b/lisp/progmodes/elisp-mode.el
@@ -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)))
diff --git a/lisp/progmodes/flymake.el b/lisp/progmodes/flymake.el
index 25a2152..7fca9da 100644
--- a/lisp/progmodes/flymake.el
+++ b/lisp/progmodes/flymake.el
@@ -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"
diff --git a/lisp/simple.el b/lisp/simple.el
index 91736a6..7c8ac41 100644
--- a/lisp/simple.el
+++ b/lisp/simple.el
@@ -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.
diff --git a/src/xfns.c b/src/xfns.c
index 10e1b5e..1f381e2 100644
--- a/src/xfns.c
+++ b/src/xfns.c
@@ -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
 }



reply via email to

[Prev in Thread] Current Thread [Next in Thread]