diff options
| author | Glenn Morris | 2020-04-05 07:50:15 -0700 |
|---|---|---|
| committer | Glenn Morris | 2020-04-05 07:50:15 -0700 |
| commit | 333f63d53706de9d1a1dbc04ed62f9dc0e9698db (patch) | |
| tree | 8384df145897e7845c3ef738d9b27ff35c63fbf3 | |
| parent | 0e18fdd1b6e86b8b9704e3a73204f94682ee9450 (diff) | |
| parent | 6de20c7eab0dd8360e78d744dbf62aecc7f78281 (diff) | |
| download | emacs-333f63d53706de9d1a1dbc04ed62f9dc0e9698db.tar.gz emacs-333f63d53706de9d1a1dbc04ed62f9dc0e9698db.zip | |
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
| -rw-r--r-- | doc/man/emacs.1.in | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/re-builder.el | 17 | ||||
| -rw-r--r-- | lisp/epg-config.el | 16 | ||||
| -rw-r--r-- | lisp/htmlfontify.el | 3 | ||||
| -rw-r--r-- | lisp/vc/log-edit.el | 2 | ||||
| -rw-r--r-- | src/buffer.c | 8 | ||||
| -rw-r--r-- | src/emacs-module.c | 2 | ||||
| -rw-r--r-- | src/xterm.c | 4 | ||||
| -rw-r--r-- | 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 e1190cf4604..5a164e98cd3 100644 --- a/doc/man/emacs.1.in +++ b/doc/man/emacs.1.in | |||
| @@ -171,7 +171,7 @@ The editor will send messages to stderr. | |||
| 171 | You must use \-l and \-f options to specify files to execute | 171 | You must use \-l and \-f options to specify files to execute |
| 172 | and functions to call. | 172 | and functions to call. |
| 173 | .TP | 173 | .TP |
| 174 | .BI \-\-script= "file" | 174 | .BI \-\-script " file" |
| 175 | Run | 175 | Run |
| 176 | .I file | 176 | .I file |
| 177 | as an Emacs Lisp script. | 177 | as an Emacs Lisp script. |
diff --git a/lisp/emacs-lisp/re-builder.el b/lisp/emacs-lisp/re-builder.el index 580e91483db..0e1618e010a 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." | |||
| 767 | (reb-mark-non-matching-parenthesis)) | 767 | (reb-mark-non-matching-parenthesis)) |
| 768 | nil))) | 768 | nil))) |
| 769 | 769 | ||
| 770 | (defsubst reb-while (limit counter where) | 770 | (defsubst reb-while (limit current where) |
| 771 | (let ((count (symbol-value counter))) | 771 | (if (< current limit) |
| 772 | (if (= count limit) | 772 | (1+ current) |
| 773 | (progn | 773 | (message "Reached (while limit=%s, where=%s)" limit where) |
| 774 | (message "Reached (while limit=%s, where=%s)" limit where) | 774 | nil)) |
| 775 | nil) | ||
| 776 | (set counter (1+ count))))) | ||
| 777 | 775 | ||
| 778 | (defun reb-mark-non-matching-parenthesis (bound) | 776 | (defun reb-mark-non-matching-parenthesis (bound) |
| 779 | ;; We have a small string, check the whole of it, but wait until | 777 | ;; We have a small string, check the whole of it, but wait until |
| 780 | ;; everything else is fontified. | 778 | ;; everything else is fontified. |
| 781 | (when (>= bound (point-max)) | 779 | (when (>= bound (point-max)) |
| 782 | (let (left-pars | 780 | (let ((n-reb 0) |
| 781 | left-pars | ||
| 783 | faces-here) | 782 | faces-here) |
| 784 | (goto-char (point-min)) | 783 | (goto-char (point-min)) |
| 785 | (while (and (reb-while 100 'n-reb "mark-par") | 784 | (while (and (setq n-reb (reb-while 100 n-reb "mark-par")) |
| 786 | (not (eobp))) | 785 | (not (eobp))) |
| 787 | (skip-chars-forward "^()") | 786 | (skip-chars-forward "^()") |
| 788 | (unless (eobp) | 787 | (unless (eobp) |
diff --git a/lisp/epg-config.el b/lisp/epg-config.el index 74ab65113e7..daa9a5abd17 100644 --- a/lisp/epg-config.el +++ b/lisp/epg-config.el | |||
| @@ -183,10 +183,18 @@ version requirement is met." | |||
| 183 | (defun epg-config--make-gpg-configuration (program) | 183 | (defun epg-config--make-gpg-configuration (program) |
| 184 | (let (config groups type args) | 184 | (let (config groups type args) |
| 185 | (with-temp-buffer | 185 | (with-temp-buffer |
| 186 | (apply #'call-process program nil (list t nil) nil | 186 | ;; The caller might have bound coding-system-for-* to something |
| 187 | (append (if epg-gpg-home-directory | 187 | ;; like 'no-conversion, but the below needs to call PROGRAM |
| 188 | (list "--homedir" epg-gpg-home-directory)) | 188 | ;; expecting human-readable text in both directions (since we |
| 189 | '("--with-colons" "--list-config"))) | 189 | ;; are going to parse the output as text), so let Emacs guess |
| 190 | ;; the encoding of that text by its usual encoding-detection | ||
| 191 | ;; machinery. | ||
| 192 | (let ((coding-system-for-read 'undecided) | ||
| 193 | (coding-system-for-write 'undecided)) | ||
| 194 | (apply #'call-process program nil (list t nil) nil | ||
| 195 | (append (if epg-gpg-home-directory | ||
| 196 | (list "--homedir" epg-gpg-home-directory)) | ||
| 197 | '("--with-colons" "--list-config")))) | ||
| 190 | (goto-char (point-min)) | 198 | (goto-char (point-min)) |
| 191 | (while (re-search-forward "^cfg:\\([^:]+\\):\\(.*\\)" nil t) | 199 | (while (re-search-forward "^cfg:\\([^:]+\\):\\(.*\\)" nil t) |
| 192 | (setq type (intern (match-string 1)) | 200 | (setq type (intern (match-string 1)) |
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el index 466f6f5ee0e..1d98b633d78 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)." | |||
| 628 | \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> | 628 | \"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd\"> |
| 629 | <html xmlns=\"http://www.w3.org/1999/xhtml\"> | 629 | <html xmlns=\"http://www.w3.org/1999/xhtml\"> |
| 630 | <head> | 630 | <head> |
| 631 | <meta charset=\"utf-8\"/> | ||
| 631 | <title>%s</title> | 632 | <title>%s</title> |
| 632 | %s | 633 | %s |
| 633 | <script type=\"text/javascript\"><!-- | 634 | <script type=\"text/javascript\"><!-- |
| @@ -1508,7 +1509,7 @@ Uses `hfy-link-style-fun' to do this." | |||
| 1508 | "\n<style type=\"text/css\"><!-- \n" | 1509 | "\n<style type=\"text/css\"><!-- \n" |
| 1509 | ;; Fix-me: Add handling of page breaks here + scan for ^L | 1510 | ;; Fix-me: Add handling of page breaks here + scan for ^L |
| 1510 | ;; where appropriate. | 1511 | ;; where appropriate. |
| 1511 | (format "body %s\n" (cddr (assq 'default css))) | 1512 | (format "body, pre %s\n" (cddr (assq 'default css))) |
| 1512 | (apply 'concat | 1513 | (apply 'concat |
| 1513 | (mapcar | 1514 | (mapcar |
| 1514 | (lambda (style) | 1515 | (lambda (style) |
diff --git a/lisp/vc/log-edit.el b/lisp/vc/log-edit.el index d5d46147cf7..906f9a94205 100644 --- a/lisp/vc/log-edit.el +++ b/lisp/vc/log-edit.el | |||
| @@ -529,7 +529,7 @@ according to `fill-column'." | |||
| 529 | (and (< beg end) | 529 | (and (< beg end) |
| 530 | (re-search-forward | 530 | (re-search-forward |
| 531 | (concat "\\(?1:" change-log-unindented-file-names-re | 531 | (concat "\\(?1:" change-log-unindented-file-names-re |
| 532 | "\\)\\|^\\(?1:\\)(") | 532 | "\\)\\|^\\(?1:\\)[[:blank:]]*(") |
| 533 | end t) | 533 | end t) |
| 534 | (copy-marker (match-end 1))) | 534 | (copy-marker (match-end 1))) |
| 535 | ;; Fill prose between log entries. | 535 | ;; Fill prose between log entries. |
diff --git a/src/buffer.c b/src/buffer.c index d8842a6d770..f3532a86189 100644 --- a/src/buffer.c +++ b/src/buffer.c | |||
| @@ -6236,10 +6236,10 @@ Lisp programs may give this variable certain special values: | |||
| 6236 | 6236 | ||
| 6237 | DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, | 6237 | DEFVAR_LISP ("inhibit-read-only", Vinhibit_read_only, |
| 6238 | doc: /* Non-nil means disregard read-only status of buffers or characters. | 6238 | doc: /* Non-nil means disregard read-only status of buffers or characters. |
| 6239 | If the value is t, disregard `buffer-read-only' and all `read-only' | 6239 | A non-nil value that is a list means disregard `buffer-read-only' status, |
| 6240 | text properties. If the value is a list, disregard `buffer-read-only' | 6240 | and disregard a `read-only' text property if the property value is a |
| 6241 | and disregard a `read-only' text property if the property value | 6241 | member of the list. Any other non-nil value means disregard `buffer-read-only' |
| 6242 | is a member of the list. */); | 6242 | and all `read-only' text properties. */); |
| 6243 | Vinhibit_read_only = Qnil; | 6243 | Vinhibit_read_only = Qnil; |
| 6244 | 6244 | ||
| 6245 | DEFVAR_PER_BUFFER ("cursor-type", &BVAR (current_buffer, cursor_type), Qnil, | 6245 | DEFVAR_PER_BUFFER ("cursor-type", &BVAR (current_buffer, cursor_type), Qnil, |
diff --git a/src/emacs-module.c b/src/emacs-module.c index cdcbe061b53..e43e4907d2e 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, | |||
| 683 | 683 | ||
| 684 | /* Since we set HANDLE-8-BIT and HANDLE-OVER-UNI to nil, the return | 684 | /* Since we set HANDLE-8-BIT and HANDLE-OVER-UNI to nil, the return |
| 685 | value can be nil, and we have to check for that. */ | 685 | value can be nil, and we have to check for that. */ |
| 686 | CHECK_TYPE (!NILP (lisp_str_utf8), Qunicode_string_p, lisp_str_utf8); | 686 | CHECK_TYPE (!NILP (lisp_str_utf8), Qunicode_string_p, lisp_str); |
| 687 | 687 | ||
| 688 | ptrdiff_t raw_size = SBYTES (lisp_str_utf8); | 688 | ptrdiff_t raw_size = SBYTES (lisp_str_utf8); |
| 689 | ptrdiff_t required_buf_size = raw_size + 1; | 689 | ptrdiff_t required_buf_size = raw_size + 1; |
diff --git a/src/xterm.c b/src/xterm.c index fc68c77048f..bd9688fda81 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -1291,11 +1291,7 @@ x_clear_under_internal_border (struct frame *f) | |||
| 1291 | int border = FRAME_INTERNAL_BORDER_WIDTH (f); | 1291 | int border = FRAME_INTERNAL_BORDER_WIDTH (f); |
| 1292 | int width = FRAME_PIXEL_WIDTH (f); | 1292 | int width = FRAME_PIXEL_WIDTH (f); |
| 1293 | int height = FRAME_PIXEL_HEIGHT (f); | 1293 | int height = FRAME_PIXEL_HEIGHT (f); |
| 1294 | #ifdef USE_GTK | ||
| 1295 | int margin = 0; | ||
| 1296 | #else | ||
| 1297 | int margin = FRAME_TOP_MARGIN_HEIGHT (f); | 1294 | int margin = FRAME_TOP_MARGIN_HEIGHT (f); |
| 1298 | #endif | ||
| 1299 | int face_id = | 1295 | int face_id = |
| 1300 | !NILP (Vface_remapping_alist) | 1296 | !NILP (Vface_remapping_alist) |
| 1301 | ? lookup_basic_face (NULL, f, INTERNAL_BORDER_FACE_ID) | 1297 | ? 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 bb3f6582325..86a40a97b19 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 | |||
| 74 | filled for several lines. | 74 | filled for several lines. |
| 75 | \(fun9): Etc.")))) | 75 | \(fun9): Etc.")))) |
| 76 | 76 | ||
| 77 | (ert-deftest log-edit-fill-entry-indented-func-entries () | ||
| 78 | ;; Indenting function entries is a typical mistake caused by using a | ||
| 79 | ;; misconfigured or non-ChangeLog specific fill function. | ||
| 80 | (with-temp-buffer | ||
| 81 | (insert "\ | ||
| 82 | * dir/file.ext (fun1): | ||
| 83 | (fun2): | ||
| 84 | (fun3): | ||
| 85 | * file2.txt (fun4): | ||
| 86 | (fun5): | ||
| 87 | (fun6): | ||
| 88 | (fun7): Some prose. | ||
| 89 | (fun8): A longer description of a complicated change.\ | ||
| 90 | Spread over a couple of sentences.\ | ||
| 91 | Long enough to be filled for several lines. | ||
| 92 | (fun9): Etc.") | ||
| 93 | (goto-char (point-min)) | ||
| 94 | (let ((fill-column 72)) (log-edit-fill-entry)) | ||
| 95 | (should (equal (buffer-string) "\ | ||
| 96 | * dir/file.ext (fun1, fun2, fun3): | ||
| 97 | * file2.txt (fun4, fun5, fun6, fun7): Some prose. | ||
| 98 | \(fun8): A longer description of a complicated change. Spread over a | ||
| 99 | couple of sentences. Long enough to be filled for several lines. | ||
| 100 | \(fun9): Etc.")))) | ||
| 101 | |||
| 77 | (ert-deftest log-edit-fill-entry-trailing-prose () | 102 | (ert-deftest log-edit-fill-entry-trailing-prose () |
| 78 | (with-temp-buffer | 103 | (with-temp-buffer |
| 79 | (insert "\ | 104 | (insert "\ |