diff options
| -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. 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 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." (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 74ab65113e7..daa9a5abd17 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 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)." \"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 d5d46147cf7..906f9a94205 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 d8842a6d770..f3532a86189 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 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, /* 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 fc68c77048f..bd9688fda81 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 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 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 "\ |
