diff options
| author | Stefan Monnier | 2019-07-09 16:13:25 -0400 |
|---|---|---|
| committer | Stefan Monnier | 2019-07-09 16:13:25 -0400 |
| commit | 3078e6d2fb9b2acf785be11de465f6410acaa5fc (patch) | |
| tree | b64e4e1d395652888af94a38660654711f3e7e03 | |
| parent | 2391a8e24f2ea1f80661ed29fcc64c02c7d8d95c (diff) | |
| parent | 412139f1be7415791a0d964f95f319c86eded426 (diff) | |
| download | emacs-3078e6d2fb9b2acf785be11de465f6410acaa5fc.tar.gz emacs-3078e6d2fb9b2acf785be11de465f6410acaa5fc.zip | |
Merge branch 'master' of git+ssh://git.sv.gnu.org/srv/git/emacs into trunk
| -rw-r--r-- | doc/lispref/functions.texi | 22 | ||||
| -rw-r--r-- | doc/lispref/text.texi | 4 | ||||
| -rw-r--r-- | lib-src/make-fingerprint.c | 3 | ||||
| -rw-r--r-- | lib/fingerprint.c | 2 | ||||
| -rw-r--r-- | lib/fingerprint.h | 2 | ||||
| -rw-r--r-- | lisp/emacs-lisp/checkdoc.el | 10 | ||||
| -rw-r--r-- | lisp/emacs-lisp/cl-indent.el | 2 | ||||
| -rw-r--r-- | lisp/files.el | 2 | ||||
| -rw-r--r-- | lisp/gnus/gnus-group.el | 1 | ||||
| -rw-r--r-- | lisp/gnus/gnus-sum.el | 18 | ||||
| -rw-r--r-- | lisp/gnus/message.el | 8 | ||||
| -rw-r--r-- | lisp/json.el | 40 | ||||
| -rw-r--r-- | lisp/simple.el | 14 | ||||
| -rw-r--r-- | lisp/textmodes/paragraphs.el | 2 | ||||
| -rw-r--r-- | src/alloc.c | 2 | ||||
| -rw-r--r-- | src/callproc.c | 3 | ||||
| -rw-r--r-- | src/chartab.c | 2 | ||||
| -rw-r--r-- | src/doc.c | 2 | ||||
| -rw-r--r-- | src/eval.c | 5 | ||||
| -rw-r--r-- | src/fns.c | 5 | ||||
| -rw-r--r-- | src/font.c | 10 | ||||
| -rw-r--r-- | src/font.h | 12 | ||||
| -rw-r--r-- | src/ftcrfont.c | 4 | ||||
| -rw-r--r-- | src/ftfont.c | 4 | ||||
| -rw-r--r-- | src/ftxfont.c | 4 | ||||
| -rw-r--r-- | src/lisp.h | 2 | ||||
| -rw-r--r-- | src/lread.c | 11 | ||||
| -rw-r--r-- | src/macfont.m | 4 | ||||
| -rw-r--r-- | src/nsfont.m | 4 | ||||
| -rw-r--r-- | src/pdumper.c | 8 | ||||
| -rw-r--r-- | src/xfont.c | 4 | ||||
| -rw-r--r-- | src/xftfont.c | 4 | ||||
| -rw-r--r-- | test/lisp/image-tests.el | 2 |
33 files changed, 150 insertions, 72 deletions
diff --git a/doc/lispref/functions.texi b/doc/lispref/functions.texi index ab07d389282..6eb1af68de0 100644 --- a/doc/lispref/functions.texi +++ b/doc/lispref/functions.texi | |||
| @@ -1578,8 +1578,26 @@ primitives being @code{add-function} and @code{remove-function}) and another | |||
| 1578 | set layered on top of it for named functions (with the main primitives being | 1578 | set layered on top of it for named functions (with the main primitives being |
| 1579 | @code{advice-add} and @code{advice-remove}). | 1579 | @code{advice-add} and @code{advice-remove}). |
| 1580 | 1580 | ||
| 1581 | For example, in order to trace the calls to the process filter of a process | 1581 | As a trivial example, here's how to add advice that'll modify the |
| 1582 | @var{proc}, you could use: | 1582 | return value of a function every time it's called: |
| 1583 | |||
| 1584 | @example | ||
| 1585 | (defun my-double (x) | ||
| 1586 | (* x 2)) | ||
| 1587 | (defun my-increase (x) | ||
| 1588 | (+ x 1)) | ||
| 1589 | (advice-add 'my-double :filter-return #'my-increase) | ||
| 1590 | @end example | ||
| 1591 | |||
| 1592 | After adding this advice, if you call @code{my-double} with @samp{3}, | ||
| 1593 | the return value will be @samp{7}. To remove this advice, say | ||
| 1594 | |||
| 1595 | @example | ||
| 1596 | (advice-remove 'my-double #'my-increase) | ||
| 1597 | @end example | ||
| 1598 | |||
| 1599 | A more advanced example would be to trace the calls to the process | ||
| 1600 | filter of a process @var{proc}: | ||
| 1583 | 1601 | ||
| 1584 | @example | 1602 | @example |
| 1585 | (defun my-tracing-function (proc string) | 1603 | (defun my-tracing-function (proc string) |
diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index ca0dd6642d9..94b94eaba7e 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi | |||
| @@ -1408,6 +1408,10 @@ Where a command affects the contents of several buffers, as may happen, | |||
| 1408 | for example, when a function on the @code{post-command-hook} affects a | 1408 | for example, when a function on the @code{post-command-hook} affects a |
| 1409 | buffer other than the @code{current-buffer}, then @code{undo-boundary} | 1409 | buffer other than the @code{current-buffer}, then @code{undo-boundary} |
| 1410 | will be called in each of the affected buffers. | 1410 | will be called in each of the affected buffers. |
| 1411 | |||
| 1412 | This function can be called before an amalgamating command. It | ||
| 1413 | removes the previous @code{undo-boundary} if a series of such calls | ||
| 1414 | have been made. | ||
| 1411 | @end defun | 1415 | @end defun |
| 1412 | 1416 | ||
| 1413 | @defvar undo-auto-current-boundary-timer | 1417 | @defvar undo-auto-current-boundary-timer |
diff --git a/lib-src/make-fingerprint.c b/lib-src/make-fingerprint.c index 5779e0d2746..2417548d8ca 100644 --- a/lib-src/make-fingerprint.c +++ b/lib-src/make-fingerprint.c | |||
| @@ -144,7 +144,8 @@ main (int argc, char **argv) | |||
| 144 | 144 | ||
| 145 | for (char *finger = buf; | 145 | for (char *finger = buf; |
| 146 | (finger = memmem (finger, buf + chunksz - finger, | 146 | (finger = memmem (finger, buf + chunksz - finger, |
| 147 | fingerprint, sizeof fingerprint)); | 147 | (unsigned char *) fingerprint, |
| 148 | sizeof fingerprint)); | ||
| 148 | finger++) | 149 | finger++) |
| 149 | { | 150 | { |
| 150 | if (! (fseeko (f, finger - buf, SEEK_SET) == 0 | 151 | if (! (fseeko (f, finger - buf, SEEK_SET) == 0 |
diff --git a/lib/fingerprint.c b/lib/fingerprint.c index e55de9c6da3..2cc1973428f 100644 --- a/lib/fingerprint.c +++ b/lib/fingerprint.c | |||
| @@ -29,7 +29,7 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 29 | by a fingerprint of the temporary Emacs executable that was built | 29 | by a fingerprint of the temporary Emacs executable that was built |
| 30 | along the way. */ | 30 | along the way. */ |
| 31 | 31 | ||
| 32 | unsigned char const fingerprint[] = | 32 | volatile unsigned char fingerprint[] = |
| 33 | { | 33 | { |
| 34 | 0xDE, | 34 | 0xDE, |
| 35 | 0x86, | 35 | 0x86, |
diff --git a/lib/fingerprint.h b/lib/fingerprint.h index 0b195fd0ca7..ba2e740cd9e 100644 --- a/lib/fingerprint.h +++ b/lib/fingerprint.h | |||
| @@ -24,6 +24,6 @@ along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>. */ | |||
| 24 | Emacs. This way, we have a unique value that we can use to pair | 24 | Emacs. This way, we have a unique value that we can use to pair |
| 25 | data files (like a portable dump image) with a specific build of | 25 | data files (like a portable dump image) with a specific build of |
| 26 | Emacs. */ | 26 | Emacs. */ |
| 27 | extern unsigned char const fingerprint[32]; | 27 | extern volatile unsigned char fingerprint[32]; |
| 28 | 28 | ||
| 29 | #endif | 29 | #endif |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 3e3246352a2..830743f5f89 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -929,7 +929,10 @@ don't move point." | |||
| 929 | (pcase (save-excursion (condition-case nil | 929 | (pcase (save-excursion (condition-case nil |
| 930 | (read (current-buffer)) | 930 | (read (current-buffer)) |
| 931 | ;; Conservatively skip syntax errors. | 931 | ;; Conservatively skip syntax errors. |
| 932 | (invalid-read-syntax))) | 932 | (invalid-read-syntax) |
| 933 | ;; Don't bug out if the file is empty (or a | ||
| 934 | ;; definition ends prematurely. | ||
| 935 | (end-of-file))) | ||
| 933 | (`(,(or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst 'defadvice) | 936 | (`(,(or 'defun 'defvar 'defcustom 'defmacro 'defconst 'defsubst 'defadvice) |
| 934 | ,(pred symbolp) | 937 | ,(pred symbolp) |
| 935 | ;; Require an initializer, i.e. ignore single-argument `defvar' | 938 | ;; Require an initializer, i.e. ignore single-argument `defvar' |
| @@ -2250,7 +2253,10 @@ Code:, and others referenced in the style guide." | |||
| 2250 | (re-search-forward "^(require" nil t) | 2253 | (re-search-forward "^(require" nil t) |
| 2251 | (re-search-forward "^(" nil t)) | 2254 | (re-search-forward "^(" nil t)) |
| 2252 | (beginning-of-line)) | 2255 | (beginning-of-line)) |
| 2253 | (t (re-search-forward ";;; .* --- .*\n"))) | 2256 | ((not (re-search-forward ";;; .* --- .*\n" nil t)) |
| 2257 | (checkdoc-create-error | ||
| 2258 | "You should have a summary line (\";;; .* --- .*\")" | ||
| 2259 | nil nil t))) | ||
| 2254 | (if (checkdoc-y-or-n-p | 2260 | (if (checkdoc-y-or-n-p |
| 2255 | "You should have a \";;; Commentary:\", add one? ") | 2261 | "You should have a \";;; Commentary:\", add one? ") |
| 2256 | (insert "\n;;; Commentary:\n;; \n\n") | 2262 | (insert "\n;;; Commentary:\n;; \n\n") |
diff --git a/lisp/emacs-lisp/cl-indent.el b/lisp/emacs-lisp/cl-indent.el index 10af440008d..ad5f31713af 100644 --- a/lisp/emacs-lisp/cl-indent.el +++ b/lisp/emacs-lisp/cl-indent.el | |||
| @@ -593,7 +593,7 @@ optional\\|rest\\|key\\|allow-other-keys\\|aux\\|whole\\|body\\|environment\ | |||
| 593 | (null (cdr method))) | 593 | (null (cdr method))) |
| 594 | (lisp-indent-report-bad-format method)) | 594 | (lisp-indent-report-bad-format method)) |
| 595 | 595 | ||
| 596 | (cond ((and tail (not (consp tem))) | 596 | (cond ((and tail (not (or (consp tem) (symbolp tem)))) |
| 597 | ;; indent tail of &rest in same way as first elt of rest | 597 | ;; indent tail of &rest in same way as first elt of rest |
| 598 | (throw 'exit normal-indent)) | 598 | (throw 'exit normal-indent)) |
| 599 | ((eq tem '&body) | 599 | ((eq tem '&body) |
diff --git a/lisp/files.el b/lisp/files.el index 05150ac0214..e8a44af8ea5 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -2720,6 +2720,8 @@ ARC\\|ZIP\\|LZH\\|LHA\\|ZOO\\|[JEW]AR\\|XPI\\|RAR\\|CBR\\|7Z\\)\\'" . archive-mo | |||
| 2720 | ("\\.dtd\\'" . sgml-mode) | 2720 | ("\\.dtd\\'" . sgml-mode) |
| 2721 | ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) | 2721 | ("\\.ds\\(ss\\)?l\\'" . dsssl-mode) |
| 2722 | ("\\.js[mx]?\\'" . javascript-mode) | 2722 | ("\\.js[mx]?\\'" . javascript-mode) |
| 2723 | ;; https://en.wikipedia.org/wiki/.har | ||
| 2724 | ("\\.har\\'" . javascript-mode) | ||
| 2723 | ("\\.json\\'" . javascript-mode) | 2725 | ("\\.json\\'" . javascript-mode) |
| 2724 | ("\\.[ds]?vh?\\'" . verilog-mode) | 2726 | ("\\.[ds]?vh?\\'" . verilog-mode) |
| 2725 | ("\\.by\\'" . bovine-grammar-mode) | 2727 | ("\\.by\\'" . bovine-grammar-mode) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index 2668e4fb7cd..050b3898802 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -2528,6 +2528,7 @@ The arguments have the same meaning as those of | |||
| 2528 | 2528 | ||
| 2529 | (defvar debbugs-gnu-bug-number) ; debbugs-gnu | 2529 | (defvar debbugs-gnu-bug-number) ; debbugs-gnu |
| 2530 | 2530 | ||
| 2531 | ;;;###autoload | ||
| 2531 | (defun gnus-read-ephemeral-emacs-bug-group (ids &optional window-conf) | 2532 | (defun gnus-read-ephemeral-emacs-bug-group (ids &optional window-conf) |
| 2532 | "Browse Emacs bug reports with IDS in an ephemeral group. | 2533 | "Browse Emacs bug reports with IDS in an ephemeral group. |
| 2533 | The arguments have the same meaning as those of | 2534 | The arguments have the same meaning as those of |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index acc4132c27b..019b47d67ef 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -11153,7 +11153,7 @@ If NO-EXPIRE, auto-expiry will be inhibited." | |||
| 11153 | t | 11153 | t |
| 11154 | (if (<= article 0) | 11154 | (if (<= article 0) |
| 11155 | (progn | 11155 | (progn |
| 11156 | (gnus-error 1 "Can't mark negative article numbers") | 11156 | (gnus-error 1 "Gnus doesn't know the article number; can't mark") |
| 11157 | nil) | 11157 | nil) |
| 11158 | (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) | 11158 | (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked)) |
| 11159 | (setq gnus-newsgroup-spam-marked | 11159 | (setq gnus-newsgroup-spam-marked |
| @@ -11326,7 +11326,7 @@ If NO-EXPIRE, auto-expiry will be inhibited." | |||
| 11326 | (let ((mark (or mark gnus-ticked-mark))) | 11326 | (let ((mark (or mark gnus-ticked-mark))) |
| 11327 | (if (<= article 0) | 11327 | (if (<= article 0) |
| 11328 | (progn | 11328 | (progn |
| 11329 | (gnus-error 1 "Can't mark negative article numbers") | 11329 | (gnus-error 1 "Gnus doesn't know the article number; can't mark") |
| 11330 | nil) | 11330 | nil) |
| 11331 | (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked) | 11331 | (setq gnus-newsgroup-marked (delq article gnus-newsgroup-marked) |
| 11332 | gnus-newsgroup-spam-marked (delq article gnus-newsgroup-spam-marked) | 11332 | gnus-newsgroup-spam-marked (delq article gnus-newsgroup-spam-marked) |
| @@ -12188,11 +12188,15 @@ performed." | |||
| 12188 | (save-window-excursion | 12188 | (save-window-excursion |
| 12189 | (gnus-summary-select-article decode decode nil article) | 12189 | (gnus-summary-select-article decode decode nil article) |
| 12190 | (gnus-summary-goto-subject article)) | 12190 | (gnus-summary-goto-subject article)) |
| 12191 | (with-current-buffer save-buffer | 12191 | ;; The article may have expired. |
| 12192 | (erase-buffer) | 12192 | (let ((art-buf (if decode |
| 12193 | (insert-buffer-substring (if decode | 12193 | gnus-article-buffer |
| 12194 | gnus-article-buffer | 12194 | gnus-original-article-buffer))) |
| 12195 | gnus-original-article-buffer))) | 12195 | (when (zerop (buffer-size (get-buffer art-buf))) |
| 12196 | (error "Couldn't select article %s" article)) | ||
| 12197 | (with-current-buffer save-buffer | ||
| 12198 | (erase-buffer) | ||
| 12199 | (insert-buffer-substring art-buf))) | ||
| 12196 | (setq file (gnus-article-save save-buffer file num)) | 12200 | (setq file (gnus-article-save save-buffer file num)) |
| 12197 | (gnus-summary-remove-process-mark article) | 12201 | (gnus-summary-remove-process-mark article) |
| 12198 | (unless not-saved | 12202 | (unless not-saved |
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el index fbe8b451401..727bbabcb24 100644 --- a/lisp/gnus/message.el +++ b/lisp/gnus/message.el | |||
| @@ -8108,7 +8108,13 @@ From headers in the original article." | |||
| 8108 | (emails | 8108 | (emails |
| 8109 | (message-tokenize-header | 8109 | (message-tokenize-header |
| 8110 | (mail-strip-quoted-names | 8110 | (mail-strip-quoted-names |
| 8111 | (mapconcat 'message-fetch-reply-field fields ",")))) | 8111 | (mapconcat |
| 8112 | #'identity | ||
| 8113 | (cl-loop for field in fields | ||
| 8114 | for value = (message-fetch-reply-field field) | ||
| 8115 | when value | ||
| 8116 | collect value) | ||
| 8117 | ",")))) | ||
| 8112 | 8118 | ||
| 8113 | (cond ((functionp message-alternative-emails) | 8119 | (cond ((functionp message-alternative-emails) |
| 8114 | (car (cl-remove-if-not message-alternative-emails emails))) | 8120 | (car (cl-remove-if-not message-alternative-emails emails))) |
diff --git a/lisp/json.el b/lisp/json.el index 44b3c33df7c..460fdec7256 100644 --- a/lisp/json.el +++ b/lisp/json.el | |||
| @@ -691,7 +691,19 @@ become JSON objects." | |||
| 691 | 691 | ||
| 692 | (defun json-read () | 692 | (defun json-read () |
| 693 | "Parse and return the JSON object following point. | 693 | "Parse and return the JSON object following point. |
| 694 | Advances point just past JSON object." | 694 | Advances point just past JSON object. |
| 695 | |||
| 696 | If called with the following JSON after point | ||
| 697 | |||
| 698 | {\"a\": [1, 2, {\"c\": false}], | ||
| 699 | \"b\": \"foo\"} | ||
| 700 | |||
| 701 | you will get the following structure returned: | ||
| 702 | |||
| 703 | ((a . | ||
| 704 | [1 2 | ||
| 705 | ((c . :json-false))]) | ||
| 706 | (b . \"foo\"))" | ||
| 695 | (json-skip-whitespace) | 707 | (json-skip-whitespace) |
| 696 | (let ((char (json-peek))) | 708 | (let ((char (json-peek))) |
| 697 | (if (zerop char) | 709 | (if (zerop char) |
| @@ -719,7 +731,11 @@ Advances point just past JSON object." | |||
| 719 | ;;; JSON encoder | 731 | ;;; JSON encoder |
| 720 | 732 | ||
| 721 | (defun json-encode (object) | 733 | (defun json-encode (object) |
| 722 | "Return a JSON representation of OBJECT as a string." | 734 | "Return a JSON representation of OBJECT as a string. |
| 735 | |||
| 736 | OBJECT should have a structure like one returned by `json-read'. | ||
| 737 | If an error is detected during encoding, an error based on | ||
| 738 | `json-error' is signalled." | ||
| 723 | (cond ((memq object (list t json-null json-false)) | 739 | (cond ((memq object (list t json-null json-false)) |
| 724 | (json-encode-keyword object)) | 740 | (json-encode-keyword object)) |
| 725 | ((stringp object) (json-encode-string object)) | 741 | ((stringp object) (json-encode-string object)) |
| @@ -746,6 +762,7 @@ With prefix argument MINIMIZE, minimize it instead." | |||
| 746 | The function `json-pretty-print' uses `replace-region-contents' | 762 | The function `json-pretty-print' uses `replace-region-contents' |
| 747 | (which see) passing the value of this variable as argument | 763 | (which see) passing the value of this variable as argument |
| 748 | MAX-SECS.") | 764 | MAX-SECS.") |
| 765 | (make-obsolete-variable 'json-pretty-print-max-secs nil "27.1") | ||
| 749 | 766 | ||
| 750 | (defun json-pretty-print (begin end &optional minimize) | 767 | (defun json-pretty-print (begin end &optional minimize) |
| 751 | "Pretty-print selected region. | 768 | "Pretty-print selected region. |
| @@ -755,14 +772,17 @@ With prefix argument MINIMIZE, minimize it instead." | |||
| 755 | ;; Distinguish an empty objects from 'null' | 772 | ;; Distinguish an empty objects from 'null' |
| 756 | (json-null :json-null) | 773 | (json-null :json-null) |
| 757 | ;; Ensure that ordering is maintained | 774 | ;; Ensure that ordering is maintained |
| 758 | (json-object-type 'alist)) | 775 | (json-object-type 'alist) |
| 759 | (replace-region-contents | 776 | json) |
| 760 | begin end | 777 | (save-restriction |
| 761 | (lambda () (json-encode (json-read))) | 778 | (narrow-to-region begin end) |
| 762 | json-pretty-print-max-secs | 779 | (goto-char begin) |
| 763 | ;; FIXME: What's a good value here? Can we use something better, | 780 | (while (setq json (condition-case _ |
| 764 | ;; e.g., by deriving a value from the size of the region? | 781 | (json-read) |
| 765 | 64))) | 782 | (json-error nil))) |
| 783 | (delete-region begin (point)) | ||
| 784 | (insert (json-encode json)) | ||
| 785 | (setq begin (point)))))) | ||
| 766 | 786 | ||
| 767 | (defun json-pretty-print-buffer-ordered (&optional minimize) | 787 | (defun json-pretty-print-buffer-ordered (&optional minimize) |
| 768 | "Pretty-print current buffer with object keys ordered. | 788 | "Pretty-print current buffer with object keys ordered. |
diff --git a/lisp/simple.el b/lisp/simple.el index 5f27b75a4c7..2768bd4a75e 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -1784,14 +1784,18 @@ to get different commands to edit and resubmit." | |||
| 1784 | (defcustom suggest-key-bindings t | 1784 | (defcustom suggest-key-bindings t |
| 1785 | "Non-nil means show the equivalent key-binding when M-x command has one. | 1785 | "Non-nil means show the equivalent key-binding when M-x command has one. |
| 1786 | The value can be a length of time to show the message for. | 1786 | The value can be a length of time to show the message for. |
| 1787 | If the value is non-nil and not a number, we wait 2 seconds." | 1787 | If the value is non-nil and not a number, we wait 2 seconds. |
| 1788 | |||
| 1789 | Also see `extended-command-suggest-shorter'." | ||
| 1788 | :group 'keyboard | 1790 | :group 'keyboard |
| 1789 | :type '(choice (const :tag "off" nil) | 1791 | :type '(choice (const :tag "off" nil) |
| 1790 | (integer :tag "time" 2) | 1792 | (integer :tag "time" 2) |
| 1791 | (other :tag "on"))) | 1793 | (other :tag "on"))) |
| 1792 | 1794 | ||
| 1793 | (defcustom extended-command-suggest-shorter t | 1795 | (defcustom extended-command-suggest-shorter t |
| 1794 | "If non-nil, show a shorter M-x invocation when there is one." | 1796 | "If non-nil, show a shorter M-x invocation when there is one. |
| 1797 | |||
| 1798 | Also see `suggest-key-bindings'." | ||
| 1795 | :group 'keyboard | 1799 | :group 'keyboard |
| 1796 | :type 'boolean | 1800 | :type 'boolean |
| 1797 | :version "26.1") | 1801 | :version "26.1") |
| @@ -3624,12 +3628,12 @@ impose the use of a shell (with its need to quote arguments)." | |||
| 3624 | ;; If will kill a process, query first. | 3628 | ;; If will kill a process, query first. |
| 3625 | (if (yes-or-no-p "A command is running in the default buffer. Kill it? ") | 3629 | (if (yes-or-no-p "A command is running in the default buffer. Kill it? ") |
| 3626 | (kill-process proc) | 3630 | (kill-process proc) |
| 3627 | (error "Shell command in progress"))) | 3631 | (user-error "Shell command in progress"))) |
| 3628 | ((eq async-shell-command-buffer 'confirm-new-buffer) | 3632 | ((eq async-shell-command-buffer 'confirm-new-buffer) |
| 3629 | ;; If will create a new buffer, query first. | 3633 | ;; If will create a new buffer, query first. |
| 3630 | (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ") | 3634 | (if (yes-or-no-p "A command is running in the default buffer. Use a new buffer? ") |
| 3631 | (setq buffer (generate-new-buffer bname)) | 3635 | (setq buffer (generate-new-buffer bname)) |
| 3632 | (error "Shell command in progress"))) | 3636 | (user-error "Shell command in progress"))) |
| 3633 | ((eq async-shell-command-buffer 'new-buffer) | 3637 | ((eq async-shell-command-buffer 'new-buffer) |
| 3634 | ;; It will create a new buffer. | 3638 | ;; It will create a new buffer. |
| 3635 | (setq buffer (generate-new-buffer bname))) | 3639 | (setq buffer (generate-new-buffer bname))) |
| @@ -3640,7 +3644,7 @@ impose the use of a shell (with its need to quote arguments)." | |||
| 3640 | (with-current-buffer buffer | 3644 | (with-current-buffer buffer |
| 3641 | (rename-uniquely)) | 3645 | (rename-uniquely)) |
| 3642 | (setq buffer (get-buffer-create bname))) | 3646 | (setq buffer (get-buffer-create bname))) |
| 3643 | (error "Shell command in progress"))) | 3647 | (user-error "Shell command in progress"))) |
| 3644 | ((eq async-shell-command-buffer 'rename-buffer) | 3648 | ((eq async-shell-command-buffer 'rename-buffer) |
| 3645 | ;; It will rename the buffer. | 3649 | ;; It will rename the buffer. |
| 3646 | (with-current-buffer buffer | 3650 | (with-current-buffer buffer |
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 1d12e53c10a..3762010985f 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -165,7 +165,7 @@ to obtain the value of this variable." | |||
| 165 | :type '(choice regexp (const :tag "Use default value" nil))) | 165 | :type '(choice regexp (const :tag "Use default value" nil))) |
| 166 | (put 'sentence-end 'safe-local-variable 'string-or-null-p) | 166 | (put 'sentence-end 'safe-local-variable 'string-or-null-p) |
| 167 | 167 | ||
| 168 | (defcustom sentence-end-base "[.?!…‽][]\"'”’)}]*" | 168 | (defcustom sentence-end-base "[.?!…‽][]\"'”’)}»›]*" |
| 169 | "Regexp matching the basic end of a sentence, not including following space." | 169 | "Regexp matching the basic end of a sentence, not including following space." |
| 170 | :group 'paragraphs | 170 | :group 'paragraphs |
| 171 | :type 'string | 171 | :type 'string |
diff --git a/src/alloc.c b/src/alloc.c index 90817da5974..833176d4e90 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -3019,7 +3019,7 @@ cleanup_vector (struct Lisp_Vector *vector) | |||
| 3019 | { | 3019 | { |
| 3020 | /* Attempt to catch subtle bugs like Bug#16140. */ | 3020 | /* Attempt to catch subtle bugs like Bug#16140. */ |
| 3021 | eassert (valid_font_driver (drv)); | 3021 | eassert (valid_font_driver (drv)); |
| 3022 | drv->close (font); | 3022 | drv->close_font (font); |
| 3023 | } | 3023 | } |
| 3024 | } | 3024 | } |
| 3025 | } | 3025 | } |
diff --git a/src/callproc.c b/src/callproc.c index 2596f9019e4..3c77238cfb6 100644 --- a/src/callproc.c +++ b/src/callproc.c | |||
| @@ -219,7 +219,10 @@ static mode_t const default_output_mode = 0666; | |||
| 219 | DEFUN ("call-process", Fcall_process, Scall_process, 1, MANY, 0, | 219 | DEFUN ("call-process", Fcall_process, Scall_process, 1, MANY, 0, |
| 220 | doc: /* Call PROGRAM synchronously in separate process. | 220 | doc: /* Call PROGRAM synchronously in separate process. |
| 221 | The remaining arguments are optional. | 221 | The remaining arguments are optional. |
| 222 | |||
| 222 | The program's input comes from file INFILE (nil means `/dev/null'). | 223 | The program's input comes from file INFILE (nil means `/dev/null'). |
| 224 | If you want to make the input come from an Emacs buffer, use | ||
| 225 | `call-process-region' instead. | ||
| 223 | 226 | ||
| 224 | Third argument DESTINATION specifies how to handle program's output. | 227 | Third argument DESTINATION specifies how to handle program's output. |
| 225 | If DESTINATION is a buffer, or t that stands for the current buffer, | 228 | If DESTINATION is a buffer, or t that stands for the current buffer, |
diff --git a/src/chartab.c b/src/chartab.c index bf8e34b2529..04205ac1032 100644 --- a/src/chartab.c +++ b/src/chartab.c | |||
| @@ -1288,7 +1288,7 @@ uniprop_table (Lisp_Object prop) | |||
| 1288 | if (STRINGP (table)) | 1288 | if (STRINGP (table)) |
| 1289 | { | 1289 | { |
| 1290 | AUTO_STRING (intl, "international/"); | 1290 | AUTO_STRING (intl, "international/"); |
| 1291 | result = Fload (concat2 (intl, table), Qt, Qt, Qt, Qt); | 1291 | result = save_match_data_load (concat2 (intl, table), Qt, Qt, Qt, Qt); |
| 1292 | if (NILP (result)) | 1292 | if (NILP (result)) |
| 1293 | return Qnil; | 1293 | return Qnil; |
| 1294 | table = XCDR (val); | 1294 | table = XCDR (val); |
| @@ -302,7 +302,7 @@ reread_doc_file (Lisp_Object file) | |||
| 302 | if (NILP (file)) | 302 | if (NILP (file)) |
| 303 | Fsnarf_documentation (Vdoc_file_name); | 303 | Fsnarf_documentation (Vdoc_file_name); |
| 304 | else | 304 | else |
| 305 | Fload (file, Qt, Qt, Qt, Qnil); | 305 | save_match_data_load (file, Qt, Qt, Qt, Qnil); |
| 306 | 306 | ||
| 307 | return 1; | 307 | return 1; |
| 308 | } | 308 | } |
diff --git a/src/eval.c b/src/eval.c index 8f569949036..02a6c3555a9 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -2049,9 +2049,6 @@ it defines a macro. */) | |||
| 2049 | 2049 | ||
| 2050 | CHECK_SYMBOL (funname); | 2050 | CHECK_SYMBOL (funname); |
| 2051 | 2051 | ||
| 2052 | /* Preserve the match data. */ | ||
| 2053 | record_unwind_save_match_data (); | ||
| 2054 | |||
| 2055 | /* If autoloading gets an error (which includes the error of failing | 2052 | /* If autoloading gets an error (which includes the error of failing |
| 2056 | to define the function being called), we use Vautoload_queue | 2053 | to define the function being called), we use Vautoload_queue |
| 2057 | to undo function definitions and `provide' calls made by | 2054 | to undo function definitions and `provide' calls made by |
| @@ -2067,7 +2064,7 @@ it defines a macro. */) | |||
| 2067 | so don't signal an error if autoloading fails. */ | 2064 | so don't signal an error if autoloading fails. */ |
| 2068 | Lisp_Object ignore_errors | 2065 | Lisp_Object ignore_errors |
| 2069 | = (EQ (kind, Qt) || EQ (kind, Qmacro)) ? Qnil : macro_only; | 2066 | = (EQ (kind, Qt) || EQ (kind, Qmacro)) ? Qnil : macro_only; |
| 2070 | Fload (Fcar (Fcdr (fundef)), ignore_errors, Qt, Qnil, Qt); | 2067 | save_match_data_load (Fcar (Fcdr (fundef)), ignore_errors, Qt, Qnil, Qt); |
| 2071 | 2068 | ||
| 2072 | /* Once loading finishes, don't undo it. */ | 2069 | /* Once loading finishes, don't undo it. */ |
| 2073 | Vautoload_queue = Qt; | 2070 | Vautoload_queue = Qt; |
| @@ -2984,8 +2984,9 @@ suppressed. */) | |||
| 2984 | Vautoload_queue = Qt; | 2984 | Vautoload_queue = Qt; |
| 2985 | 2985 | ||
| 2986 | /* Load the file. */ | 2986 | /* Load the file. */ |
| 2987 | tem = Fload (NILP (filename) ? Fsymbol_name (feature) : filename, | 2987 | tem = save_match_data_load |
| 2988 | noerror, Qt, Qnil, (NILP (filename) ? Qt : Qnil)); | 2988 | (NILP (filename) ? Fsymbol_name (feature) : filename, |
| 2989 | noerror, Qt, Qnil, (NILP (filename) ? Qt : Qnil)); | ||
| 2989 | 2990 | ||
| 2990 | /* If load failed entirely, return nil. */ | 2991 | /* If load failed entirely, return nil. */ |
| 2991 | if (NILP (tem)) | 2992 | if (NILP (tem)) |
diff --git a/src/font.c b/src/font.c index 457f3f99583..ce85e0bb4ad 100644 --- a/src/font.c +++ b/src/font.c | |||
| @@ -44,10 +44,6 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */ | |||
| 44 | #include TERM_HEADER | 44 | #include TERM_HEADER |
| 45 | #endif /* HAVE_WINDOW_SYSTEM */ | 45 | #endif /* HAVE_WINDOW_SYSTEM */ |
| 46 | 46 | ||
| 47 | /* Avoid macro definition of `open' in generated lib/fcntl.h to mess up | ||
| 48 | use of it as a struct member. */ | ||
| 49 | #undef open | ||
| 50 | |||
| 51 | #define DEFAULT_ENCODING Qiso8859_1 | 47 | #define DEFAULT_ENCODING Qiso8859_1 |
| 52 | 48 | ||
| 53 | /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ | 49 | /* Vector of Vfont_weight_table, Vfont_slant_table, and Vfont_width_table. */ |
| @@ -2646,7 +2642,7 @@ font_clear_cache (struct frame *f, Lisp_Object cache, | |||
| 2646 | if (! NILP (AREF (val, FONT_TYPE_INDEX))) | 2642 | if (! NILP (AREF (val, FONT_TYPE_INDEX))) |
| 2647 | { | 2643 | { |
| 2648 | eassert (font && driver == font->driver); | 2644 | eassert (font && driver == font->driver); |
| 2649 | driver->close (font); | 2645 | driver->close_font (font); |
| 2650 | } | 2646 | } |
| 2651 | } | 2647 | } |
| 2652 | if (driver->free_entity) | 2648 | if (driver->free_entity) |
| @@ -2906,7 +2902,7 @@ font_open_entity (struct frame *f, Lisp_Object entity, int pixel_size) | |||
| 2906 | width and height. */ | 2902 | width and height. */ |
| 2907 | for (psize = pixel_size; ; psize++) | 2903 | for (psize = pixel_size; ; psize++) |
| 2908 | { | 2904 | { |
| 2909 | font_object = driver_list->driver->open (f, entity, psize); | 2905 | font_object = driver_list->driver->open_font (f, entity, psize); |
| 2910 | if (NILP (font_object)) | 2906 | if (NILP (font_object)) |
| 2911 | return Qnil; | 2907 | return Qnil; |
| 2912 | font = XFONT_OBJECT (font_object); | 2908 | font = XFONT_OBJECT (font_object); |
| @@ -2966,7 +2962,7 @@ font_close_object (struct frame *f, Lisp_Object font_object) | |||
| 2966 | /* Already closed. */ | 2962 | /* Already closed. */ |
| 2967 | return; | 2963 | return; |
| 2968 | FONT_ADD_LOG ("close", font_object, Qnil); | 2964 | FONT_ADD_LOG ("close", font_object, Qnil); |
| 2969 | font->driver->close (font); | 2965 | font->driver->close_font (font); |
| 2970 | #ifdef HAVE_WINDOW_SYSTEM | 2966 | #ifdef HAVE_WINDOW_SYSTEM |
| 2971 | eassert (FRAME_DISPLAY_INFO (f)->n_fonts); | 2967 | eassert (FRAME_DISPLAY_INFO (f)->n_fonts); |
| 2972 | FRAME_DISPLAY_INFO (f)->n_fonts--; | 2968 | FRAME_DISPLAY_INFO (f)->n_fonts--; |
diff --git a/src/font.h b/src/font.h index 3387878ad30..9d4b2d81c6f 100644 --- a/src/font.h +++ b/src/font.h | |||
| @@ -58,7 +58,7 @@ INLINE_HEADER_BEGIN | |||
| 58 | Lisp object encapsulating "struct font". This corresponds to | 58 | Lisp object encapsulating "struct font". This corresponds to |
| 59 | an opened font. | 59 | an opened font. |
| 60 | 60 | ||
| 61 | Note: Only the method `open' of a font-driver can create this | 61 | Note: Only the method `open_font' of a font-driver can create this |
| 62 | object, and it should never be modified by Lisp. */ | 62 | object, and it should never be modified by Lisp. */ |
| 63 | 63 | ||
| 64 | 64 | ||
| @@ -594,9 +594,9 @@ struct font_driver | |||
| 594 | :weight, :slant, :width, :size, :dpi, :spacing, :avgwidth. If | 594 | :weight, :slant, :width, :size, :dpi, :spacing, :avgwidth. If |
| 595 | the font is scalable, :size and :avgwidth must be 0. | 595 | the font is scalable, :size and :avgwidth must be 0. |
| 596 | 596 | ||
| 597 | The `open' method of the same font-backend is called with one of | 597 | The `open_font' method of the same font-backend is called with one of |
| 598 | the returned font-entities. If the backend needs additional | 598 | the returned font-entities. If the backend needs additional |
| 599 | information to be used in `open' method, this method can add any | 599 | information to be used in `open_font' method, this method can add any |
| 600 | Lispy value using the property :font-entity to the entities. | 600 | Lispy value using the property :font-entity to the entities. |
| 601 | 601 | ||
| 602 | This and the following `match' are the only APIs that allocate | 602 | This and the following `match' are the only APIs that allocate |
| @@ -623,11 +623,11 @@ struct font_driver | |||
| 623 | 623 | ||
| 624 | /* Open a font specified by FONT_ENTITY on frame F. If the font is | 624 | /* Open a font specified by FONT_ENTITY on frame F. If the font is |
| 625 | scalable, open it with PIXEL_SIZE. */ | 625 | scalable, open it with PIXEL_SIZE. */ |
| 626 | Lisp_Object (*open) (struct frame *f, Lisp_Object font_entity, | 626 | Lisp_Object (*open_font) (struct frame *f, Lisp_Object font_entity, |
| 627 | int pixel_size); | 627 | int pixel_size); |
| 628 | 628 | ||
| 629 | /* Close FONT. NOTE: this can be called by GC. */ | 629 | /* Close FONT. NOTE: this can be called by GC. */ |
| 630 | void (*close) (struct font *font); | 630 | void (*close_font) (struct font *font); |
| 631 | 631 | ||
| 632 | /* Prepare FACE for displaying characters by FONT on frame F by | 632 | /* Prepare FACE for displaying characters by FONT on frame F by |
| 633 | storing some data in FACE->extra. */ | 633 | storing some data in FACE->extra. */ |
diff --git a/src/ftcrfont.c b/src/ftcrfont.c index 93786212160..f0c7cbb8c86 100644 --- a/src/ftcrfont.c +++ b/src/ftcrfont.c | |||
| @@ -576,8 +576,8 @@ struct font_driver const ftcrfont_driver = | |||
| 576 | .list = ftcrfont_list, | 576 | .list = ftcrfont_list, |
| 577 | .match = ftcrfont_match, | 577 | .match = ftcrfont_match, |
| 578 | .list_family = ftfont_list_family, | 578 | .list_family = ftfont_list_family, |
| 579 | .open = ftcrfont_open, | 579 | .open_font = ftcrfont_open, |
| 580 | .close = ftcrfont_close, | 580 | .close_font = ftcrfont_close, |
| 581 | .has_char = ftcrfont_has_char, | 581 | .has_char = ftcrfont_has_char, |
| 582 | .encode_char = ftcrfont_encode_char, | 582 | .encode_char = ftcrfont_encode_char, |
| 583 | .text_extents = ftcrfont_text_extents, | 583 | .text_extents = ftcrfont_text_extents, |
diff --git a/src/ftfont.c b/src/ftfont.c index a80e2fb5c4b..16b18de6867 100644 --- a/src/ftfont.c +++ b/src/ftfont.c | |||
| @@ -3039,8 +3039,8 @@ static struct font_driver const ftfont_driver = | |||
| 3039 | .list = ftfont_list, | 3039 | .list = ftfont_list, |
| 3040 | .match = ftfont_match, | 3040 | .match = ftfont_match, |
| 3041 | .list_family = ftfont_list_family, | 3041 | .list_family = ftfont_list_family, |
| 3042 | .open = ftfont_open, | 3042 | .open_font = ftfont_open, |
| 3043 | .close = ftfont_close, | 3043 | .close_font = ftfont_close, |
| 3044 | .has_char = ftfont_has_char, | 3044 | .has_char = ftfont_has_char, |
| 3045 | .encode_char = ftfont_encode_char, | 3045 | .encode_char = ftfont_encode_char, |
| 3046 | .text_extents = ftfont_text_extents, | 3046 | .text_extents = ftfont_text_extents, |
diff --git a/src/ftxfont.c b/src/ftxfont.c index ae7d1a5a9b5..1d1bd2c4581 100644 --- a/src/ftxfont.c +++ b/src/ftxfont.c | |||
| @@ -335,8 +335,8 @@ struct font_driver const ftxfont_driver = | |||
| 335 | .list = ftxfont_list, | 335 | .list = ftxfont_list, |
| 336 | .match = ftxfont_match, | 336 | .match = ftxfont_match, |
| 337 | .list_family = ftfont_list_family, | 337 | .list_family = ftfont_list_family, |
| 338 | .open = ftxfont_open, | 338 | .open_font = ftxfont_open, |
| 339 | .close = ftxfont_close, | 339 | .close_font = ftxfont_close, |
| 340 | .has_char = ftfont_has_char, | 340 | .has_char = ftfont_has_char, |
| 341 | .encode_char = ftfont_encode_char, | 341 | .encode_char = ftfont_encode_char, |
| 342 | .text_extents = ftfont_text_extents, | 342 | .text_extents = ftfont_text_extents, |
diff --git a/src/lisp.h b/src/lisp.h index 8acf63fe227..fa57cad8a60 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -4019,6 +4019,8 @@ LOADHIST_ATTACH (Lisp_Object x) | |||
| 4019 | if (initialized) | 4019 | if (initialized) |
| 4020 | Vcurrent_load_list = Fcons (x, Vcurrent_load_list); | 4020 | Vcurrent_load_list = Fcons (x, Vcurrent_load_list); |
| 4021 | } | 4021 | } |
| 4022 | extern Lisp_Object save_match_data_load (Lisp_Object, Lisp_Object, Lisp_Object, | ||
| 4023 | Lisp_Object, Lisp_Object); | ||
| 4022 | extern int openp (Lisp_Object, Lisp_Object, Lisp_Object, | 4024 | extern int openp (Lisp_Object, Lisp_Object, Lisp_Object, |
| 4023 | Lisp_Object *, Lisp_Object, bool); | 4025 | Lisp_Object *, Lisp_Object, bool); |
| 4024 | enum { S2N_IGNORE_TRAILING = 1 }; | 4026 | enum { S2N_IGNORE_TRAILING = 1 }; |
diff --git a/src/lread.c b/src/lread.c index e06eafcf6cf..3152fcf867d 100644 --- a/src/lread.c +++ b/src/lread.c | |||
| @@ -1508,6 +1508,17 @@ Return t if the file exists and loads successfully. */) | |||
| 1508 | 1508 | ||
| 1509 | return Qt; | 1509 | return Qt; |
| 1510 | } | 1510 | } |
| 1511 | |||
| 1512 | Lisp_Object | ||
| 1513 | save_match_data_load (Lisp_Object file, Lisp_Object noerror, | ||
| 1514 | Lisp_Object nomessage, Lisp_Object nosuffix, | ||
| 1515 | Lisp_Object must_suffix) | ||
| 1516 | { | ||
| 1517 | ptrdiff_t count = SPECPDL_INDEX (); | ||
| 1518 | record_unwind_save_match_data (); | ||
| 1519 | Lisp_Object result = Fload (file, noerror, nomessage, nosuffix, must_suffix); | ||
| 1520 | return unbind_to (count, result); | ||
| 1521 | } | ||
| 1511 | 1522 | ||
| 1512 | static bool | 1523 | static bool |
| 1513 | complete_filename_p (Lisp_Object pathname) | 1524 | complete_filename_p (Lisp_Object pathname) |
diff --git a/src/macfont.m b/src/macfont.m index 2b7f963fd61..301951f34a5 100644 --- a/src/macfont.m +++ b/src/macfont.m | |||
| @@ -1663,8 +1663,8 @@ static struct font_driver macfont_driver = | |||
| 1663 | .match = macfont_match, | 1663 | .match = macfont_match, |
| 1664 | .list_family = macfont_list_family, | 1664 | .list_family = macfont_list_family, |
| 1665 | .free_entity = macfont_free_entity, | 1665 | .free_entity = macfont_free_entity, |
| 1666 | .open = macfont_open, | 1666 | .open_font = macfont_open, |
| 1667 | .close = macfont_close, | 1667 | .close_font = macfont_close, |
| 1668 | .has_char = macfont_has_char, | 1668 | .has_char = macfont_has_char, |
| 1669 | .encode_char = macfont_encode_char, | 1669 | .encode_char = macfont_encode_char, |
| 1670 | .text_extents = macfont_text_extents, | 1670 | .text_extents = macfont_text_extents, |
diff --git a/src/nsfont.m b/src/nsfont.m index e22a954e63f..7a40d672b5d 100644 --- a/src/nsfont.m +++ b/src/nsfont.m | |||
| @@ -1491,8 +1491,8 @@ struct font_driver const nsfont_driver = | |||
| 1491 | .list = nsfont_list, | 1491 | .list = nsfont_list, |
| 1492 | .match = nsfont_match, | 1492 | .match = nsfont_match, |
| 1493 | .list_family = nsfont_list_family, | 1493 | .list_family = nsfont_list_family, |
| 1494 | .open = nsfont_open, | 1494 | .open_font = nsfont_open, |
| 1495 | .close = nsfont_close, | 1495 | .close_font = nsfont_close, |
| 1496 | .has_char = nsfont_has_char, | 1496 | .has_char = nsfont_has_char, |
| 1497 | .encode_char = nsfont_encode_char, | 1497 | .encode_char = nsfont_encode_char, |
| 1498 | .text_extents = nsfont_text_extents, | 1498 | .text_extents = nsfont_text_extents, |
diff --git a/src/pdumper.c b/src/pdumper.c index 8b630d221b1..7d29d3c0c83 100644 --- a/src/pdumper.c +++ b/src/pdumper.c | |||
| @@ -4101,7 +4101,8 @@ types. */) | |||
| 4101 | ctx->header.magic[0] = '!'; /* Note that dump is incomplete. */ | 4101 | ctx->header.magic[0] = '!'; /* Note that dump is incomplete. */ |
| 4102 | 4102 | ||
| 4103 | verify (sizeof (fingerprint) == sizeof (ctx->header.fingerprint)); | 4103 | verify (sizeof (fingerprint) == sizeof (ctx->header.fingerprint)); |
| 4104 | memcpy (ctx->header.fingerprint, fingerprint, sizeof (fingerprint)); | 4104 | memcpy (ctx->header.fingerprint, (unsigned char *) fingerprint, |
| 4105 | sizeof (fingerprint)); | ||
| 4105 | 4106 | ||
| 4106 | const dump_off header_start = ctx->offset; | 4107 | const dump_off header_start = ctx->offset; |
| 4107 | dump_fingerprint ("dumping fingerprint", ctx->header.fingerprint); | 4108 | dump_fingerprint ("dumping fingerprint", ctx->header.fingerprint); |
| @@ -5359,9 +5360,10 @@ pdumper_load (const char *dump_filename) | |||
| 5359 | 5360 | ||
| 5360 | err = PDUMPER_LOAD_VERSION_MISMATCH; | 5361 | err = PDUMPER_LOAD_VERSION_MISMATCH; |
| 5361 | verify (sizeof (header->fingerprint) == sizeof (fingerprint)); | 5362 | verify (sizeof (header->fingerprint) == sizeof (fingerprint)); |
| 5362 | if (memcmp (header->fingerprint, fingerprint, sizeof (fingerprint)) != 0) | 5363 | if (memcmp (header->fingerprint, (unsigned char *) fingerprint, |
| 5364 | sizeof (fingerprint)) != 0) | ||
| 5363 | { | 5365 | { |
| 5364 | dump_fingerprint ("desired fingerprint", fingerprint); | 5366 | dump_fingerprint ("desired fingerprint", (unsigned char *) fingerprint); |
| 5365 | dump_fingerprint ("found fingerprint", header->fingerprint); | 5367 | dump_fingerprint ("found fingerprint", header->fingerprint); |
| 5366 | goto out; | 5368 | goto out; |
| 5367 | } | 5369 | } |
diff --git a/src/xfont.c b/src/xfont.c index 9a8417b12d4..e7a0cb2277d 100644 --- a/src/xfont.c +++ b/src/xfont.c | |||
| @@ -1106,8 +1106,8 @@ struct font_driver const xfont_driver = | |||
| 1106 | .list = xfont_list, | 1106 | .list = xfont_list, |
| 1107 | .match = xfont_match, | 1107 | .match = xfont_match, |
| 1108 | .list_family = xfont_list_family, | 1108 | .list_family = xfont_list_family, |
| 1109 | .open = xfont_open, | 1109 | .open_font = xfont_open, |
| 1110 | .close = xfont_close, | 1110 | .close_font = xfont_close, |
| 1111 | .prepare_face = xfont_prepare_face, | 1111 | .prepare_face = xfont_prepare_face, |
| 1112 | .has_char = xfont_has_char, | 1112 | .has_char = xfont_has_char, |
| 1113 | .encode_char = xfont_encode_char, | 1113 | .encode_char = xfont_encode_char, |
diff --git a/src/xftfont.c b/src/xftfont.c index 74add58007d..e0035808172 100644 --- a/src/xftfont.c +++ b/src/xftfont.c | |||
| @@ -643,8 +643,8 @@ struct font_driver const xftfont_driver = | |||
| 643 | .list = xftfont_list, | 643 | .list = xftfont_list, |
| 644 | .match = xftfont_match, | 644 | .match = xftfont_match, |
| 645 | .list_family = ftfont_list_family, | 645 | .list_family = ftfont_list_family, |
| 646 | .open = xftfont_open, | 646 | .open_font = xftfont_open, |
| 647 | .close = xftfont_close, | 647 | .close_font = xftfont_close, |
| 648 | .prepare_face = xftfont_prepare_face, | 648 | .prepare_face = xftfont_prepare_face, |
| 649 | .done_face = xftfont_done_face, | 649 | .done_face = xftfont_done_face, |
| 650 | .has_char = xftfont_has_char, | 650 | .has_char = xftfont_has_char, |
diff --git a/test/lisp/image-tests.el b/test/lisp/image-tests.el index 621646e5750..5a5b8ea1f71 100644 --- a/test/lisp/image-tests.el +++ b/test/lisp/image-tests.el | |||
| @@ -48,7 +48,7 @@ | |||
| 48 | 48 | ||
| 49 | (ert-deftest image-type-from-file-header-test () | 49 | (ert-deftest image-type-from-file-header-test () |
| 50 | "Test image-type-from-file-header." | 50 | "Test image-type-from-file-header." |
| 51 | (should (eq 'svg | 51 | (should (eq (if (image-type-available-p 'svg) 'svg) |
| 52 | (image-type-from-file-header | 52 | (image-type-from-file-header |
| 53 | (expand-file-name "splash.svg" | 53 | (expand-file-name "splash.svg" |
| 54 | image-tests--emacs-images-directory))))) | 54 | image-tests--emacs-images-directory))))) |