emacs-diffs
[Top][All Lists]
Advanced

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

master 333f63d 3/3: Merge from origin/emacs-27


From: Glenn Morris
Subject: master 333f63d 3/3: Merge from origin/emacs-27
Date: Sun, 5 Apr 2020 10:55:17 -0400 (EDT)

branch: master
commit 333f63d53706de9d1a1dbc04ed62f9dc0e9698db
Merge: 0e18fdd 6de20c7
Author: Glenn Morris <address@hidden>
Commit: Glenn Morris <address@hidden>

    Merge from origin/emacs-27
    
    6de20c7eab (origin/emacs-27) Fix syntax error in man page.
    f8607d3c03 Handle filling of indented ChangeLog function entries
    7e78f0d1b2 Fix void-variable n-reb in re-builder (Bug#40409)
    452d776a5d Fix small bug in copy_string_contents.
    fa823653ff Fix invocations of gpg from Gnus
    d4f51d0a2e Don't draw GTK's internal border and tab bar on top of eac...
    38731d504e ; * src/buffer.c (syms_of_buffer) <inhibit-read-only>: Doc...
    44ac9e48bb Tweak htmlfontify's generated output
---
 doc/man/emacs.1.in             |  2 +-
 lisp/emacs-lisp/re-builder.el  | 17 ++++++++---------
 lisp/epg-config.el             | 16 ++++++++++++----
 lisp/htmlfontify.el            |  3 ++-
 lisp/vc/log-edit.el            |  2 +-
 src/buffer.c                   |  8 ++++----
 src/emacs-module.c             |  2 +-
 src/xterm.c                    |  4 ----
 test/lisp/vc/log-edit-tests.el | 25 +++++++++++++++++++++++++
 9 files changed, 54 insertions(+), 25 deletions(-)

diff --git a/doc/man/emacs.1.in b/doc/man/emacs.1.in
index e1190cf..5a164e9 100644
--- a/doc/man/emacs.1.in
+++ b/doc/man/emacs.1.in
@@ -171,7 +171,7 @@ The editor will send messages to stderr.
 You must use \-l and \-f options to specify files to execute
 and functions to call.
 .TP
-.BI \-\-script= "file"
+.BI \-\-script " file"
 Run
 .I file
 as an Emacs Lisp script.
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el
index 580e914..0e1618e 100644
--- a/lisp/emacs-lisp/re-builder.el
+++ b/lisp/emacs-lisp/re-builder.el
@@ -767,22 +767,21 @@ If SUBEXP is non-nil mark only the corresponding 
sub-expressions."
      (reb-mark-non-matching-parenthesis))
     nil)))
 
