1
0
mirror of https://git.savannah.gnu.org/git/emacs.git synced 2025-01-31 20:02:42 +00:00

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
This commit is contained in:
Glenn Morris 2020-04-05 07:50:15 -07:00
commit 333f63d537
9 changed files with 54 additions and 25 deletions

View File

@ -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.

View File

@ -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)

View File

@ -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))

View File

@ -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)

View File

@ -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.

View File

@ -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,

View File

@ -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;

View File

@ -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)

View File

@ -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 "\