commit f8143323c7329ea94a05c6b318b0fe2e4c082834 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Sun Sep 8 10:13:13 2019 +0200 Fix Bug#37202 * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo) (shadow-test09-shadow-copy-files): Use truename of `shadow-test-remote-temporary-file-directory'. (Bug#37202) diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el index 2696704e7f..a93664f653 100644 --- a/test/lisp/shadowfile-tests.el +++ b/test/lisp/shadowfile-tests.el @@ -718,6 +718,8 @@ guaranteed by the originator of a cluster definition." (shadow-info-file shadow-test-info-file) (shadow-todo-file shadow-test-todo-file) (shadow-inhibit-message t) + (shadow-test-remote-temporary-file-directory + (file-truename shadow-test-remote-temporary-file-directory)) shadow-clusters shadow-literal-groups shadow-regexp-groups shadow-files-to-copy cluster1 cluster2 primary regexp file) @@ -856,6 +858,8 @@ guaranteed by the originator of a cluster definition." (shadow-info-file shadow-test-info-file) (shadow-todo-file shadow-test-todo-file) (shadow-inhibit-message t) + (shadow-test-remote-temporary-file-directory + (file-truename shadow-test-remote-temporary-file-directory)) (shadow-noquery t) shadow-clusters shadow-files-to-copy cluster1 cluster2 primary regexp file mocked-input) commit b6b7c7fc985eaadef2f059fac4442d23a3b706de Author: Paul Eggert Date: Sat Sep 7 18:08:12 2019 -0700 Fix bug when gc-cons-percentage is bumped to 0.8 Problem reported by Michael Heerdegen (Bug#37321). * src/alloc.c (gc_threshold): New static var. (bump_consing_until_gc): Change args from DIFF to THRESHOLD and PERCENTAGE. All uses changed. When accounting for a changed gc-cons-percentage, do not assume that total_bytes_of_live_objects returns the same value now that it did the last time we were called. diff --git a/src/alloc.c b/src/alloc.c index 5fc515f33b..be98cfd5f5 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -297,6 +297,10 @@ static ptrdiff_t pure_bytes_used_non_lisp; static intptr_t garbage_collection_inhibited; +/* The GC threshold in bytes, the last time it was calculated + from gc-cons-threshold and gc-cons-percentage. */ +static intmax_t gc_threshold; + /* If nonzero, this is a warning delivered by malloc and not yet displayed. */ @@ -5808,15 +5812,28 @@ consing_threshold (intmax_t threshold, Lisp_Object percentage) } } -/* Increment consing_until_gc by DIFF, avoiding overflow. */ +/* Adjust consing_until_gc, assuming gc-cons-threshold is THRESHOLD and + gc-cons-percentage is PERCENTAGE. */ static Lisp_Object -bump_consing_until_gc (intmax_t diff) +bump_consing_until_gc (intmax_t threshold, Lisp_Object percentage) { /* If consing_until_gc is negative leave it alone, since this prevents negative integer overflow and a GC would have been done soon anyway. */ - if (0 <= consing_until_gc - && INT_ADD_WRAPV (consing_until_gc, diff, &consing_until_gc)) - consing_until_gc = INTMAX_MAX; + if (0 <= consing_until_gc) + { + threshold = consing_threshold (threshold, percentage); + intmax_t sum; + if (INT_ADD_WRAPV (consing_until_gc, threshold - gc_threshold, &sum)) + { + /* Scale the threshold down so that consing_until_gc does + not overflow. */ + sum = INTMAX_MAX; + threshold = INTMAX_MAX - consing_until_gc + gc_threshold; + } + consing_until_gc = sum; + gc_threshold = threshold; + } + return Qnil; } @@ -5825,13 +5842,10 @@ static Lisp_Object watch_gc_cons_threshold (Lisp_Object symbol, Lisp_Object newval, Lisp_Object operation, Lisp_Object where) { - Lisp_Object percentage = Vgc_cons_percentage; intmax_t threshold; - intmax_t diff = (INTEGERP (newval) && integer_to_intmax (newval, &threshold) - ? (consing_threshold (threshold, percentage) - - consing_threshold (gc_cons_threshold, percentage)) - : 0); - return bump_consing_until_gc (diff); + if (! (INTEGERP (newval) && integer_to_intmax (newval, &threshold))) + return Qnil; + return bump_consing_until_gc (threshold, Vgc_cons_percentage); } /* Watch changes to gc-cons-percentage. */ @@ -5839,10 +5853,7 @@ static Lisp_Object watch_gc_cons_percentage (Lisp_Object symbol, Lisp_Object newval, Lisp_Object operation, Lisp_Object where) { - intmax_t threshold = gc_cons_threshold; - intmax_t diff = (consing_threshold (threshold, newval) - - consing_threshold (threshold, Vgc_cons_percentage)); - return bump_consing_until_gc (diff); + return bump_consing_until_gc (gc_cons_threshold, newval); } /* Subroutine of Fgarbage_collect that does most of the work. */ @@ -5987,8 +5998,8 @@ garbage_collect_1 (struct gcstat *gcst) unblock_input (); - consing_until_gc = consing_threshold (gc_cons_threshold, - Vgc_cons_percentage); + consing_until_gc = gc_threshold + = consing_threshold (gc_cons_threshold, Vgc_cons_percentage); if (garbage_collection_messages && NILP (Vmemory_full)) { commit 8e93e6da7cda4de82e3532cf74fc585451641398 Author: Stefan Kangas Date: Tue Aug 27 03:36:05 2019 +0200 Use derived-mode-p consistently in info.el * lisp/info.el (Info-hide-note-references, info-display-manual) (info--manual-names): Use derived-mode-p. (Bug#27583) diff --git a/lisp/info.el b/lisp/info.el index e22466af87..02f3ea580b 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -318,7 +318,7 @@ want to set `Info-refill-paragraphs'." (set sym val) (dolist (buffer (buffer-list)) (with-current-buffer buffer - (when (eq major-mode 'Info-mode) + (when (derived-mode-p 'Info-mode) (revert-buffer t t))))) :group 'info) @@ -5332,7 +5332,7 @@ completion alternatives to currently visited manuals." found) (dolist (buffer blist) (with-current-buffer buffer - (when (and (eq major-mode 'Info-mode) + (when (and (derived-mode-p 'Info-mode) (stringp Info-current-file) (string-match manual-re Info-current-file)) (setq found buffer @@ -5347,7 +5347,7 @@ completion alternatives to currently visited manuals." (let (names) (dolist (buffer (buffer-list)) (with-current-buffer buffer - (and (eq major-mode 'Info-mode) + (and (derived-mode-p 'Info-mode) (stringp Info-current-file) (not (string= (substring (buffer-name) 0 1) " ")) (push (file-name-sans-extension commit 8c0ae0f93ad28d9ef419ec589170d8a670ec0932 Author: Noam Postavsky Date: Sat Sep 7 17:00:39 2019 -0400 Let byte-compiler recognize that local-variable-p implies boundp * lisp/emacs-lisp/bytecomp.el (byte-compile-maybe-guarded): Add arguments to local-variable-p to the bound list. * lisp/image-mode.el (image-toggle-display-image): Remove no longer needed boundp check. diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 40b4e2f467..2fab11c79d 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el @@ -4071,7 +4071,7 @@ that suppresses all warnings during execution of BODY." ,condition '(fboundp functionp) byte-compile-unresolved-functions)) (bound-list (byte-compile-find-bound-condition - ,condition '(boundp default-boundp))) + ,condition '(boundp default-boundp local-variable-p))) ;; Maybe add to the bound list. (byte-compile-bound-variables (append bound-list byte-compile-bound-variables))) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 8630ac07e6..9c7c91eb58 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -727,9 +727,8 @@ was inserted." jka-compr-really-do-compress)) ;; This means the buffer holds the ;; decrypted content (bug#21870). - (not (and (boundp 'epa-file-encrypt-to) - (local-variable-p - 'epa-file-encrypt-to)))))) + (not (local-variable-p + 'epa-file-encrypt-to))))) (file-or-data (if data-p (let ((str commit 8d588f09e91e315c715cf824a9819a538a85cd9c Author: Joel Rosdahl Date: Wed Aug 28 21:00:00 2019 +0200 Fix flymake-proc temporary file deletion bug * list/progmodes/flymake-proc.el (flymake-proc-create-temp-inplace): Include a time string part (hour + minute + second + nanosecond) in the temporary name to make it unique enough. (flymake-proc-legacy-flymake): Store temporary file names in the process for usage in the sentinel. (flymake-proc--process-sentinel): Bind values of temporary file names dynamically to values stored in the process so that the cleanup function will delete the correct temporary file(s). Fixes bug#31981. diff --git a/lisp/progmodes/flymake-proc.el b/lisp/progmodes/flymake-proc.el index 2d5a47a079..f08ba2f368 100644 --- a/lisp/progmodes/flymake-proc.el +++ b/lisp/progmodes/flymake-proc.el @@ -654,7 +654,14 @@ Create parent directories as needed." (let ((cleanup-f (flymake-proc--get-cleanup-function (buffer-file-name)))) (flymake-log 3 "cleaning up using %s" cleanup-f) - (funcall cleanup-f)))) + ;; Make cleanup-f see the temporary file names + ;; created by its corresponding init function + ;; (bug#31981). + (let ((flymake-proc--temp-source-file-name + (process-get proc 'flymake-proc--temp-source-file-name)) + (flymake-proc--temp-master-file-name + (process-get proc 'flymake-proc--temp-master-file-name))) + (funcall cleanup-f))))) (kill-buffer output-buffer))))))) (defun flymake-proc--panic (problem explanation) @@ -824,6 +831,10 @@ can also be executed interactively independently of (process-put proc 'flymake-proc--output-buffer (generate-new-buffer (format " *flymake output for %s*" (current-buffer)))) + (process-put proc 'flymake-proc--temp-source-file-name + flymake-proc--temp-source-file-name) + (process-put proc 'flymake-proc--temp-master-file-name + flymake-proc--temp-master-file-name) (setq flymake-proc--current-process proc) (flymake-log 2 "started process %d, command=%s, dir=%s" (process-id proc) (process-command proc) @@ -865,6 +876,7 @@ can also be executed interactively independently of (let* ((ext (file-name-extension file-name)) (temp-name (file-truename (concat (file-name-sans-extension file-name) + "_" (format-time-string "%H%M%S%N") "_" prefix (and ext (concat "." ext)))))) (flymake-log 3 "create-temp-inplace: file=%s temp=%s" file-name temp-name) commit 14875443ff03d3c2b9cc63479e672957f99b730a Author: Eli Zaretskii Date: Sat Sep 7 15:53:57 2019 +0300 Support visiting compressed image files * lisp/image-mode.el (image-toggle-display-image): Support visiting compressed image files which are uncompressed by jka-compr.el. (Bug#37330) diff --git a/lisp/image-mode.el b/lisp/image-mode.el index 5c30f4085c..8630ac07e6 100644 --- a/lisp/image-mode.el +++ b/lisp/image-mode.el @@ -720,6 +720,11 @@ was inserted." archive-superior-buffer)) (not (and (boundp 'tar-superior-buffer) tar-superior-buffer)) + ;; This means the buffer holds the contents + ;; of a file uncompressed by jka-compr.el. + (not (and (local-variable-p + 'jka-compr-really-do-compress) + jka-compr-really-do-compress)) ;; This means the buffer holds the ;; decrypted content (bug#21870). (not (and (boundp 'epa-file-encrypt-to) commit 01a04880ca7469626a03ea10481d60c5ddec4663 Author: Michael Albinus Date: Sat Sep 7 12:31:31 2019 +0200 Add traces in shadowfile * lisp/shadowfile.el (shadow-add-to-todo) (shadow-remove-from-todo, shadow-save-todo-file): * test/lisp/shadowfile-tests.el (shadow-test08-shadow-todo): Add traces. diff --git a/lisp/shadowfile.el b/lisp/shadowfile.el index 4566ea19f8..2778e58367 100644 --- a/lisp/shadowfile.el +++ b/lisp/shadowfile.el @@ -634,6 +634,10 @@ Consider them as regular expressions if third arg REGEXP is true." (let ((shadows (shadow-shadows-of (shadow-expand-file-name (buffer-file-name (current-buffer)))))) + (when shadow-debug + (message + "shadow-add-to-todo: %s %s\n%s" + shadows shadow-files-to-copy (with-output-to-string (backtrace)))) (when shadows (setq shadow-files-to-copy (shadow-union shadows shadow-files-to-copy)) @@ -647,6 +651,10 @@ Consider them as regular expressions if third arg REGEXP is true." (defun shadow-remove-from-todo (pair) "Remove PAIR from `shadow-files-to-copy'. PAIR must be `eq' to one of the elements of that list." + (when shadow-debug + (message + "shadow-remove-from-todo: %s %s\n%s" + pair shadow-files-to-copy (with-output-to-string (backtrace)))) (setq shadow-files-to-copy (cl-remove-if (lambda (s) (eq s pair)) shadow-files-to-copy))) @@ -717,6 +725,8 @@ With non-nil argument also saves the buffer." (if save (shadow-save-todo-file)))) (defun shadow-save-todo-file () + (when shadow-debug + (message "shadow-save-todo-file:\n%s" (with-output-to-string (backtrace)))) (if (and shadow-todo-buffer (buffer-modified-p shadow-todo-buffer)) (with-current-buffer shadow-todo-buffer (condition-case nil ; have to continue even in case of @@ -772,7 +782,7 @@ look for files that have been changed and need to be copied to other systems." (buffer-list)))) (yes-or-no-p "Modified buffers exist; exit anyway? ")) (or (not (fboundp 'process-list)) - ;; process-list is not defined on MSDOS. + ;; `process-list' is not defined on MSDOS. (let ((processes (process-list)) active) (while processes diff --git a/test/lisp/shadowfile-tests.el b/test/lisp/shadowfile-tests.el index a523a340a4..2696704e7f 100644 --- a/test/lisp/shadowfile-tests.el +++ b/test/lisp/shadowfile-tests.el @@ -126,9 +126,9 @@ guaranteed by the originator of a cluster definition." (unwind-protect ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. - (cl-letf* (((symbol-function 'read-from-minibuffer) + (cl-letf* (((symbol-function #'read-from-minibuffer) (lambda (&rest args) (pop mocked-input))) - ((symbol-function 'read-string) + ((symbol-function #'read-string) (lambda (&rest args) (pop mocked-input)))) ;; Cleanup & initialize. @@ -140,7 +140,7 @@ guaranteed by the originator of a cluster definition." primary shadow-system-name regexp (shadow-regexp-superquote primary) mocked-input `(,cluster ,primary ,regexp)) - (call-interactively 'shadow-define-cluster) + (call-interactively #'shadow-define-cluster) (should (string-equal (shadow-cluster-name (shadow-get-cluster cluster)) cluster)) @@ -164,7 +164,7 @@ guaranteed by the originator of a cluster definition." mocked-input `(,cluster ,cluster ,primary ,regexp)) (with-current-buffer (messages-buffer) (narrow-to-region (point-max) (point-max))) - (call-interactively 'shadow-define-cluster) + (call-interactively #'shadow-define-cluster) (should (string-match (regexp-quote "Not a valid primary!") @@ -185,7 +185,7 @@ guaranteed by the originator of a cluster definition." mocked-input `(,cluster ,primary ,cluster ,regexp)) (with-current-buffer (messages-buffer) (narrow-to-region (point-max) (point-max))) - (call-interactively 'shadow-define-cluster) + (call-interactively #'shadow-define-cluster) (should (string-match (regexp-quote "Regexp doesn't include the primary host!") @@ -206,7 +206,7 @@ guaranteed by the originator of a cluster definition." (file-remote-p shadow-test-remote-temporary-file-directory) regexp (shadow-regexp-superquote primary) mocked-input `(,cluster ,primary ,regexp)) - (call-interactively 'shadow-define-cluster) + (call-interactively #'shadow-define-cluster) (should (string-equal (shadow-cluster-name (shadow-get-cluster cluster)) cluster)) @@ -243,9 +243,9 @@ guaranteed by the originator of a cluster definition." (unwind-protect ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. - (cl-letf* (((symbol-function 'read-from-minibuffer) + (cl-letf* (((symbol-function #'read-from-minibuffer) (lambda (&rest args) (pop mocked-input))) - ((symbol-function 'read-string) + ((symbol-function #'read-string) (lambda (&rest args) (pop mocked-input)))) ;; Cleanup & initialize. @@ -596,9 +596,9 @@ guaranteed by the originator of a cluster definition." (unwind-protect ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. - (cl-letf* (((symbol-function 'read-from-minibuffer) + (cl-letf* (((symbol-function #'read-from-minibuffer) (lambda (&rest args) (pop mocked-input))) - ((symbol-function 'read-string) + ((symbol-function #'read-string) (lambda (&rest args) (pop mocked-input)))) ;; Cleanup & initialize. @@ -629,7 +629,7 @@ guaranteed by the originator of a cluster definition." mocked-input `(,cluster1 ,file1 ,cluster2 ,file2 ,(kbd "RET"))) (with-temp-buffer (set-visited-file-name file1) - (call-interactively 'shadow-define-literal-group) + (call-interactively #'shadow-define-literal-group) (set-buffer-modified-p nil)) ;; `shadow-literal-groups' is a list of lists. @@ -657,9 +657,9 @@ guaranteed by the originator of a cluster definition." (unwind-protect ;; We must mock `read-from-minibuffer' and `read-string', in ;; order to avoid interactive arguments. - (cl-letf* (((symbol-function 'read-from-minibuffer) + (cl-letf* (((symbol-function #'read-from-minibuffer) (lambda (&rest args) (pop mocked-input))) - ((symbol-function 'read-string) + ((symbol-function #'read-string) (lambda (&rest args) (pop mocked-input)))) ;; Cleanup & initialize. @@ -686,7 +686,8 @@ guaranteed by the originator of a cluster definition." ,cluster1 ,cluster2 ,(kbd "RET"))) (with-temp-buffer (set-visited-file-name nil) - (call-interactively 'shadow-define-regexp-group)) + (call-interactively #'shadow-define-regexp-group) + (set-buffer-modified-p nil)) ;; `shadow-regexp-groups' is a list of lists. (should (consp shadow-regexp-groups)) @@ -733,7 +734,9 @@ guaranteed by the originator of a cluster definition." regexp (shadow-regexp-superquote primary)) (shadow-set-cluster cluster1 primary regexp) (when shadow-debug - (message "%s %s %s %s" cluster1 primary regexp shadow-clusters)) + (message + "shadow-test08-shadow-todo: %s %s %s %s" + cluster1 primary regexp shadow-clusters)) (setq cluster2 "cluster2" primary @@ -741,7 +744,9 @@ guaranteed by the originator of a cluster definition." regexp (shadow-regexp-superquote primary)) (shadow-set-cluster cluster2 primary regexp) (when shadow-debug - (message "%s %s %s %s" cluster2 primary regexp shadow-clusters)) + (message + "shadow-test08-shadow-todo: %s %s %s %s" + cluster2 primary regexp shadow-clusters)) ;; Define a literal group. (setq file @@ -750,7 +755,8 @@ guaranteed by the originator of a cluster definition." shadow-literal-groups `((,(concat "/cluster1:" file) ,(concat "/cluster2:" file)))) (when shadow-debug - (message "%s %s" file shadow-literal-groups)) + (message + "shadow-test08-shadow-todo: %s %s" file shadow-literal-groups)) ;; Save file from "cluster1" definition. (with-temp-buffer @@ -759,7 +765,7 @@ guaranteed by the originator of a cluster definition." (save-buffer)) (when shadow-debug (message - "%s %s" + "shadow-test08-shadow-todo: %s %s" (cons file (shadow-contract-file-name (concat "/cluster2:" file))) shadow-files-to-copy)) (should @@ -774,7 +780,7 @@ guaranteed by the originator of a cluster definition." (save-buffer)) (when shadow-debug (message - "%s %s" + "shadow-test08-shadow-todo: %s %s" (cons (concat (shadow-site-primary cluster2) file) (shadow-contract-file-name (concat "/cluster1:" file))) @@ -794,7 +800,8 @@ guaranteed by the originator of a cluster definition." ,(concat (shadow-site-primary cluster2) (shadow-regexp-superquote file))))) (when shadow-debug - (message "%s %s" file shadow-regexp-groups)) + (message + "shadow-test08-shadow-todo: %s %s" file shadow-regexp-groups)) ;; Save file from "cluster1" definition. (with-temp-buffer @@ -803,7 +810,7 @@ guaranteed by the originator of a cluster definition." (save-buffer)) (when shadow-debug (message - "%s %s" + "shadow-test08-shadow-todo: %s %s" (cons file (shadow-contract-file-name (concat "/cluster2:" file))) shadow-files-to-copy)) (should @@ -818,7 +825,7 @@ guaranteed by the originator of a cluster definition." (save-buffer)) (when shadow-debug (message - "%s %s" + "shadow-test08-shadow-todo: %s %s" (cons (concat (shadow-site-primary cluster2) file) (shadow-contract-file-name (concat "/cluster1:" file))) @@ -898,7 +905,7 @@ guaranteed by the originator of a cluster definition." ;; We must mock `write-region', in order to check proper ;; action. (add-function - :before (symbol-function 'write-region) + :before (symbol-function #'write-region) (lambda (&rest args) (when (and (buffer-file-name) mocked-input) (should (equal (buffer-file-name) (pop mocked-input))))) @@ -913,7 +920,7 @@ guaranteed by the originator of a cluster definition." (looking-at (regexp-quote "(setq shadow-files-to-copy nil)"))))) ;; Cleanup. - (remove-function (symbol-function 'write-region) "write-region-mock") + (remove-function (symbol-function #'write-region) "write-region-mock") (dolist (elt `(,file ,(concat (shadow-site-primary cluster2) file))) (ignore-errors (with-current-buffer (get-file-buffer elt) commit 52f83af1f3975130b6bd035166780c2c2dde778c Author: Evgeny Zajcev Date: Wed Sep 4 18:09:55 2019 +0300 Fix input method operation on read-only text * lisp/international/quail.el (quail-input-method): Check also read-only property of text in addition to the buffer's read-only state. diff --git a/lisp/international/quail.el b/lisp/international/quail.el index f42b594dc4..e91175fb83 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el @@ -1329,7 +1329,8 @@ If STR has `advice' text property, append the following special event: (defvar quail-conversion-str nil) (defun quail-input-method (key) - (if (or (and buffer-read-only + (if (or (and (or buffer-read-only + (get-char-property (point) 'read-only)) (not (or inhibit-read-only (get-char-property (point) 'inhibit-read-only)))) (and overriding-terminal-local-map commit 40eb4c51a40a37c14e882e6db3f880ba4528c089 Author: Eli Zaretskii Date: Sat Sep 7 12:42:52 2019 +0300 ; (server-goto-toplevel): Fix comment to reflect the code. diff --git a/lisp/server.el b/lisp/server.el index 45e3d007e4..ac81cdbd48 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -931,7 +931,6 @@ This handles splitting the command if it would be bigger than ;; to open a frame on a new display, we might end up with an unusable ;; frame because input from that display will be blocked (until exiting ;; the minibuffer). Better exit this minibuffer right away. - ;; Similarly with recursive-edits such as the splash screen. (run-with-timer 0 nil (lambda () (server-execute-continuation proc))) (top-level))) commit cac8152c8e550df634c22c0570e1fd69f2bef68c Author: Eli Zaretskii Date: Sat Sep 7 12:33:03 2019 +0300 Allow client connections when in recursive-edit * lisp/server.el (server-goto-toplevel): Check minibuffer depth, not recursion depth. This avoids exiting recursive-edit if a client connection is accepted during recursive-edit. (Bug#37176) diff --git a/lisp/server.el b/lisp/server.el index d491a26037..45e3d007e4 100644 --- a/lisp/server.el +++ b/lisp/server.el @@ -926,7 +926,7 @@ This handles splitting the command if it would be bigger than (isearch-cancel)))) ;; Signaled by isearch-cancel. (quit (message nil))) - (when (> (recursion-depth) 0) + (when (> (minibuffer-depth) 0) ;; We're inside a minibuffer already, so if the emacs-client is trying ;; to open a frame on a new display, we might end up with an unusable ;; frame because input from that display will be blocked (until exiting commit f34f49f35e5c000a6ee070678f43d2ca38b76cad Author: Eli Zaretskii Date: Sat Sep 7 12:26:08 2019 +0300 Set inhibit-compacting-font-caches to t by default on MS-Windows * src/font.c (syms_of_font) [WINDOWSNT]: Set inhibit-compacting-font-caches to t by default. * etc/NEWS: Mention the change. diff --git a/etc/NEWS b/etc/NEWS index d5130e9f3c..d951444675 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2663,6 +2663,11 @@ is being used, except in Far Eastern locales. When this variable is non-zero, Emacs at startup sets 'locale-coding-system' to the corresponding encoding, instead of using 'w32-ansi-code-page'. +--- +** The default value of 'inhibit-compacting-font-caches' is t on MS-Windows. +Experience shows that compacting font caches causes more trouble on +MS-Windows than it helps. + +++ ** On NS the behaviour of drag and drop can now be modified by use of modifier keys in line with Apples guidelines. This makes the drag and diff --git a/src/font.c b/src/font.c index ce85e0bb4a..935dd64e64 100644 --- a/src/font.c +++ b/src/font.c @@ -5509,7 +5509,14 @@ and cannot switch to a smaller font for those characters, set this variable non-nil. Disabling compaction of font caches might enlarge the Emacs memory footprint in sessions that use lots of different fonts. */); + +#ifdef WINDOWSNT + /* Compacting font caches causes slow redisplay on Windows with many + large fonts, so we disable it by default. */ + inhibit_compacting_font_caches = 1; +#else inhibit_compacting_font_caches = 0; +#endif DEFVAR_BOOL ("xft-ignore-color-fonts", Vxft_ignore_color_fonts, commit 7eaca940ceecc812d6099de64bf7e7a5081fdfb2 Author: Eli Zaretskii Date: Sat Sep 7 12:19:06 2019 +0300 Allow Zs characters to be composed * src/composite.c (char_composable_p): Allow SPC and other Zs characters to be composed. * lisp/composite.el (compose-gstring-for-graphic): Don't reject characters whose general category is Zs. (Bug#14461) diff --git a/lisp/composite.el b/lisp/composite.el index d0f2094943..b3661cc2fa 100644 --- a/lisp/composite.el +++ b/lisp/composite.el @@ -558,9 +558,9 @@ All non-spacing characters have this function in ;; "Improper" base characters are of the following general ;; categories: ;; Mark (nonspacing, combining, enclosing) - ;; Separator (space, line, paragraph) + ;; Separator (line, paragraph) ;; Other (control, format, surrogate) - '(Mn Mc Me Zs Zl Zp Cc Cf Cs)) + '(Mn Mc Me Zl Zp Cc Cf Cs)) nil) ;; A base character and the following non-spacing characters. diff --git a/src/composite.c b/src/composite.c index a6606d5fc4..efbd055cef 100644 --- a/src/composite.c +++ b/src/composite.c @@ -919,16 +919,17 @@ autocmp_chars (Lisp_Object rule, ptrdiff_t charpos, ptrdiff_t bytepos, } /* 1 iff the character C is composable. Characters of general - category Z? or C? are not composable except for ZWNJ and ZWJ. */ + category Z? or C? are not composable except for ZWNJ and ZWJ, + and characters of category Zs. */ static bool char_composable_p (int c) { Lisp_Object val; - return (c > ' ' + return (c >= ' ' && (c == ZERO_WIDTH_NON_JOINER || c == ZERO_WIDTH_JOINER || (val = CHAR_TABLE_REF (Vunicode_category_table, c), - (FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_So))))); + (FIXNUMP (val) && (XFIXNUM (val) <= UNICODE_CATEGORY_Zs))))); } /* Update cmp_it->stop_pos to the next position after CHARPOS (and