commit 428950fc3c32768188b04b786973e11f99dad129 (HEAD, refs/remotes/origin/master) Author: Michael Albinus Date: Sat Aug 20 08:44:57 2022 +0200 Improve Tramp's manual * doc/misc/tramp.texi (Frequently Asked Questions): Improve recommendations for speeding up. diff --git a/doc/misc/tramp.texi b/doc/misc/tramp.texi index 96ffb5c880..0e55b6c1d2 100644 --- a/doc/misc/tramp.texi +++ b/doc/misc/tramp.texi @@ -4826,9 +4826,12 @@ authentication delays. During these operations, @value{tramp}'s responsiveness slows down. Some suggestions within the scope of @value{tramp}'s settings include: +@itemize @minus +@item Use an external method, such as @option{scp}, which are faster than -internal methods. +internal methods for large files. +@item Keep the file @code{tramp-persistency-file-name}, which is where @value{tramp} caches remote information about hosts and files. Caching is enabled by default. Don't disable it. @@ -4839,6 +4842,7 @@ files are not independently updated outside @value{tramp}'s control. That cache cleanup will be necessary if the remote directories or files are updated independent of @value{tramp}. +@item Disable version control to avoid delays: @lisp @@ -4858,9 +4862,17 @@ about, for example: (setq vc-handled-backends '(SVN Git)) @end lisp +@item +@vindex remote-file-name-inhibit-locks +Disable file locks. Set @code{remote-file-name-inhibit-locks} to +@code{t} if you know that different Emacs sessions are not modifying +the same remote file. + +@item Disable excessive traces. Set @code{tramp-verbose} to 3 or lower, default being 3. Increase trace levels temporarily when hunting for bugs. +@end itemize @item commit 3173eb53aa48be288009db20302468337d23e4ec Author: Protesilaos Stavrou Date: Sat Aug 20 09:22:50 2022 +0300 Fix typos in modus-themes.org * modus-themes.org (Option for inhibiting theme reload) (Option for completion framework aesthetics, Advanced customization) (Remap face with local value, Cycle through arbitrary colors) (Custom Org emphasis faces, Note on git-gutter in Doom Emacs): Fix typographic errors. diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index f375045251..1b4bf88a0c 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -619,7 +619,7 @@ By default, customizing a theme-related user option through the Custom interfaces or with {{{kbd(M-x customize-set-variable)}}} will not reload the currently active Modus theme. -Enable this behaviour by setting this variable to ~nil~. +Enable this behavior by setting this variable to ~nil~. Regardless of this option, the active theme must be reloaded for changes to user options to take effect ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enable and load]]). @@ -1253,7 +1253,7 @@ accepts is as follows (order is not significant): The ~popup~ key takes the same values as ~selection~. -Apart from specfying each key separately, a fallback list is accepted. +Apart from specifying each key separately, a fallback list is accepted. This is only useful when the desired aesthetic is the same across all keys that are not explicitly referenced. For example, this: @@ -2171,7 +2171,7 @@ things with precision ([[#h:bf1c82f2-46c7-4eb2-ad00-dd11fdd8b53f][Customization This section is of interest only to users who are prepared to maintain their own local tweaks and who are willing to deal with any possible incompatibilities between versioned releases of the themes. As such, -they are labelled as "do-it-yourself" or "DIY". +they are labeled as "do-it-yourself" or "DIY". ** More accurate colors in terminal emulators :PROPERTIES: @@ -2614,7 +2614,7 @@ this example: Whenever we enter a ~diff-mode~ buffer, we now get a magenta-colored region. -Perhaps you may wish to generalise those findings in to a set of +Perhaps you may wish to generalize those findings in to a set of functions that also accept an arbitrary face. We shall leave the experimentation up to you. @@ -2633,8 +2633,7 @@ contrast on an on-demand basis. One way to achieve this is to design a command that cycles through three distinct levels of intensity, though the following can be adapted to any -kind of cyclic behaviour, such as to switch between red, green, and -blue. +kind of cyclic behavior, such as to switch between red, green, and blue. In the following example, we employ the ~modus-themes-color~ function which reads a symbol that represents an entry in the active theme's @@ -3639,7 +3638,7 @@ it if you plan to control face attributes. :end: #+cindex: Org custom emphasis faces -Org provides the user option ~org-emphasis-alist~ which assosiates a +Org provides the user option ~org-emphasis-alist~ which associates a character with a face, list of faces, or face attributes. The default specification of that variable looks like this: @@ -4888,7 +4887,7 @@ The =git-gutter= and =git-gutter-fr= packages default to drawing bitmaps for the indicators they display (e.g. bitmap of a plus sign for added lines). In Doom Emacs, these bitmaps are replaced with contiguous lines which may look nicer, but require a change to the foreground of the -relevant faces to yield the desired colour combinations. +relevant faces to yield the desired color combinations. Since this is Doom-specific, we urge users to apply changes in their local setup. Below is some sample code, based on what we cover at commit b2f9c4c6d4bf4a0f1f1f7342cb9de410f187c40c Author: Po Lu Date: Sat Aug 20 10:32:09 2022 +0800 Fix crash when the keymap changes * src/xterm.c (handle_one_xevent): Call XkbRefreshKeyboardMapping first before trying to update the map. diff --git a/src/xterm.c b/src/xterm.c index 12c7b7d4dc..39e5a8e186 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -23027,6 +23027,8 @@ handle_one_xevent (struct x_display_info *dpyinfo, if (xkbevent->any.xkb_type == XkbNewKeyboardNotify || xkbevent->any.xkb_type == XkbMapNotify) { + XkbRefreshKeyboardMapping (&xkbevent->map); + if (dpyinfo->xkb_desc) { if (XkbGetUpdatedMap (dpyinfo->display, @@ -23035,11 +23037,9 @@ handle_one_xevent (struct x_display_info *dpyinfo, | XkbModifierMapMask | XkbVirtualModsMask), dpyinfo->xkb_desc) == Success) - { - XkbGetNames (dpyinfo->display, - XkbGroupNamesMask | XkbVirtualModNamesMask, - dpyinfo->xkb_desc); - } + XkbGetNames (dpyinfo->display, + XkbGroupNamesMask | XkbVirtualModNamesMask, + dpyinfo->xkb_desc); else { XkbFreeKeyboard (dpyinfo->xkb_desc, XkbAllComponentsMask, True); @@ -23061,7 +23061,6 @@ handle_one_xevent (struct x_display_info *dpyinfo, dpyinfo->xkb_desc); } - XkbRefreshKeyboardMapping (&xkbevent->map); x_find_modifier_meanings (dpyinfo); } else if (x_dnd_in_progress commit 9a7b3673e09fe839163bf35e25e37e2ac62bc272 Author: Mattias Engdegård Date: Wed Aug 17 20:29:27 2022 +0200 Move `while` syntax check from optimiser to macroexpand * lisp/emacs-lisp/byte-opt.el (byte-optimize-while): Move check... * lisp/emacs-lisp/macroexp.el (macroexp--expand-all): ...here. diff --git a/lisp/emacs-lisp/byte-opt.el b/lisp/emacs-lisp/byte-opt.el index 1751669445..2467b468a4 100644 --- a/lisp/emacs-lisp/byte-opt.el +++ b/lisp/emacs-lisp/byte-opt.el @@ -1317,9 +1317,6 @@ See Info node `(elisp) Integer Basics'." (list 'progn condition nil))))) (defun byte-optimize-while (form) - ;; FIXME: This check does not belong here, move! - (when (< (length form) 2) - (byte-compile-warn-x form "too few arguments for `while'")) (let ((condition (nth 1 form))) (if (byte-compile-nilconstp condition) condition diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 40ed0344df..c3ba1b36d4 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -371,6 +371,11 @@ Assumes the caller has bound `macroexpand-all-environment'." (macroexp--all-forms body)) (cdr form)) form))) + (`(while) + (macroexp-warn-and-return + "missing `while' condition" + `(signal 'wrong-number-of-arguments '(while 0)) + nil 'compile-only form)) (`(setq ,(and var (pred symbolp) (pred (not booleanp)) (pred (not keywordp))) ,expr) commit a936335aa02bd6d142ce61563e6cf70a1a7c271b Author: Stefan Kangas Date: Fri Aug 19 20:19:59 2022 +0200 Fix return value of help--key-description-fontified This fixes a bug with warning about obsolete commands in `command-execute', where we incorrectly showed empty parenthesis instead of the empty string when there was no keybinding for the new command. * lisp/help.el (help--key-description-fontified): Return nil instead of the empty string if KEYS argument is nil. * test/lisp/help-tests.el (help--key-description-fontified): New test. (with-substitute-command-keys-test): Fix indentation. diff --git a/lisp/help.el b/lisp/help.el index 37aab15df0..15ab3192ad 100644 --- a/lisp/help.el +++ b/lisp/help.el @@ -566,13 +566,16 @@ To record all your input, use `open-dribble-file'." ;; Key bindings (defun help--key-description-fontified (keys &optional prefix) - "Like `key-description' but add face for \"*Help*\" buffers." - ;; We add both the `font-lock-face' and `face' properties here, as this - ;; seems to be the only way to get this to work reliably in any - ;; buffer. - (propertize (key-description keys prefix) - 'font-lock-face 'help-key-binding - 'face 'help-key-binding)) + "Like `key-description' but add face for \"*Help*\" buffers. +KEYS is the return value of `(where-is-internal \\='foo-cmd nil t)'. +Return nil if KEYS is nil." + (when keys + ;; We add both the `font-lock-face' and `face' properties here, as this + ;; seems to be the only way to get this to work reliably in any + ;; buffer. + (propertize (key-description keys prefix) + 'font-lock-face 'help-key-binding + 'face 'help-key-binding))) (defcustom describe-bindings-outline t "Non-nil enables outlines in the output buffer of `describe-bindings'." diff --git a/test/lisp/help-tests.el b/test/lisp/help-tests.el index 7f30b27b00..833c32ffb2 100644 --- a/test/lisp/help-tests.el +++ b/test/lisp/help-tests.el @@ -55,18 +55,24 @@ (should (equal (help-split-fundoc nil t 'usage) nil)) (should (equal (help-split-fundoc nil t 'doc) nil)))) +(ert-deftest help--key-description-fontified () + (should (equal (help--key-description-fontified + (where-is-internal #'next-line nil t)) + "C-n")) + (should-not (help--key-description-fontified nil))) + ;;; substitute-command-keys (defmacro with-substitute-command-keys-test (&rest body) `(cl-flet* ((test - (lambda (orig result) - (should (equal (substitute-command-keys orig) - result)))) + (lambda (orig result) + (should (equal (substitute-command-keys orig) + result)))) (test-re - (lambda (orig regexp) - (should (string-match (concat "\\`" regexp "\\'") - (substitute-command-keys orig)))))) + (lambda (orig regexp) + (should (string-match (concat "\\`" regexp "\\'") + (substitute-command-keys orig)))))) ,@body)) (ert-deftest help-tests-substitute-command-keys/no-change () commit 935e4da0e1389fd5a8f836ac81dc53d698f4439f Author: Stefan Kangas Date: Fri Aug 19 19:00:24 2022 +0200 Display new keybinding in obsolete command warning * lisp/emacs-lisp/macroexp.el (macroexp--obsolete-warning): * lisp/simple.el (command-execute): When warning about an obsolete command, display the keybinding for the new command. diff --git a/lisp/emacs-lisp/macroexp.el b/lisp/emacs-lisp/macroexp.el index 5ae9d8368f..40ed0344df 100644 --- a/lisp/emacs-lisp/macroexp.el +++ b/lisp/emacs-lisp/macroexp.el @@ -187,13 +187,15 @@ It should normally be a symbol with position and it defaults to FORM." msg)) form))) -(defun macroexp--obsolete-warning (fun obsolescence-data type) +(defun macroexp--obsolete-warning (fun obsolescence-data type &optional key) (let ((instead (car obsolescence-data)) (asof (nth 2 obsolescence-data))) (format-message "`%s' is an obsolete %s%s%s" fun type (if asof (concat " (as of " asof ")") "") (cond ((stringp instead) (concat "; " (substitute-command-keys instead))) + ((and instead key) + (format-message "; use `%s' (%s) instead." instead key)) (instead (format-message "; use `%s' instead." instead)) (t "."))))) diff --git a/lisp/simple.el b/lisp/simple.el index 8fb03f3b04..d862c0e9a8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2716,12 +2716,15 @@ don't clear it." (t ;; Pass `cmd' rather than `final', for the backtrace's sake. (prog1 (call-interactively cmd record-flag keys) - (when (and (symbolp cmd) - (get cmd 'byte-obsolete-info) - (not (get cmd 'command-execute-obsolete-warned))) + (when-let ((info + (and (symbolp cmd) + (not (get cmd 'command-execute-obsolete-warned)) + (get cmd 'byte-obsolete-info)))) (put cmd 'command-execute-obsolete-warned t) (message "%s" (macroexp--obsolete-warning - cmd (get cmd 'byte-obsolete-info) "command")))))))))) + cmd info "command" + (help--key-description-fontified + (where-is-internal (car info) nil t)))))))))))) (defun command-execute--query (command) "Query the user whether to run COMMAND." commit 021ae515f912d941f0c41d2c6d3c8d322ac9e584 Author: Stefan Kangas Date: Fri Aug 19 18:24:42 2022 +0200 * lisp/bookmark.el (bookmark-menu-heading): Delete face. diff --git a/lisp/bookmark.el b/lisp/bookmark.el index db2063f4ea..b3b3660902 100644 --- a/lisp/bookmark.el +++ b/lisp/bookmark.el @@ -202,12 +202,6 @@ If nil, don't display a mark on the fringe." :set #'fringe-custom-set-bitmap :version "29.1") -;; FIXME: No longer used. Should be declared obsolete or removed. -(defface bookmark-menu-heading - '((t (:inherit font-lock-type-face))) - "Face used to highlight the heading in bookmark menu buffers." - :version "22.1") - (defface bookmark-face '((((class grayscale) (background light)) commit ec62bb7799a7a32bb7840c64f48ce0795d3e6fd0 Author: Stefan Kangas Date: Fri Aug 19 18:18:32 2022 +0200 Ignore variable Info-fontify, deleted in 22.1 * lisp/info.el (Info-mode-hook): Don't obey variable Info-fontify, deleted in Emacs 22.1. diff --git a/lisp/info.el b/lisp/info.el index 7c1b34ed64..fb4c3fd782 100644 --- a/lisp/info.el +++ b/lisp/info.el @@ -289,12 +289,10 @@ with wrapping around the current Info node." (defvar Info-isearch-initial-history nil) (defvar Info-isearch-initial-history-list nil) -(defcustom Info-mode-hook - ;; Try to obey obsolete Info-fontify settings. - (unless (and (boundp 'Info-fontify) (null Info-fontify)) - '(turn-on-font-lock)) +(defcustom Info-mode-hook '(turn-on-font-lock) "Hook run when activating Info Mode." - :type 'hook) + :type 'hook + :version "29.1") (defcustom Info-selection-hook nil "Hook run when an Info node is selected as the current node." commit da635838f25eddc5df041ece31b527828d49abcc Author: Stefan Kangas Date: Fri Aug 19 18:14:12 2022 +0200 Make two compat aliases obsolete in cc-defs.el * lisp/progmodes/cc-defs.el (c-regexp-opt, c-regexp-opt-depth): Make compat alias obsolete. diff --git a/lisp/progmodes/cc-defs.el b/lisp/progmodes/cc-defs.el index 48ae4368a7..f867625480 100644 --- a/lisp/progmodes/cc-defs.el +++ b/lisp/progmodes/cc-defs.el @@ -2071,8 +2071,8 @@ non-nil, a caret is prepended to invert the set." str)) ;; Leftovers from (X)Emacs 19 compatibility. -(defalias 'c-regexp-opt 'regexp-opt) -(defalias 'c-regexp-opt-depth 'regexp-opt-depth) +(define-obsolete-function-alias 'c-regexp-opt #'regexp-opt "29.1") +(define-obsolete-function-alias 'c-regexp-opt-depth #'regexp-opt-depth "29.1") ;; Figure out what features this Emacs has commit b7d6ebff078cece09c3e7a84c34ea4fe65e65917 Author: Stefan Kangas Date: Fri Aug 19 17:59:13 2022 +0200 ; Delete not-useful comments referring to Emacs 19. diff --git a/lisp/calc/calc-yank.el b/lisp/calc/calc-yank.el index 71cc68b0c2..d4594370ca 100644 --- a/lisp/calc/calc-yank.el +++ b/lisp/calc/calc-yank.el @@ -150,7 +150,6 @@ ;; This function uses calc-last-kill if possible to get an exact result, ;; otherwise it just parses the yanked string. -;; Modified to use Emacs 19 extended concept of kill-ring. -- daveg 12/15/96 ;;;###autoload (defun calc-yank-internal (radix thing-raw) "Internal common implementation for yank functions. diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index 04ead562f2..a5ab3a50ff 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el @@ -2232,7 +2232,6 @@ nil." (progn (ispell-set-spellchecker-params) ; Initialize variables and dict alists. (ispell-accept-buffer-local-defs) ; Use the correct dictionary. - ;; This code copied in part from ispell.el Emacs 19.34 (dolist (w checkdoc-ispell-lisp-words) (process-send-string ispell-process (concat "@" w "\n")))) (error (setq checkdoc-spellcheck-documentation-flag nil))))) diff --git a/lisp/emacs-lisp/edebug.el b/lisp/emacs-lisp/edebug.el index dff16df002..9de8999fdf 100644 --- a/lisp/emacs-lisp/edebug.el +++ b/lisp/emacs-lisp/edebug.el @@ -2861,7 +2861,6 @@ See `edebug-behavior-alist' for implementations.") (this-command this-command) (current-prefix-arg nil) - ;; More for Emacs 19 (last-input-event nil) (last-command-event nil) (last-event-frame nil) diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 03c5b94e3b..cbf38e7dd8 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -111,7 +111,7 @@ ;; provide the functionality or interface that I wanted, so I wrote ;; this. -;; Unlike previous profilers, elp uses Emacs 19's built-in function +;; Unlike previous profilers, elp uses the built-in function ;; current-time to return interval times. This obviates the need for ;; both an external C program and Emacs processes to communicate with ;; such a program, and thus simplifies the package as a whole. diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index df2487a447..7296041ae8 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el @@ -867,8 +867,8 @@ Should be set in `viper-custom-file-name'." (defvar-local viper-minibuffer-overlay nil) (put 'viper-minibuffer-overlay 'permanent-local t) -;; Hook, specific to Viper, which is run just *before* exiting the minibuffer. -;; This is needed because beginning with Emacs 19.26, the standard +;; Hook, specific to Viper, which is run just *before* exiting the +;; minibuffer. This is needed because, the standard ;; `minibuffer-exit-hook' is run *after* exiting the minibuffer (defvar viper-minibuffer-exit-hook nil) diff --git a/lisp/progmodes/icon.el b/lisp/progmodes/icon.el index ec281f3a49..2da0fb1677 100644 --- a/lisp/progmodes/icon.el +++ b/lisp/progmodes/icon.el @@ -163,8 +163,6 @@ with no args, if that value is non-nil." '((icon-font-lock-keywords icon-font-lock-keywords-1 icon-font-lock-keywords-2) nil nil ((?_ . "w")) beginning-of-defun - ;; Obsoleted by Emacs 19.35 parse-partial-sexp's COMMENTSTOP. - ;;(font-lock-comment-start-regexp . "#") (font-lock-mark-block-function . mark-defun))) ;; imenu support (setq-local imenu-generic-expression icon-imenu-generic-expression) diff --git a/lisp/vcursor.el b/lisp/vcursor.el index a54227c1bc..e7dd1ba715 100644 --- a/lisp/vcursor.el +++ b/lisp/vcursor.el @@ -232,11 +232,10 @@ ;; ======================= ;; ;; If Emacs has set the variable window-system to nil, vcursor will -;; assume that overlays cannot be displayed in a different face, -;; and will instead use a string (the variable vcursor-string, by -;; default "**>") to show its position. This was first implemented -;; in Emacs 19.29. Unlike the old-fashioned overlay arrow (as used -;; by debuggers), this appears between existing text, which can +;; assume that overlays cannot be displayed in a different face, and +;; will instead use a string (the variable vcursor-string, by default "**>") +;; to show its position. Unlike the old-fashioned overlay arrow (as +;; used by debuggers), this appears between existing text, which can ;; make it hard to read if you're not used to it. (This seemed the ;; better option here.) This means moving the vcursor up and down is ;; a very efficient way of locating it! commit 043ae1f53a29d69f2573356715861ec54d626b56 Author: Stefan Kangas Date: Fri Aug 19 17:17:41 2022 +0200 Delete two functions obsolete since Emacs 23 These were announced as removed in Emacs 28.1 NEWS, but apparently never actually deleted: only their obsoletion warning was removed. So the warnings were reintroduced in Emacs 28.2, and we now actually delete them here instead. * src/process.c (Fset_process_filter_multibyte) (Fprocess_filter_multibyte_p): Delete functions obsolete since Emacs 23. (syms_of_process): Delete corresponding defsubrs. * lisp/subr.el (process-filter-multibyte-p) (set-process-filter-multibyte): Delete obsoletion. * lisp/erc/erc-dcc.el (erc-dcc-server): Don't use obsolete functions. diff --git a/etc/NEWS b/etc/NEWS index e5260e4e7e..0274e3b153 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2544,7 +2544,8 @@ but switching to `ash` is generally much preferable. --- ** Some functions and variables obsolete since Emacs 23 have been removed: 'find-emacs-lisp-shadows', 'newsticker-cache-filename', -'redisplay-end-trigger-functions', 'set-window-redisplay-end-trigger', +'process-filter-multibyte-p', 'redisplay-end-trigger-functions', +'set-process-filter-multibyte', 'set-window-redisplay-end-trigger', 'unify-8859-on-decoding-mode', 'unify-8859-on-encoding-mode', 'vc-arch-command', 'window-redisplay-end-trigger', 'x-selection'. diff --git a/lisp/erc/erc-dcc.el b/lisp/erc/erc-dcc.el index 977080a4de..dd70bfb7b7 100644 --- a/lisp/erc/erc-dcc.el +++ b/lisp/erc/erc-dcc.el @@ -357,10 +357,7 @@ Returns the newly created subprocess, or nil." :server t)) (when (processp process) (when (fboundp 'set-process-coding-system) - (set-process-coding-system process 'binary 'binary)) - (when (fboundp 'set-process-filter-multibyte) - (with-no-warnings ; obsolete since 23.1 - (set-process-filter-multibyte process nil))))) + (set-process-coding-system process 'binary 'binary)))) (file-error (unless (and (string= "Cannot bind server socket" (nth 1 err)) (string= "address already in use" (downcase (nth 2 err)))) diff --git a/lisp/subr.el b/lisp/subr.el index de8a0f7086..cd6a9be099 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1866,8 +1866,6 @@ be a list of the form returned by `event-start' and `event-end'." (make-obsolete-variable 'inhibit-changing-match-data 'save-match-data "29.1") (make-obsolete 'run-window-configuration-change-hook nil "27.1") -(make-obsolete 'process-filter-multibyte-p nil "23.1") -(make-obsolete 'set-process-filter-multibyte nil "23.1") (make-obsolete-variable 'command-debug-status "expect it to be removed in a future version." "25.2") diff --git a/src/process.c b/src/process.c index 697249a461..7a133cda00 100644 --- a/src/process.c +++ b/src/process.c @@ -7773,46 +7773,6 @@ DEFUN ("process-coding-system", XPROCESS (process)->encode_coding_system); } -DEFUN ("set-process-filter-multibyte", Fset_process_filter_multibyte, - Sset_process_filter_multibyte, 2, 2, 0, - doc: /* Set multibyteness of the strings given to PROCESS's filter. -If FLAG is non-nil, the filter is given multibyte strings. -If FLAG is nil, the filter is given unibyte strings. In this case, -all character code conversion except for end-of-line conversion is -suppressed. */) - (Lisp_Object process, Lisp_Object flag) -{ - CHECK_PROCESS (process); - - struct Lisp_Process *p = XPROCESS (process); - if (NILP (flag)) - pset_decode_coding_system - (p, raw_text_coding_system (p->decode_coding_system)); - - /* If the sockets haven't been set up yet, the final setup part of - this will be called asynchronously. */ - if (p->infd < 0 || p->outfd < 0) - return Qnil; - - setup_process_coding_systems (process); - - return Qnil; -} - -DEFUN ("process-filter-multibyte-p", Fprocess_filter_multibyte_p, - Sprocess_filter_multibyte_p, 1, 1, 0, - doc: /* Return t if a multibyte string is given to PROCESS's filter.*/) - (Lisp_Object process) -{ - CHECK_PROCESS (process); - struct Lisp_Process *p = XPROCESS (process); - if (p->infd < 0) - return Qnil; - eassert (p->infd < FD_SETSIZE); - struct coding_system *coding = proc_decode_coding_system[p->infd]; - return (CODING_FOR_UNIBYTE (coding) ? Qnil : Qt); -} - @@ -8808,8 +8768,6 @@ sentinel or a process filter function has an error. */); defsubr (&Sinternal_default_process_filter); defsubr (&Sset_process_coding_system); defsubr (&Sprocess_coding_system); - defsubr (&Sset_process_filter_multibyte); - defsubr (&Sprocess_filter_multibyte_p); { Lisp_Object subfeatures = Qnil; commit d0bb333efc0faf4c8ee78db5bd9c99819ad2053b Merge: 986440aaad f2c0fb2615 Author: Stefan Kangas Date: Fri Aug 19 17:30:18 2022 +0200 Merge from origin/emacs-28 f2c0fb2615 Resurrect obsoletion warning for two functions 9c0eec4ed8 * src/window.c (select_window): Fix assert for buffer = no... 16dfe04be2 Find libgccjit on macOS with Homebrew differently # Conflicts: # etc/NEWS commit f2c0fb2615f4c1140f5eef52b19cb77b4e86cbb4 (refs/remotes/origin/emacs-28) Author: Stefan Kangas Date: Fri Aug 19 17:29:05 2022 +0200 Resurrect obsoletion warning for two functions These were supposed to have been deleted, but never were. Resurrect their obsoletion warning and let's delete them in Emacs 29 instead. * lisp/subr.el (process-filter-multibyte-p) (set-process-filter-multibyte): Resurrect obsoletion warning. * etc/NEWS: Don't announce their deletion. diff --git a/etc/NEWS b/etc/NEWS index 1aa16a4c05..aeddb07170 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -3168,9 +3168,9 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. 'nnmail-fix-eudora-headers', 'non-iso-charset-alist', 'nonascii-insert-offset', 'nonascii-translation-table', 'password-read-and-add', 'pre-abbrev-expand-hook', 'princ-list', -'print-help-return-message', 'process-filter-multibyte-p', -'read-file-name-predicate', 'remember-buffer', 'rmail-highlight-face', -'rmail-message-filter', 'semantic-after-idle-scheduler-reparse-hooks', +'print-help-return-message', 'read-file-name-predicate', +'remember-buffer', 'rmail-highlight-face', 'rmail-message-filter', +'semantic-after-idle-scheduler-reparse-hooks', 'semantic-after-toplevel-bovinate-hook', 'semantic-before-idle-scheduler-reparse-hooks', 'semantic-before-toplevel-bovination-hook', @@ -3196,9 +3196,9 @@ ledit.el, lmenu.el, lucid.el and old-whitespace.el. 'semantic-something-to-stream', 'semantic-tag-make-assoc-list', 'semantic-token-type-parent', 'semantic-toplevel-bovine-cache', 'semantic-toplevel-bovine-table', 'semanticdb-mode-hooks', -'set-coding-priority', 'set-process-filter-multibyte', -'shadows-compare-text-p', 'shell-dirtrack-toggle', -'speedbar-navigating-speed', 'speedbar-update-speed', 't-mouse-mode', +'set-coding-priority', 'shadows-compare-text-p', +'shell-dirtrack-toggle', 'speedbar-navigating-speed', +'speedbar-update-speed', 't-mouse-mode', 'term-dynamic-simple-complete', 'tooltip-hook', 'tpu-have-ispell', 'url-generate-unique-filename', 'url-temporary-directory', 'vc-arch-command', 'vc-default-working-revision' (variable), diff --git a/lisp/subr.el b/lisp/subr.el index 921853de60..edd4e33962 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1754,6 +1754,8 @@ be a list of the form returned by `event-start' and `event-end'." (make-obsolete-variable 'operating-system-release nil "28.1") (make-obsolete 'run-window-configuration-change-hook nil "27.1") +(make-obsolete 'process-filter-multibyte-p nil "23.1") +(make-obsolete 'set-process-filter-multibyte nil "23.1") (make-obsolete-variable 'command-debug-status "expect it to be removed in a future version." "25.2") commit 9c0eec4ed86713519819b2e33dc3fff23f0e5f3d Author: Alan Mackenzie Date: Fri Aug 19 15:06:38 2022 +0000 * src/window.c (select_window): Fix assert for buffer = non-active minibuffer diff --git a/src/window.c b/src/window.c index 2576b66a18..35ec2a1f90 100644 --- a/src/window.c +++ b/src/window.c @@ -554,7 +554,9 @@ select_window (Lisp_Object window, Lisp_Object norecord, frame is active. */ Fselect_frame (frame, norecord); /* Fselect_frame called us back so we've done all the work already. */ - eassert (EQ (window, selected_window)); + eassert (EQ (window, selected_window) + || (EQ (window, f->minibuffer_window) + && NILP (Fminibufferp (XWINDOW (window)->contents, Qt)))); return window; } else commit 986440aaad0b8f6ca1e8b93ec7eee3485644a648 Author: Stefan Kangas Date: Fri Aug 19 16:46:21 2022 +0200 Prefer defvar-keymap in doc-view.el * lisp/doc-view.el (doc-view-mode-map, doc-view-minor-mode-map) (doc-view-presentation-mode-map): Prefer defvar-keymap. diff --git a/lisp/doc-view.el b/lisp/doc-view.el index f05ec938e5..29da3b4297 100644 --- a/lisp/doc-view.el +++ b/lisp/doc-view.el @@ -458,62 +458,60 @@ Typically \"page-%s.png\".") ;;;; DocView Keymaps -(defvar doc-view-mode-map - (let ((map (make-sparse-keymap))) - (set-keymap-parent map image-mode-map) - ;; Navigation in the document - (define-key map (kbd "n") 'doc-view-next-page) - (define-key map (kbd "p") 'doc-view-previous-page) - (define-key map (kbd "") 'forward-page) - (define-key map (kbd "") 'backward-page) - (define-key map [remap forward-page] 'doc-view-next-page) - (define-key map [remap backward-page] 'doc-view-previous-page) - (define-key map (kbd "SPC") 'doc-view-scroll-up-or-next-page) - (define-key map (kbd "S-SPC") 'doc-view-scroll-down-or-previous-page) - (define-key map (kbd "DEL") 'doc-view-scroll-down-or-previous-page) - (define-key map (kbd "C-n") 'doc-view-next-line-or-next-page) - (define-key map (kbd "") 'doc-view-next-line-or-next-page) - (define-key map (kbd "C-p") 'doc-view-previous-line-or-previous-page) - (define-key map (kbd "") 'doc-view-previous-line-or-previous-page) - (define-key map (kbd "M-<") 'doc-view-first-page) - (define-key map (kbd "M->") 'doc-view-last-page) - (define-key map [remap goto-line] 'doc-view-goto-page) - (define-key map (kbd "RET") 'image-next-line) - ;; Zoom in/out. - (define-key map "+" 'doc-view-enlarge) - (define-key map "=" 'doc-view-enlarge) - (define-key map "-" 'doc-view-shrink) - (define-key map "0" 'doc-view-scale-reset) - (define-key map [remap text-scale-adjust] 'doc-view-scale-adjust) - ;; Fit the image to the window - (define-key map "W" 'doc-view-fit-width-to-window) - (define-key map "H" 'doc-view-fit-height-to-window) - (define-key map "P" 'doc-view-fit-page-to-window) - (define-key map "F" 'doc-view-fit-window-to-page) ;F = frame - ;; Killing the buffer (and the process) - (define-key map (kbd "k") 'image-kill-buffer) - (define-key map (kbd "K") 'doc-view-kill-proc) - ;; Slicing the image - (define-key map (kbd "c s") 'doc-view-set-slice) - (define-key map (kbd "c m") 'doc-view-set-slice-using-mouse) - (define-key map (kbd "c b") 'doc-view-set-slice-from-bounding-box) - (define-key map (kbd "c r") 'doc-view-reset-slice) - ;; Centering the image - (define-key map (kbd "c h") 'doc-view-center-page-horizontally) - (define-key map (kbd "c v") 'doc-view-center-page-vertically) - ;; Searching - (define-key map (kbd "C-s") 'doc-view-search) - (define-key map (kbd "") 'doc-view-search) - (define-key map (kbd "C-r") 'doc-view-search-backward) - ;; Show the tooltip - (define-key map (kbd "C-t") 'doc-view-show-tooltip) - ;; Toggle between text and image display or editing - (define-key map (kbd "C-c C-c") 'doc-view-toggle-display) - ;; Open a new buffer with doc's text contents - (define-key map (kbd "C-c C-t") 'doc-view-open-text) - (define-key map (kbd "r") 'revert-buffer) - map) - "Keymap used by `doc-view-mode' when displaying a doc as a set of images.") +(defvar-keymap doc-view-mode-map + :doc "Keymap used by `doc-view-mode' when displaying a doc as a set of images." + :parent image-mode-map + ;; Navigation in the document + "n" #'doc-view-next-page + "p" #'doc-view-previous-page + "" #'forward-page + "" #'backward-page + " " #'doc-view-next-page + " " #'doc-view-previous-page + "SPC" #'doc-view-scroll-up-or-next-page + "S-SPC" #'doc-view-scroll-down-or-previous-page + "DEL" #'doc-view-scroll-down-or-previous-page + "C-n" #'doc-view-next-line-or-next-page + "" #'doc-view-next-line-or-next-page + "C-p" #'doc-view-previous-line-or-previous-page + "" #'doc-view-previous-line-or-previous-page + "M-<" #'doc-view-first-page + "M->" #'doc-view-last-page + " " #'doc-view-goto-page + "RET" #'image-next-line + ;; Zoom in/out. + "+" #'doc-view-enlarge + "=" #'doc-view-enlarge + "-" #'doc-view-shrink + "0" #'doc-view-scale-reset + " " #'doc-view-scale-adjust + ;; Fit the image to the window + "W" #'doc-view-fit-width-to-window + "H" #'doc-view-fit-height-to-window + "P" #'doc-view-fit-page-to-window + "F" #'doc-view-fit-window-to-page ;F = frame + ;; Killing the buffer (and the process) + "k" #'image-kill-buffer + "K" #'doc-view-kill-proc + ;; Slicing the image + "c s" #'doc-view-set-slice + "c m" #'doc-view-set-slice-using-mouse + "c b" #'doc-view-set-slice-from-bounding-box + "c r" #'doc-view-reset-slice + ;; Centering the image + "c h" #'doc-view-center-page-horizontally + "c v" #'doc-view-center-page-vertically + ;; Searching + "C-s" #'doc-view-search + "" #'doc-view-search + "C-r" #'doc-view-search-backward + ;; Show the tooltip + "C-t" #'doc-view-show-tooltip + ;; Toggle between text and image display or editing + "C-c C-c" #'doc-view-toggle-display + ;; Open a new buffer with doc's text contents + "C-c C-t" #'doc-view-open-text + "r" #'revert-buffer) (define-obsolete-function-alias 'doc-view-revert-buffer #'revert-buffer "27.1") (defvar revert-buffer-preserve-modes) @@ -617,12 +615,10 @@ Typically \"page-%s.png\".") :help "Jump to the previous match or initiate a new search"] )) -(defvar doc-view-minor-mode-map - (let ((map (make-sparse-keymap))) - ;; Toggle between text and image display or editing - (define-key map (kbd "C-c C-c") 'doc-view-toggle-display) - map) - "Keymap used by `doc-view-minor-mode'.") +(defvar-keymap doc-view-minor-mode-map + :doc "Keymap used by `doc-view-minor-mode'." + ;; Toggle between text and image display or editing + "C-c C-c" #'doc-view-toggle-display) (easy-menu-define doc-view-minor-mode-menu doc-view-minor-mode-map "Menu for Doc View minor mode." @@ -2178,12 +2174,11 @@ See the command `doc-view-mode' for more information on this mode." ;;;; Presentation mode -(defvar doc-view-presentation-mode-map - (let ((map (make-sparse-keymap))) - (define-key map "\e" 'doc-view-presentation-exit) - (define-key map "q" 'doc-view-presentation-exit) - ;; (define-key map "C" 'doc-view-convert-all-pages) - map)) +(defvar-keymap doc-view-presentation-mode-map + "ESC" #'doc-view-presentation-exit + "q" #'doc-view-presentation-exit + ;; "C" #'doc-view-convert-all-pages + ) (defvar-local doc-view-presentation--src-data nil) commit 7c793c55cfad40fd92c5300fa553bac649daeeaf Author: Robert Pluim Date: Fri Aug 19 16:01:22 2022 +0200 Improve 'ns-read-file-name' docstring * src/nsfns.m (Fns_read_file_name): Use '-' instead of '_' when naming args. diff --git a/src/nsfns.m b/src/nsfns.m index 1d3dcd3124..2699cf37a5 100644 --- a/src/nsfns.m +++ b/src/nsfns.m @@ -1727,7 +1727,7 @@ Frames are listed from topmost (first) to bottommost (last). */) Optional arg MUSTMATCH, if non-nil, means the returned file or directory must exist. Optional arg INIT, if non-nil, provides a default file name to use. -Optional arg DIR_ONLY_P, if non-nil, means choose only directories. */) +Optional arg DIR-ONLY-P, if non-nil, means choose only directories. */) (Lisp_Object prompt, Lisp_Object dir, Lisp_Object mustmatch, Lisp_Object init, Lisp_Object dir_only_p) { commit ddbab830709933d33179b1dbbc0b03c856d00806 Author: Robert Pluim Date: Wed Aug 17 15:05:29 2022 +0200 Mark only VS-16 as emoji * admin/unidata/blocks.awk: Only mark U+FE0F as belonging to the 'emoji' script. (Bug#57072) diff --git a/admin/unidata/blocks.awk b/admin/unidata/blocks.awk index 5f392b5ad3..1c571feff3 100755 --- a/admin/unidata/blocks.awk +++ b/admin/unidata/blocks.awk @@ -224,9 +224,14 @@ FILENAME ~ "emoji-data.txt" && /^[0-9A-F].*; Emoji_Presentation / { END { idx = 0 - # ## These are here so that font_range can choose Emoji presentation - # ## for the preceding codepoint when it encounters a VS - override_start[idx] = "FE00" + ## This is here so that font_range can choose Emoji presentation + ## for the preceding codepoint when it encounters a VS-16 + ## (U+FE0F). See also font_range and the comments in composite.el + ## around the setup of `composition-function-table' for + ## U+FE00..U+FE0E. + ## It originally covered the whole FE00-FE0F range, but that + ## turned out to be a mistake. + override_start[idx] = "FE0F" override_end[idx] = "FE0F" for (k in override_start) commit 6a1e3e86842676b39ca6aa5ae986f1ea734fd264 Author: Eli Zaretskii Date: Fri Aug 19 16:55:19 2022 +0300 ; * src/editfns.c (Fline_beginning_position): Remove redundant parens. diff --git a/src/editfns.c b/src/editfns.c index 1e07b0b655..1626238199 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -759,7 +759,7 @@ boundaries, bind `inhibit-field-text-motion' to t. This function does not move point. */) (Lisp_Object n) { - ptrdiff_t count, charpos = (bol (n, &count)); + ptrdiff_t count, charpos = bol (n, &count); /* Return END constrained to the current input field. */ return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT), count != 0 ? Qt : Qnil, commit 962cb44eea43a0e5591788a218813ac3a8e57181 Author: Lars Ingebrigtsen Date: Fri Aug 19 15:37:35 2022 +0200 Fix underscores in argument names in ns-win * lisp/term/ns-win.el (x-file-dialog): Don't use underscores in argument names. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index 56aca2bd83..82b6281eb6 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -435,14 +435,14 @@ Lines are highlighted according to `ns-input-line'." ;; nsterm.m (declare-function ns-read-file-name "nsfns.m" - (prompt &optional dir mustmatch init dir_only_p)) + (prompt &optional dir mustmatch init dir-only-p)) ;;;; File handling. -(defun x-file-dialog (prompt dir &optional default_filename - mustmatch only_dir_p) +(defun x-file-dialog (prompt dir &optional default-filename + mustmatch only-dir-p) "SKIP: real doc in xfns.c." - (ns-read-file-name prompt dir mustmatch default_filename only_dir_p)) + (ns-read-file-name prompt dir mustmatch default-filename only-dir-p)) (defun ns-open-file-using-panel () "Pop up open-file panel, and load the result in a buffer." commit 705c45041fc37f9372e811dc404a518ad15350d4 Author: Augusto Stoffel Date: Sat Aug 13 18:10:14 2022 +0200 python.el: Add completion-predicate symbol property to commands * lisp/progmodes/python.el: Add a completion-predicate property to most commands defined in this file; some are only useful in python-mode, others in inferior-python mode as well. (Bug#53913) (python-skeleton-define, python-define-auxiliary-skeleton): Add appropriate completion-predicate properties. (python--completion-predicate): New function. diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 62fc45b2ad..a545240805 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4562,6 +4562,11 @@ the if condition." (not (python-syntax-comment-or-string-p)) python-skeleton-autoinsert))) +(defun python--completion-predicate (_ buffer) + (provided-mode-derived-p + (buffer-local-value 'major-mode buffer) + 'python-mode)) + (defmacro python-skeleton-define (name doc &rest skel) "Define a `python-mode' skeleton using NAME DOC and SKEL. The skeleton will be bound to python-skeleton-NAME and will @@ -4570,6 +4575,7 @@ be added to `python-mode-skeleton-abbrev-table'." (let* ((name (symbol-name name)) (function-name (intern (concat "python-skeleton-" name)))) `(progn + (put ',function-name 'completion-predicate #'python--completion-predicate) (define-abbrev python-mode-skeleton-abbrev-table ,name "" ',function-name :system t) (setq python-skeleton-available @@ -4595,13 +4601,15 @@ The skeleton will be bound to python-skeleton-NAME." (setq skel `(< ,(format "%s:" name) \n \n > _ \n))) - `(define-skeleton ,function-name - ,(or doc - (format "Auxiliary skeleton for %s statement." name)) - nil - (unless (y-or-n-p ,msg) - (signal 'quit t)) - ,@skel))) + `(progn + (put ',function-name 'completion-predicate #'ignore) + (define-skeleton ,function-name + ,(or doc + (format "Auxiliary skeleton for %s statement." name)) + nil + (unless (y-or-n-p ,msg) + (signal 'quit t)) + ,@skel)))) (python-define-auxiliary-skeleton else) @@ -5888,6 +5896,52 @@ REPORT-FN is Flymake's callback function." (add-hook 'flymake-diagnostic-functions #'python-flymake nil t)) +;;; Completion predicates for M-x +(dolist (sym '(python-check + python-fill-paragraph + python-indent-dedent-line + python-indent-dedent-line-backspace + python-indent-guess-indent-offset + python-indent-shift-left + python-indent-shift-right + python-mark-defun + python-nav-backward-block + python-nav-backward-defun + python-nav-backward-sexp + python-nav-backward-sexp-safe + python-nav-backward-statement + python-nav-backward-up-list + python-nav-beginning-of-block + python-nav-beginning-of-statement + python-nav-end-of-block + python-nav-end-of-defun + python-nav-end-of-statement + python-nav-forward-block + python-nav-forward-defun + python-nav-forward-sexp + python-nav-forward-sexp-safe + python-nav-forward-statement + python-nav-if-name-main + python-nav-up-list + python-shell-send-buffer + python-shell-send-defun + python-shell-send-statement)) + (put sym 'completion-predicate #'python--completion-predicate)) + +(dolist (sym '(python-describe-at-point + python-eldoc-at-point + python-shell-completion-native-toggle + python-shell-completion-native-turn-off + python-shell-completion-native-turn-on + python-shell-completion-native-turn-on-maybe + python-shell-font-lock-cleanup-buffer + python-shell-font-lock-toggle + python-shell-font-lock-turn-off + python-shell-font-lock-turn-on + python-shell-package-enable + python-shell-completion-complete-or-indent )) + (put sym 'completion-predicate #'python--completion-predicate)) + (provide 'python) ;;; python.el ends here commit f117b5df4dc69a38a5568c5926c1e417a35314eb Author: Lars Ingebrigtsen Date: Fri Aug 19 15:22:29 2022 +0200 Add new functions eol and bol * doc/lispref/positions.texi (Text Lines): Document them * lisp/emacs-lisp/shortdoc.el: Mention them, and also the buffer/line predicates. * src/editfns.c (bol): New function. (Fbol): New defun. (Fline_beginning_position): Use `bol'. (eol): New function. (Feol): New defun. (Fline_end_position): Use `eol'. diff --git a/doc/lispref/positions.texi b/doc/lispref/positions.texi index 333c8e19a0..53846ed297 100644 --- a/doc/lispref/positions.texi +++ b/doc/lispref/positions.texi @@ -387,6 +387,16 @@ Return the position that @code{(end-of-line @var{count})} would move to. @end defun +@defun bol &optional count +Like @code{line-beginning-position}, but ignores fields (and is more +efficient). +@end defun + +@defun eol &optional count +Like @code{line-end-position}, but ignores fields (and is more +efficient). +@end defun + @deffn Command forward-line &optional count @cindex beginning of line This function moves point forward @var{count} lines, to the beginning of diff --git a/etc/NEWS b/etc/NEWS index 511687a174..e5260e4e7e 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2587,6 +2587,11 @@ patcomp.el, pc-mode.el, pc-select.el, s-region.el, and sregex.el. * Lisp Changes in Emacs 29.1 ++++ +** New functions 'eol' and 'bol'. +These are like 'line-end-position' and 'line-beginning-position' +(respectively), but ignore fields (and are more efficient). + +++ ** New function 'compiled-function-p'. This returns non-nil if its argument is either a built-in, or a diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index d187af9ac8..acf294ede1 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -941,12 +941,24 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'), :eval (point-min)) (point-max :eval (point-max)) + (eol + :eval (eol)) + (bol + :eval (bol)) + (bolp + :eval (bolp)) + (eolp + :eval (eolp)) (line-beginning-position :eval (line-beginning-position)) (line-end-position :eval (line-end-position)) (buffer-size :eval (buffer-size)) + (bobp + :eval (bobp)) + (eobp + :eval (eobp)) "Moving Around" (goto-char :no-eval (goto-char (point-max)) diff --git a/src/editfns.c b/src/editfns.c index 4fb82485ab..1e07b0b655 100644 --- a/src/editfns.c +++ b/src/editfns.c @@ -709,9 +709,28 @@ Field boundaries are not noticed if `inhibit-field-text-motion' is non-nil. */) } -DEFUN ("line-beginning-position", - Fline_beginning_position, Sline_beginning_position, 0, 1, 0, - doc: /* Return the character position of the first character on the current line. +static ptrdiff_t +bol (Lisp_Object n, ptrdiff_t *out_count) +{ + ptrdiff_t bytepos, charpos, count; + + if (NILP (n)) + count = 0; + else if (FIXNUMP (n)) + count = clip_to_bounds (-BUF_BYTES_MAX, XFIXNUM (n) - 1, BUF_BYTES_MAX); + else + { + CHECK_INTEGER (n); + count = NILP (Fnatnump (n)) ? -BUF_BYTES_MAX : BUF_BYTES_MAX; + } + if (out_count) + *out_count = count; + scan_newline_from_point (count, &charpos, &bytepos); + return charpos; +} + +DEFUN ("bol", Fbol, Sbol, 0, 1, 0, + doc: /* Return the position of the first character on the current line. With optional argument N, scan forward N - 1 lines first. If the scan reaches the end of the buffer, return that position. @@ -720,6 +739,17 @@ position of the first character in logical order, i.e. the smallest character position on the logical line. See `vertical-motion' for movement by screen lines. +This function does not move point. Also see `line-beginning-position'. */) + (Lisp_Object n) +{ + return make_fixnum (bol (n, NULL)); +} + +DEFUN ("line-beginning-position", + Fline_beginning_position, Sline_beginning_position, 0, 1, 0, + doc: /* Return the position of the first character in the current line/field. +This function is like `bol' (which see), but respects fields. + This function constrains the returned position to the current field unless that position would be on a different line from the original, unconstrained result. If N is nil or 1, and a front-sticky field @@ -729,28 +759,33 @@ boundaries, bind `inhibit-field-text-motion' to t. This function does not move point. */) (Lisp_Object n) { - ptrdiff_t charpos, bytepos, count; + ptrdiff_t count, charpos = (bol (n, &count)); + /* Return END constrained to the current input field. */ + return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT), + count != 0 ? Qt : Qnil, + Qt, Qnil); +} + +static ptrdiff_t +eol (Lisp_Object n) +{ + ptrdiff_t count; if (NILP (n)) - count = 0; + count = 1; else if (FIXNUMP (n)) - count = clip_to_bounds (-BUF_BYTES_MAX, XFIXNUM (n) - 1, BUF_BYTES_MAX); + count = clip_to_bounds (-BUF_BYTES_MAX, XFIXNUM (n), BUF_BYTES_MAX); else { CHECK_INTEGER (n); count = NILP (Fnatnump (n)) ? -BUF_BYTES_MAX : BUF_BYTES_MAX; } - - scan_newline_from_point (count, &charpos, &bytepos); - - /* Return END constrained to the current input field. */ - return Fconstrain_to_field (make_fixnum (charpos), make_fixnum (PT), - count != 0 ? Qt : Qnil, - Qt, Qnil); + return find_before_next_newline (PT, 0, count - (count <= 0), + NULL); } -DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, - doc: /* Return the character position of the last character on the current line. +DEFUN ("eol", Feol, Seol, 0, 1, 0, + doc: /* Return the position of the last character on the current line. With argument N not nil or 1, move forward N - 1 lines first. If scan reaches end of buffer, return that position. @@ -758,6 +793,19 @@ This function ignores text display directionality; it returns the position of the last character in logical order, i.e. the largest character position on the line. +This function does not move point. Also see `line-end-position'. */) + (Lisp_Object n) +{ + return make_fixnum (eol (n)); +} + +DEFUN ("line-end-position", Fline_end_position, Sline_end_position, 0, 1, 0, + doc: /* Return the position of the last character in the current line/field. +With argument N not nil or 1, move forward N - 1 lines first. +If scan reaches end of buffer, return that position. + +This function is like `eol' (which see), but respects fields. + This function constrains the returned position to the current field unless that would be on a different line from the original, unconstrained result. If N is nil or 1, and a rear-sticky field ends @@ -767,24 +815,8 @@ boundaries bind `inhibit-field-text-motion' to t. This function does not move point. */) (Lisp_Object n) { - ptrdiff_t clipped_n; - ptrdiff_t end_pos; - ptrdiff_t orig = PT; - - if (NILP (n)) - clipped_n = 1; - else if (FIXNUMP (n)) - clipped_n = clip_to_bounds (-BUF_BYTES_MAX, XFIXNUM (n), BUF_BYTES_MAX); - else - { - CHECK_INTEGER (n); - clipped_n = NILP (Fnatnump (n)) ? -BUF_BYTES_MAX : BUF_BYTES_MAX; - } - end_pos = find_before_next_newline (orig, 0, clipped_n - (clipped_n <= 0), - NULL); - /* Return END_POS constrained to the current input field. */ - return Fconstrain_to_field (make_fixnum (end_pos), make_fixnum (orig), + return Fconstrain_to_field (make_fixnum (eol (n)), make_fixnum (PT), Qnil, Qt, Qnil); } @@ -4610,6 +4642,8 @@ with an optional argument LOCK non-nil. */); defsubr (&Sline_beginning_position); defsubr (&Sline_end_position); + defsubr (&Sbol); + defsubr (&Seol); defsubr (&Ssave_excursion); defsubr (&Ssave_current_buffer); commit 503112d1f01d5239b53c86fea4e12d851c185572 Author: Augusto Stoffel Date: Sat Aug 13 18:55:48 2022 +0200 python-mode: Remove special outline-heading-end-regexp It doesn't work well with the new type annotation syntax introduced in Python 3.5. * lisp/progmodes/python.el (python-mode): Remove buffer-local setting of outline-heading-end-regexp. (Bug#53913) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 5fffb4b7d3..62fc45b2ad 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5872,7 +5872,6 @@ REPORT-FN is Flymake's callback function." nil)) (setq-local outline-regexp (python-rx (* space) block-start)) - (setq-local outline-heading-end-regexp ":[^\n]*\n") (setq-local outline-level (lambda () "`outline-level' function for Python mode." commit 275cef9e06b406c6e68ec5cf9fe882ab0fde8999 Author: Augusto Stoffel Date: Sat Aug 13 17:39:57 2022 +0200 python.el: Adjustments to Flymake backend * lisp/progmodes/python (python-flymake-command): Advertise possiblity to use pylint. (python-flymake-command-output-pattern): Make compatible with recent versions of pyflakes. (Bug#53913) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 285a57348e..5fffb4b7d3 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -5648,9 +5648,13 @@ returned as is." This is a non empty list of strings, the checker tool possibly followed by required arguments. Once launched it will receive the Python source to be checked as its standard input. -To use `flake8' you would set this to (\"flake8\" \"-\")." +To use `flake8' you would set this to (\"flake8\" \"-\"). +To use `pylint' you would set this to (\"pylint\" \"--from-stdin\" \"stdin\")." :version "26.1" - :type '(repeat string)) + :type '(choice (const :tag "Pyflakes" ("pyflakes")) + (const :tag "Flake8" ("flake8" "-")) + (const :tag "Pylint" ("pylint" "--from-stdin" "stdin")) + (repeat :tag "Custom command" string))) ;; The default regexp accommodates for older pyflakes, which did not ;; report the column number, and at the same time it's compatible with @@ -5658,7 +5662,7 @@ To use `flake8' you would set this to (\"flake8\" \"-\")." ;; TYPE (defcustom python-flymake-command-output-pattern (list - "^\\(?:?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):\\)? \\(?3:.*\\)$" + "^\\(?:?\\):\\(?1:[0-9]+\\):\\(?:\\(?2:[0-9]+\\):?\\)? \\(?3:.*\\)$" 1 2 nil 3) "Specify how to parse the output of `python-flymake-command'. The value has the form (REGEXP LINE COLUMN TYPE MESSAGE): if @@ -5670,7 +5674,6 @@ MESSAGE'th gives the message text itself. If COLUMN or TYPE are nil or that index didn't match, that information is not present on the matched line and a default will be used." - :version "26.1" :type '(list regexp (integer :tag "Line's index") (choice @@ -5679,7 +5682,8 @@ be used." (choice (const :tag "No type" nil) (integer :tag "Type's index")) - (integer :tag "Message's index"))) + (integer :tag "Message's index")) + :version "29.1") (defcustom python-flymake-msg-alist '(("\\(^redefinition\\|.*unused.*\\|used$\\)" . :warning)) diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 0904dfc963..a11716a7b5 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -6300,6 +6300,40 @@ buffer with overlapping strings." a = 1 "))) + +;;; Flymake + +(ert-deftest python-tests--flymake-command-output-pattern () + (pcase-let ((`(,patt ,line ,col ,type ,msg) + python-flymake-command-output-pattern)) + ;; Pyflakes output as of version 2.4.0 + (let ((output ":12:34 'a.b.c as d' imported but unused")) + (string-match patt output) + (should (equal (match-string line output) "12")) + (when col (should (equal (match-string col output) "34"))) + (should (equal (match-string msg output) + "'a.b.c as d' imported but unused"))) + ;; Flake8 output as of version 4.0.1 + (let ((output "stdin:12:34: F401 'a.b.c as d' imported but unused")) + (string-match patt output) + (should (equal (match-string line output) "12")) + (when col (should (equal (match-string col output) "34"))) + (when type (should (equal (match-string type output) "F401"))) + (should (equal (match-string msg output) + (if type + "'a.b.c as d' imported but unused" + "F401 'a.b.c as d' imported but unused")))) + ;; Pylint output as of version 2.14.5 + (let ((output "stdin:12:34: W0611: Unused import a.b.c (unused-import)")) + (string-match patt output) + (should (equal (match-string line output) "12")) + (when col (should (equal (match-string col output) "34"))) + (when type (should (equal (match-string type output) "W0611"))) + (should (equal (match-string msg output) + (if type + "Unused import a.b.c (unused-import)" + "W0611: Unused import a.b.c (unused-import)")))))) + (provide 'python-tests) ;;; python-tests.el ends here commit ec347aec0fc7d2d3e6603b6694d9978cb9fcb9e9 Author: Augusto Stoffel Date: Sat Aug 13 17:04:17 2022 +0200 python-check-command: Don't use absolute file names Absolute executable file names are incompatible with Tramp and packages that switch between virtualenvs. * lisp/progmodes/python.el (python-check-command): Don't use absolute file names. (Bug#53913) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 9a2d17abb4..285a57348e 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4724,11 +4724,12 @@ def __FFAP_get_module_path(objstr): ;;; Code check (defcustom python-check-command - (or (executable-find "pyflakes") - (executable-find "epylint") - "install pyflakes, pylint or something else") + (cond ((executable-find "pyflakes") "pyflakes") + ((executable-find "epylint") "epylint") + (t "pyflakes")) "Command used to check a Python file." - :type 'string) + :type 'string + :version "29.1") (defcustom python-check-buffer-name "*Python check: %s*" commit 6fca17270a6c8be6f561e8048eebe375b362f311 Author: Paul A. Patience Date: Fri Aug 19 14:04:31 2022 +0200 Fix mis-spelling of c-awk-old-ByLL and really make it buffer-local * lisp/progmodes/cc-awk.el (c-awk-old-ByLL): Make the correct variable buffer-local (bug#57294). Copyright-paperwork-exempt: yes diff --git a/lisp/progmodes/cc-awk.el b/lisp/progmodes/cc-awk.el index 9ea1557391..57750a2b39 100644 --- a/lisp/progmodes/cc-awk.el +++ b/lisp/progmodes/cc-awk.el @@ -887,7 +887,7 @@ ;; subsequent use of movement functions, etc. However, it seems that if font ;; lock _is_ enabled, we can always leave it to do the job. (defvar c-awk-old-ByLL 0) -(make-variable-buffer-local 'c-awk-old-Byll) +(make-variable-buffer-local 'c-awk-old-ByLL) ;; Just beyond logical line following the region which is about to be changed. ;; Set in c-awk-record-region-clear-NL and used in c-awk-after-change. commit e5695faec4a43f10be3b56fa7fd436d5f54a5761 Author: Mattias Engdegård Date: Fri Aug 19 13:27:53 2022 +0200 * lisp/edmacro.el (edmacro-sanitize-for-string): Fix condition. This is of little consequence in practice since the input is always a vector of keys representing a prefix, where bit 7 isn't likely to be set when higher bits are set, but it silences a (justified) warning. diff --git a/lisp/edmacro.el b/lisp/edmacro.el index efffab9b30..26a5d2347f 100644 --- a/lisp/edmacro.el +++ b/lisp/edmacro.el @@ -626,7 +626,7 @@ The string represents the same events; Meta is indicated by bit 7. This function assumes that the events can be stored in a string." (setq seq (copy-sequence seq)) (cl-loop for i below (length seq) do - (when (logand (aref seq i) 128) + (when (/= (logand (aref seq i) 128) 0) (setf (aref seq i) (logand (aref seq i) 127)))) seq) commit 054f553b9ce0bec1ce698464bc4dc498b05a219d Author: Lars Ingebrigtsen Date: Thu Aug 18 23:05:17 2022 +0200 Fix region-extract-function compilation warning * lisp/simple.el (region-extract-function): Clean up the logic slightly to avoid a warning. diff --git a/lisp/simple.el b/lisp/simple.el index 1e6e5e11e0..8fb03f3b04 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -1402,15 +1402,17 @@ instead of deleted." :version "24.1") (setq region-extract-function - (lambda (method) - (when (region-beginning) - (cond - ((eq method 'bounds) - (list (cons (region-beginning) (region-end)))) - ((eq method 'delete-only) - (delete-region (region-beginning) (region-end))) - (t - (filter-buffer-substring (region-beginning) (region-end) method)))))) + (lambda (method) + ;; This call either signals an error (if there is no region) + ;; or returns a number. + (let ((beg (region-beginning))) + (cond + ((eq method 'bounds) + (list (cons beg (region-end)))) + ((eq method 'delete-only) + (delete-region beg (region-end))) + (t + (filter-buffer-substring beg (region-end) method)))))) (defvar region-insert-function (lambda (lines) commit 088171e05316c9188186a731f3c7e68c103c4e0a Author: Lars Ingebrigtsen Date: Thu Aug 18 22:58:39 2022 +0200 Fix ns-win.el (x-file-dialog) declaration * lisp/term/ns-win.el (x-file-dialog): Give the function the same signature here as other definitions. diff --git a/lisp/term/ns-win.el b/lisp/term/ns-win.el index e26191b33b..56aca2bd83 100644 --- a/lisp/term/ns-win.el +++ b/lisp/term/ns-win.el @@ -439,7 +439,8 @@ Lines are highlighted according to `ns-input-line'." ;;;; File handling. -(defun x-file-dialog (prompt dir default_filename mustmatch only_dir_p) +(defun x-file-dialog (prompt dir &optional default_filename + mustmatch only_dir_p) "SKIP: real doc in xfns.c." (ns-read-file-name prompt dir mustmatch default_filename only_dir_p)) commit dd97bff219dd3039c576710850e04fa4fa32f004 Author: Protesilaos Stavrou Date: Fri Aug 19 12:40:47 2022 +0300 Update the modus-themes to their 2.6.0 version * doc/misc/modus-themes.org (Sample configuration with and without use-package): Add missing parenthesis to the manual. (Option for completion framework aesthetics) (Custom Org emphasis faces): Minor rewording. (Custom hl-todo colors): Add instructions on how to add user-level support for the 'solaire' package, as the modus-themes no longer support it. (Full support for packages or face groups): Remove 'solaire' from the list of supported packages. (Note on git-gutter in Doom Emacs) (Note on php-mode multiline comments) (Note on highlight-parentheses.el): Clarify need to re-load the theme for changes to take effect. (Acknowledgements): Update acknowledgements. * etc/themes/modus-themes.el (modus-themes-faces): Fix typo. (modus-themes--version): Reword docstring and update to current value. (modus-themes--weight): Stop using deprecated alias of symbol. * etc/themes/modus-operandi-theme.el: * etc/themes/modus-vivendi-theme.el: Bump version number. Detailed release notes: . diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index ddd9595fc8..f375045251 100644 --- a/doc/misc/modus-themes.org +++ b/doc/misc/modus-themes.org @@ -4,9 +4,9 @@ #+language: en #+options: ':t toc:nil author:t email:t num:t #+startup: content -#+macro: stable-version 2.5.0 -#+macro: release-date 2022-08-03 -#+macro: development-version 2.6.0-dev +#+macro: stable-version 2.6.0 +#+macro: release-date 2022-08-19 +#+macro: development-version 2.7.0-dev #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ #+macro: space @@texinfo:@: @@ #+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ @@ -361,7 +361,7 @@ package configurations in their setup. We use this as an example: :config ;; Load the theme of your choice: (load-theme 'modus-operandi) ;; OR (load-theme 'modus-vivendi) - :bind ("" . modus-themes-toggle) + :bind ("" . modus-themes-toggle)) @@ -1253,7 +1253,7 @@ accepts is as follows (order is not significant): The ~popup~ key takes the same values as ~selection~. -Apart from specifying each key separately, a fallback list is accepted. +Apart from specfying each key separately, a fallback list is accepted. This is only useful when the desired aesthetic is the same across all keys that are not explicitly referenced. For example, this: @@ -3639,7 +3639,7 @@ it if you plan to control face attributes. :end: #+cindex: Org custom emphasis faces -Org provides the user option ~org-emphasis-alist~ which associates a +Org provides the user option ~org-emphasis-alist~ which assosiates a character with a face, list of faces, or face attributes. The default specification of that variable looks like this: @@ -4411,6 +4411,64 @@ Or include a ~let~ form, if needed: Normally, we do not touch user options, though this is an exception: otherwise the defaults are not always legible. +** Add support for solaire-mode +:PROPERTIES: +:CUSTOM_ID: h:439c9e46-52e2-46be-b1dc-85841dd99671 +:END: + +The =solaire-mode= package dims the background of what it considers +ancillary "UI" buffers, such as the minibuffer and Dired buffers. The +Modus themes used to support Solaire on the premise that the user was +(i) opting in to it, (ii) understood why certain buffers were more gray, +and (iii) knew what other adjustments had to be made to prevent broken +visuals (e.g. the default style of the ~modus-themes-completions~ uses a +subtle gray background for the selection, which with Solaire becomes +practically invisible). + +However, the assumption that users opt in to this feature does not +always hold true. There are cases where it is enabled by defaultsuch as +in the popular Doom Emacs configuration. Thus, the unsuspecting user +who loads ~modus-operandi~ or ~modus-vivendi~ without the requisite +customizations is getting a sub-par experience; an experience that we +did not intend and cannot genuinely fix. + +Because the Modus themes are meant to work everywhere, we cannot make an +exception for Doom Emacs and/or Solaire users. Furthermore, we shall +not introduce hacks, such as by adding a check in all relevant faces to +be adjusted based on Solaire or whatever other package. Hacks of this +sort are unsustainable and penalize the entire userbase. Besides, the +themes are built into Emacs and we must keep their standard high. + +The fundamental constraint with Solaire is that Emacs does not have a +real distinction between "content" and "UI" buffers. For themes to work +with Solaire, they need to be designed around that package. Such is an +arrangement that compromises on our accessibility standards and/or +hinders our efforts to provide the best possible experience while using +the Modus themes. + +As such, =solaire-mode= is not---and will not be---supported by the +Modus themes (or any other of my themes, for that matter). Users who +want it must style the faces manually. Below is some sample code, based +on what we cover at length elsewhere in this manual: + +[[#h:f4651d55-8c07-46aa-b52b-bed1e53463bb][Advanced customization]]. + +[[#h:51ba3547-b8c8-40d6-ba5a-4586477fd4ae][Face specs at scale using the themes' palette]]. + +#+begin_src emacs-lisp +(defun my-modus-themes-custom-faces () + (modus-themes-with-colors + (custom-set-faces + `(solaire-default-face ((,class :inherit default :background ,bg-alt :foreground ,fg-dim))) + `(solaire-line-number-face ((,class :inherit solaire-default-face :foreground ,fg-unfocused))) + `(solaire-hl-line-face ((,class :background ,bg-active))) + `(solaire-org-hide-face ((,class :background ,bg-alt :foreground ,bg-alt)))))) + +(add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) +#+end_src + +As always, re-load the theme for changes to take effect. + * Face coverage :properties: :custom_id: h:a9c8f29d-7f72-4b54-b74b-ddefe15d6a19 @@ -4679,7 +4737,6 @@ have lots of extensions, so the "full support" may not be 100% true… + smart-mode-line + smartparens + smerge -+ solaire + spaceline + speedbar + stripes @@ -4853,6 +4910,8 @@ length elsewhere in this manual: (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-custom-faces) #+end_src +As always, re-load the theme for changes to take effect. + If the above does not work, try this instead: #+begin_src emacs-lisp @@ -4888,6 +4947,8 @@ This seems to make all comments use the appropriate face: (add-hook 'php-mode-hook #'my-multine-comments) #+end_src +As always, re-load the theme for changes to take effect. + ** Note on underlines in compilation buffers :properties: :custom_id: h:420f5a33-c7a9-4112-9b04-eaf2cbad96bd @@ -5127,6 +5188,8 @@ implementation: (add-hook 'modus-themes-after-load-theme-hook #'my-modus-themes-highlight-parentheses) #+end_src +As always, re-load the theme for changes to take effect. + ** Note on mmm-mode.el background colors :properties: :custom_id: h:99cf0d6c-e478-4e26-9932-3bf3427d13f6 @@ -6014,9 +6077,10 @@ The Modus themes are a collective effort. Every bit of work matters. Carlo Zancanaro, Christian Tietze, Daniel Mendler, Eli Zaretskii, Fritz Grabo, Illia Ostapyshyn, Kévin Le Gouguec, Kostadin Ninev, Madhavan Krishnan, Manuel Giraud, Markus Beppler, Matthew Stevenson, - Mauro Aranda, Nicolas De Jaeghere, Philip Kaludercic, Pierre - Téchoueyres, Rudolf Adamkovič, Stephen Gildea, Shreyas Ragavan, Stefan - Kangas, Utkarsh Singh, Vincent Murphy, Xinglu Chen, Yuanchen Xie. + Mauro Aranda, Nicolas De Jaeghere, Paul David, Philip Kaludercic, + Pierre Téchoueyres, Rudolf Adamkovič, Stephen Gildea, Shreyas Ragavan, + Stefan Kangas, Utkarsh Singh, Vincent Murphy, Xinglu Chen, Yuanchen + Xie. + Ideas and user feedback :: Aaron Jensen, Adam Porter, Adam Spiers, Adrian Manea, Alex Griffin, Alex Koen, Alex Peitsinis, Alexey Shmalko, diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el index 20af99df94..fd7ffff98f 100644 --- a/etc/themes/modus-operandi-theme.el +++ b/etc/themes/modus-operandi-theme.el @@ -6,7 +6,7 @@ ;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht> ;; URL: https://git.sr.ht/~protesilaos/modus-themes ;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes -;; Version: 2.5.0 +;; Version: 2.6.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el index e64a11b74f..c4edb1efcb 100644 --- a/etc/themes/modus-themes.el +++ b/etc/themes/modus-themes.el @@ -6,7 +6,7 @@ ;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht> ;; URL: https://git.sr.ht/~protesilaos/modus-themes ;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes -;; Version: 2.5.0 +;; Version: 2.6.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -103,19 +103,19 @@ cover the blue-cyan-magenta side of the spectrum." :tag "Modus Themes") (defgroup modus-themes-faces () - "Faces defined my `modus-operandi' and `modus-vivendi'." + "Faces defined by `modus-operandi' and `modus-vivendi'." :group 'modus-themes :link '(info-link "(modus-themes) Top") :prefix "modus-themes-" :tag "Modus Themes Faces") -(defvar modus-themes--version "2.5.0" +(defvar modus-themes--version "2.6.0" "Current version of the Modus themes. -The version either is the last tagged release, such as '2.4.0', -or an in-development version like '2.5.0-dev'. As we use -semantic versioning, tags of the '2.4.1' sort are not reported: -those would count as part of '2.5.0-dev'.") +The version either is the last tagged release, such as '1.0.0', +or an in-development version like '1.1.0-dev'. As we use +semantic versioning, tags of the '1.0.1' sort are not reported: +those would count as part of '1.1.0-dev'.") ;;;###autoload (defun modus-themes-version (&optional insert) @@ -2270,7 +2270,7 @@ follows (order is not significant): The `popup' key takes the same values as `selection'. -Apart from specifying each key separately, a fallback list is +Apart from specfying each key separately, a fallback list is accepted. This is only useful when the desired aesthetic is the same across all keys that are not explicitly referenced. For example, this: @@ -3239,7 +3239,7 @@ an alternative to the default value." "Search for `modus-themes--heading' weight in LIST." (catch 'found (dolist (elt list) - (when (memq elt modus-themes--heading-weights) + (when (memq elt modus-themes-weights) (throw 'found elt))))) (defun modus-themes--heading (level fg fg-alt bg bg-gray border) @@ -4782,6 +4782,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(consult-narrow-indicator ((,class :foreground ,magenta-alt))) `(consult-preview-cursor ((,class :inherit modus-themes-intense-blue))) `(consult-preview-error ((,class :inherit modus-themes-intense-red))) + `(consult-preview-insertion ((,class :inherit modus-themes-special-warm))) `(consult-preview-line ((,class :background ,bg-hl-alt-intense))) ;;;;; corfu `(corfu-current ((,class :inherit modus-themes-completion-selected-popup))) @@ -5464,8 +5465,8 @@ by virtue of calling either of `modus-themes-load-operandi' and cyan cyan-faint blue-alt blue-alt-faint)))) `(font-lock-warning-face ((,class :inherit modus-themes-bold - ,@(modus-themes--syntax-foreground - yellow yellow-alt-faint)))) + ,@(modus-themes--syntax-comment + yellow red yellow-alt-faint red-faint)))) ;;;;; forge `(forge-post-author ((,class :inherit bold :foreground ,fg-main))) `(forge-post-date ((,class :foreground ,fg-special-cold))) @@ -6182,7 +6183,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(markdown-comment-face ((,class :inherit font-lock-comment-face))) `(markdown-footnote-marker-face ((,class :inherit bold :foreground ,cyan-alt))) `(markdown-footnote-text-face ((,class :inherit modus-themes-slant :foreground ,fg-main))) - `(markdown-gfm-checkbox-face ((,class :foreground ,cyan-alt-other))) + `(markdown-gfm-checkbox-face ((,class :foreground ,yellow-alt-other))) `(markdown-header-delimiter-face ((,class :inherit modus-themes-bold :foreground ,fg-dim))) `(markdown-header-face ((t nil))) `(markdown-header-face-1 ((,class :inherit modus-themes-heading-1))) @@ -6357,6 +6358,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(mu4e-moved-face ((,class :inherit modus-themes-slant :foreground ,yellow))) `(mu4e-ok-face ((,class :inherit bold :foreground ,green))) `(mu4e-region-code ((,class :inherit modus-themes-special-calm))) + `(mu4e-related-face ((,class :inherit (italic shadow)))) `(mu4e-replied-face ((,class :foreground ,blue))) `(mu4e-special-header-value-face ((,class :inherit message-header-subject))) `(mu4e-system-face ((,class :inherit modus-themes-slant :foreground ,fg-mark-del))) @@ -6496,7 +6498,7 @@ by virtue of calling either of `modus-themes-load-operandi' and bg-dim fg-special-cold bg-alt fg-alt)))) `(org-block-end-line ((,class :inherit org-block-begin-line))) - `(org-checkbox (( ))) + `(org-checkbox ((,class :foreground ,yellow-alt-other))) `(org-checkbox-statistics-done ((,class :inherit org-done))) `(org-checkbox-statistics-todo ((,class :inherit org-todo))) `(org-clock-overlay ((,class :background ,yellow-nuanced-bg :foreground ,red-alt-faint))) @@ -6963,11 +6965,6 @@ by virtue of calling either of `modus-themes-load-operandi' and `(smerge-refined-changed (())) `(smerge-refined-removed ((,class :inherit modus-themes-diff-refine-removed))) `(smerge-upper ((,class :inherit modus-themes-diff-removed))) -;;;;; solaire - `(solaire-default-face ((,class :inherit default :background ,bg-alt :foreground ,fg-dim))) - `(solaire-line-number-face ((,class :inherit solaire-default-face :foreground ,fg-unfocused))) - `(solaire-hl-line-face ((,class :background ,bg-active))) - `(solaire-org-hide-face ((,class :background ,bg-alt :foreground ,bg-alt))) ;;;;; spaceline `(spaceline-evil-emacs ((,class :inherit modus-themes-active-magenta))) `(spaceline-evil-insert ((,class :inherit modus-themes-active-green))) diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index f2c916ef30..ba75a2527d 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -6,7 +6,7 @@ ;; Maintainer: Modus-Themes Development <~protesilaos/modus-themes@lists.sr.ht> ;; URL: https://git.sr.ht/~protesilaos/modus-themes ;; Mailing-List: https://lists.sr.ht/~protesilaos/modus-themes -;; Version: 2.5.0 +;; Version: 2.6.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility commit 16dfe04be2c57fc82ccdd56cad97b39d559a5afe Author: Gerd Möllmann Date: Fri Aug 19 10:52:52 2022 +0200 Find libgccjit on macOS with Homebrew differently * configure.ac (MAC_LIBS): Find libgccjit's directory slightly differently for brew installations. diff --git a/configure.ac b/configure.ac index 57b86e8542..bc7485b81c 100644 --- a/configure.ac +++ b/configure.ac @@ -3843,8 +3843,8 @@ if test "${with_native_compilation}" != "no"; then if test -n "`$BREW --prefix --installed libgccjit 2>/dev/null`"; then MAC_CFLAGS="-I$(dirname $($BREW ls -v libgccjit | \ grep libgccjit.h))" - MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit| \ - grep -E 'libgccjit\.(so|dylib)$'))" + MAC_LIBS="-L$(dirname $($BREW ls -v libgccjit \ + | grep -m1 -E 'libgccjit\.(so|dylib)$'))" fi fi commit 5dc274593920e36f58023f92d603824fa0b85b3f Author: Andrea Corallo Date: Fri Aug 19 10:21:38 2022 +0200 * src/pdumper.c (dump_native_comp_unit): Error if CU is not fixed-up diff --git a/src/pdumper.c b/src/pdumper.c index 168027726c..fb70df994a 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -2910,6 +2910,9 @@ static dump_off dump_native_comp_unit (struct dump_context *ctx, struct Lisp_Native_Comp_Unit *comp_u) { + if (!CONSP (comp_u->file)) + error ("Trying to dump non fixed-up eln file\n"); + /* Have function documentation always lazy loaded to optimize load-time. */ comp_u->data_fdoc_v = Qnil; START_DUMP_PVEC (ctx, &comp_u->header, struct Lisp_Native_Comp_Unit, out); commit 9297a9c45eba1b258b820af00ae60486fb79c43c Author: Andrea Corallo Date: Thu Aug 18 16:41:26 2022 +0200 * src/alloc.c (pure_alloc): Warn for pure space overflow diff --git a/src/alloc.c b/src/alloc.c index 2ffee9f729..34bedac36b 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5314,6 +5314,7 @@ static void * pure_alloc (size_t size, int type) { void *result; + static bool pure_overflow_warned = false; again: if (type >= 0) @@ -5338,6 +5339,12 @@ pure_alloc (size_t size, int type) if (pure_bytes_used <= pure_size) return result; + if (!pure_overflow_warned) + { + message ("Pure Lisp storage overflowed"); + pure_overflow_warned = true; + } + /* Don't allocate a large amount here, because it might get mmap'd and then its address might not be usable. */ commit 095ea821208b7470da98d95820653c8d527cd745 Author: Andrea Corallo Date: Wed Aug 17 22:48:59 2022 +0200 * src/pdumper.c (Fdump_emacs_portable): Check and warn for pure space overflow diff --git a/src/alloc.c b/src/alloc.c index 6e166d00d5..2ffee9f729 100644 --- a/src/alloc.c +++ b/src/alloc.c @@ -5355,9 +5355,6 @@ pure_alloc (size_t size, int type) goto again; } - -#ifdef HAVE_UNEXEC - /* Print a warning if PURESIZE is too small. */ void @@ -5368,8 +5365,6 @@ check_pure_size (void) " bytes needed)"), pure_bytes_used + pure_bytes_used_before_overflow); } -#endif - /* Find the byte sequence {DATA[0], ..., DATA[NBYTES-1], '\0'} from the non-Lisp data pool of the pure storage, and return its start diff --git a/src/pdumper.c b/src/pdumper.c index 33cb804dba..168027726c 100644 --- a/src/pdumper.c +++ b/src/pdumper.c @@ -4040,6 +4040,8 @@ types. */) if (!NILP (XCDR (Fall_threads ()))) error ("No other Lisp threads can be running when this function is called"); + check_pure_size (); + /* Clear out any detritus in memory. */ do {