-(defsubst reb-while (limit counter where)
-  (let ((count (symbol-value counter)))
-    (if (= count limit)
-        (progn
-          (message "Reached (while limit=%s, where=%s)" limit where)
-          nil)
-      (set counter (1+ count)))))
+(defsubst reb-while (limit current where)
+  (if (< current limit)
+      (1+ current)
+    (message "Reached (while limit=%s, where=%s)" limit where)
+    nil))
 
 (defun reb-mark-non-matching-parenthesis (bound)
   ;; We have a small string, check the whole of it, but wait until
   ;; everything else is fontified.
   (when (>= bound (point-max))
-    (let (left-pars
+    (let ((n-reb 0)
+          left-pars
           faces-here)
       (goto-char (point-min))
-      (while (and (reb-while 100 'n-reb "mark-par")
+      (while (and (setq n-reb (reb-while 100 n-reb "mark-par"))
                   (not (eobp)))
         (skip-chars-forward "^()")
         (unless (eobp)
diff --git a/lisp/epg-config.el b/lisp/epg-config.el
index 74ab651..daa9a5a 100644
--- a/lisp/epg-config.el
+++ b/lisp/epg-config.el
@@ -183,10 +183,18 @@ version requirement is met."
 (defun epg-config--make-gpg-configuration (program)
   (let (config groups type args)
     (with-temp-buffer
-      (apply #'call-process program nil (list t nil) nil
-            (append (if epg-gpg-home-directory
-                        (list "--homedir" epg-gpg-home-directory))
-                    '("--with-colons" "--list-config")))
+      ;; The caller might have bound coding-system-for-* to something
+      ;; like 'no-conversion, but the below needs to call PROGRAM
+      ;; expecting human-readable text in both directions (since we
+      ;; are going to parse the output as text), so let Emacs guess
+      ;; the encoding of that text by its usual encoding-detection
+      ;; machinery.
+      (let ((coding-system-for-read 'undecided)
+            (coding-system-for-write 'undecided))
+        (apply #'call-process program nil (list t nil) nil
+              (append (if epg-gpg-home-directory
+                          (list "--homedir" epg-gpg-home-directory))
+                      '("--with-colons" "--list-config"))))
       (goto-char (point-min))
       (while (re-search-forward "^cfg:\\([^:]+\\):\\(.*\\)" nil t)
        (setq type (intern (match-string 1))
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index 466f6f5..1d98b63 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -628,6 +628,7 @@ STYLE is the inline CSS stylesheet (or tag referring to an 
external sheet)."
 \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\";>
 <html xmlns=\"http://www.w3.org/1999/xhtml\";>
   <head>
+    <meta charset=\"utf-8\"/>
     <title>%s</title>
 %s
     <script type=\"text/javascript\"><!--
@@ -1508,7 +1509,7 @@ Uses `hfy-link-style-fun' to do this."
           "\n<style type=\"text/css\"><!-- \n"
           ;; Fix-me: Add handling of page breaks here + scan for ^L
           ;; where appropriate.
-          (format "body %s\n" (cddr (assq 'default css)))
+          (format "body, pre %s\n" (cddr (assq 'default css)))
           (apply 'concat
                  (mapcar
                   (lambda (style)
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el
index d5d4614..906f9a9 100644
--- a/lisp/vc/log-edit.el
+++ b/lisp/vc/log-edit.el
@@ -529,7 +529,7 @@ according to `fill-column'."
          (and (< beg end)
               (re-search-forward
                (concat "\\(?1:" change-log-unindented-file-names-re
-                       "\\)\\|^\\(?1:\\)(")
+                       "\\)\\|^\\(?1:\\)[[:blank:]]*(")
                end t)
               (copy-marker (match-end 1)))
          ;; Fill prose between log entries.
diff --git a/src/buffer.c b/src/buffer.c
index d8842a6..f3532a8 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -6236,10 +6236,10 @@ Lisp programs may give this variable certain special 
values:
 
   DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only,
               doc: /* Non-nil means disregard read-only status of buffers or 
characters.
-If the value is t, disregard `buffer-read-only' and all `read-only'
-text properties.  If the value is a list, disregard `buffer-read-only'
-and disregard a `read-only' text property if the property value
-is a member of the list.  */);
+A non-nil value that is a list means disregard `buffer-read-only' status,
+and disregard a `read-only' text property if the property value is a
+member of the list.  Any other non-nil value means disregard `buffer-read-only'
+and all `read-only' text properties.  */);
   Vinhibit_read_only = Qnil;
 
   DEFVAR_PER_BUFFER ("cursor-type", &BVAR (current_buffer, cursor_type), Qnil,
diff --git a/src/emacs-module.c b/src/emacs-module.c
index cdcbe06..e43e490 100644
--- a/src/emacs-module.c
+++ b/src/emacs-module.c
@@ -683,7 +683,7 @@ module_copy_string_contents (emacs_env *env, emacs_value 
value, char *buf,
 
   /* Since we set HANDLE-8-BIT and HANDLE-OVER-UNI to nil, the return
      value can be nil, and we have to check for that. */
-  CHECK_TYPE (!NILP (lisp_str_utf8), Qunicode_string_p, lisp_str_utf8);
+  CHECK_TYPE (!NILP (lisp_str_utf8), Qunicode_string_p, lisp_str);
 
   ptrdiff_t raw_size = SBYTES (lisp_str_utf8);
   ptrdiff_t required_buf_size = raw_size + 1;
diff --git a/src/xterm.c b/src/xterm.c
index fc68c77..bd9688f 100644
--- a/src/xterm.c
+++ b/src/xterm.c
@@ -1291,11 +1291,7 @@ x_clear_under_internal_border (struct frame *f)
       int border = FRAME_INTERNAL_BORDER_WIDTH (f);
       int width = FRAME_PIXEL_WIDTH (f);
       int height = FRAME_PIXEL_HEIGHT (f);
-#ifdef USE_GTK
-      int margin = 0;
-#else
       int margin = FRAME_TOP_MARGIN_HEIGHT (f);
-#endif
       int face_id =
        !NILP (Vface_remapping_alist)
        ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID)
diff --git a/test/lisp/vc/log-edit-tests.el b/test/lisp/vc/log-edit-tests.el
index bb3f658..86a40a9 100644
--- a/test/lisp/vc/log-edit-tests.el
+++ b/test/lisp/vc/log-edit-tests.el
@@ -74,6 +74,31 @@ couple of sentences.  Long enough to be
 filled for several lines.
 \(fun9): Etc."))))
 
+(ert-deftest log-edit-fill-entry-indented-func-entries ()
+  ;; Indenting function entries is a typical mistake caused by using a
+  ;; misconfigured or non-ChangeLog specific fill function.
+  (with-temp-buffer
+    (insert "\
+* dir/file.ext (fun1):
+  (fun2):
+  (fun3):
+* file2.txt (fun4):
+  (fun5):
+  (fun6):
+  (fun7): Some prose.
+  (fun8): A longer description of a complicated change.\
+  Spread over a couple of sentences.\
+  Long enough to be filled for several lines.
+  (fun9): Etc.")
+    (goto-char (point-min))
+    (let ((fill-column 72)) (log-edit-fill-entry))
+    (should (equal (buffer-string) "\
+* dir/file.ext (fun1, fun2, fun3):
+* file2.txt (fun4, fun5, fun6, fun7): Some prose.
+\(fun8): A longer description of a complicated change.  Spread over a
+couple of sentences.  Long enough to be filled for several lines.
+\(fun9): Etc."))))
+
 (ert-deftest log-edit-fill-entry-trailing-prose ()
   (with-temp-buffer
     (insert "\



reply via email to

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