commit bc44763b8342ee9e1bf43ffb202c73fee5ba0bf6 (HEAD, refs/remotes/origin/master) Author: Philipp Stephani Date: Fri Jun 18 08:24:03 2021 +0200 Update SCSS test file syntax. According to https://sass-lang.com/documentation/breaking-changes/slash-div, the slash operator should be replaced by 'math.div'. Fixed using the migration tool mentioned at https://sass-lang.com/documentation/breaking-changes/slash-div#automatic-migration. * test/manual/indent/scss-mode.scss: Remove slash operator. diff --git a/test/manual/indent/scss-mode.scss b/test/manual/indent/scss-mode.scss index 189ec4e22a..2cd4adb8d5 100644 --- a/test/manual/indent/scss-mode.scss +++ b/test/manual/indent/scss-mode.scss @@ -1,5 +1,7 @@ // Comment! +@use "sass:math"; + nav { ul { margin: 0; /* More comment */ @@ -44,8 +46,8 @@ article[role="main"] { $var_with_underscores: #fff; $_var-starting-with-underscore: none; float: left !important; - width: 600px / 888px * 100%; - height: 100px / 888px * 100%; + width: math.div(600px, 888px) * 100%; + height: math.div(100px, 888px) * 100%; color: $var_with_underscores; display: $_var-starting-with-underscore; } commit 7033470adb07062b7d7bbb9499ae80aeb84819ef Author: Arash Esbati Date: Thu Jun 17 23:12:00 2021 +0200 Use \footref when referencing a footnote label * lisp/textmodes/reftex-vars.el (reftex-label-alist-builtin): Use \footref as `reference-format' for \footnote macro. diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index a8ca780b31..96065ee69e 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -121,7 +121,7 @@ (regexp "tables?" "tab\\." "Tabellen?")) ("table*" ?t nil nil caption) - ("\\footnote[]{}" ?n "fn:" "~\\ref{%s}" 2 + ("\\footnote[]{}" ?n "fn:" "~\\footref{%s}" 2 (regexp "footnotes?" "Fussnoten?")) ("any" ?\ " " "~\\ref{%s}" nil) commit f41d0f4749405a642518a1ec9226e537c52f646a Author: Arash Esbati Date: Thu Jun 17 22:59:32 2021 +0200 Support new LaTeX kernel macro \footref * lisp/textmodes/reftex-vars.el (reftex-ref-style-alist): Add entry for \footref macro which is part of LaTeX kernel 2021-06-01. diff --git a/lisp/textmodes/reftex-vars.el b/lisp/textmodes/reftex-vars.el index 0d6bfb5d86..a8ca780b31 100644 --- a/lisp/textmodes/reftex-vars.el +++ b/lisp/textmodes/reftex-vars.el @@ -1059,7 +1059,7 @@ This is used to string together whole reference sets, like (defcustom reftex-ref-style-alist '(("Default" t - (("\\ref" ?\C-m) ("\\Ref" ?R) ("\\pageref" ?p))) + (("\\ref" ?\C-m) ("\\Ref" ?R) ("\\footref" ?n) ("\\pageref" ?p))) ("Varioref" "varioref" (("\\vref" ?v) ("\\Vref" ?V) ("\\vpageref" ?g))) ("Fancyref" "fancyref" @@ -1079,7 +1079,7 @@ the macro type is being prompted for. (See also `reftex-ref-macro-prompt'.) The keys, represented as characters, have to be unique." :group 'reftex-referencing-labels - :version "27.1" + :version "28.1" :type '(alist :key-type (string :tag "Style name") :value-type (group (choice :tag "Package" (const :tag "Any package" t) commit fe1b72d21658cf3acfaae3b092bc53a2fe479f0f Author: Juri Linkov Date: Thu Jun 17 23:19:30 2021 +0300 * lisp/help-fns.el (help--symbol-class): Concat chars for all namespaces. Since Emacs Lisp is more than Lisp-2, separately output letters for each namespace: functions, variables, faces, classes. Use non-letter characters for additional properties such as advice, obsolete, local. (help--symbol-completion-table-affixation): Use format "%-4s". https://lists.gnu.org/archive/html/emacs-devel/2021-06/msg00524.html diff --git a/lisp/help-fns.el b/lisp/help-fns.el index f9804c705b..afdb0d17b2 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el @@ -130,23 +130,25 @@ with the current prefix. The files are chosen according to "Return symbol class characters for symbol S." (when (stringp s) (setq s (intern-soft s))) - (cond ((commandp s) - "c") ; command - ((eq (car-safe (symbol-function s)) 'macro) - "m") ; macro - ((fboundp s) - "f") ; function - ((custom-variable-p s) - "u") ; user option - ((boundp s) - "v") ; variable - ((facep s) - "a") ; fAce - ((and (fboundp 'cl-find-class) - (cl-find-class s)) - "t") ; CL type - (" ") ; something else - )) + (concat + (when (fboundp s) + (concat + (cond + ((commandp s) "c") + ((eq (car-safe (symbol-function s)) 'macro) "m") + (t "f")) + (and (let ((flist (indirect-function s))) + (advice--p (if (eq 'macro (car-safe flist)) (cdr flist) flist))) + "!") + (and (get s 'byte-obsolete-info) "-"))) + (when (boundp s) + (concat + (if (custom-variable-p s) "u" "v") + (and (local-variable-if-set-p s) "'") + (and (ignore-errors (not (equal (symbol-value s) (default-value s)))) "*") + (and (get s 'byte-obsolete-variable) "-"))) + (and (facep s) "a") + (and (fboundp 'cl-find-class) (cl-find-class s) "t"))) (defun help--symbol-completion-table-affixation (completions) (mapcar (lambda (c) @@ -154,7 +156,7 @@ with the current prefix. The files are chosen according to (doc (condition-case nil (documentation s) (error nil))) (doc (and doc (substring doc 0 (string-match "\n" doc))))) (list c (propertize - (concat (help--symbol-class s) " ") ; prefix separator + (format "%-4s" (help--symbol-class s)) 'face 'completions-annotations) (if doc (propertize (format " -- %s" doc) 'face 'completions-annotations) commit 45acbe6d622f807ff960e1c2fe92127188f57f68 Author: Juri Linkov Date: Thu Jun 17 22:53:57 2021 +0300 Fix display-buffer-override-next-command for no-select case (bug#49057) * lisp/window.el (display-buffer-override-next-command): Separate 'postfun' from 'clearfun', so 'clearfun' resets 'display-buffer-overriding-action', whereas 'postfun' calls 'post-function' that can select the right window in 'post-command-hook'. * lisp/windmove.el (windmove-display-no-select): Add new choice 'ignore'. Improve docstring. (windmove-display-in-direction): Use new value 'ignore' of 'windmove-display-no-select'. Improve docstring. (windmove-display-left, windmove-display-up) (windmove-display-right, windmove-display-down): Mention 'windmove-display-no-select' in docstrings. diff --git a/lisp/windmove.el b/lisp/windmove.el index 3c1f20aa26..f747c40943 100644 --- a/lisp/windmove.el +++ b/lisp/windmove.el @@ -497,8 +497,20 @@ Default value of MODIFIERS is `shift'." ;;; Directional window display and selection (defcustom windmove-display-no-select nil - "Whether the window should be selected after displaying the buffer in it." - :type 'boolean + "Whether the window should be selected after displaying the buffer in it. +If `nil', then the new window where the buffer is displayed will be selected. +If `ignore', then don't select a window: neither the new nor the old window, +thus allowing the next command to decide what window it selects. +Other non-nil values will reselect the old window that was selected before. + +The value of this variable can be overridden by the prefix arg of the +windmove-display-* commands that use `windmove-display-in-direction'. + +When `switch-to-buffer-obey-display-actions' is non-nil, +`switch-to-buffer' commands are also supported." + :type '(choice (const :tag "Select new window" nil) + (const :tag "Select old window" t) + (const :tag "Don't select a window" ignore)) :version "27.1") (defun windmove-display-in-direction (dir &optional arg) @@ -506,11 +518,17 @@ Default value of MODIFIERS is `shift'." The next buffer is the buffer displayed by the next command invoked immediately after this command (ignoring reading from the minibuffer). Create a new window if there is no window in that direction. -By default, select the window with a displayed buffer. -If prefix ARG is `C-u', reselect a previously selected window. -If `windmove-display-no-select' is non-nil, this command doesn't -select the window with a displayed buffer, and the meaning of -the prefix argument is reversed. + +By default, select the new window with a displayed buffer. +If `windmove-display-no-select' is `ignore', then allow the next command +to decide what window it selects. With other non-nil values of +`windmove-display-no-select', this function reselects +a previously selected old window. + +If prefix ARG is `C-u', reselect a previously selected old window. +If `windmove-display-no-select' is non-nil, the meaning of +the prefix argument is reversed and it selects the new window. + When `switch-to-buffer-obey-display-actions' is non-nil, `switch-to-buffer' commands are also supported." (let ((no-select (xor (consp arg) windmove-display-no-select))) @@ -542,35 +560,40 @@ When `switch-to-buffer-obey-display-actions' is non-nil, (setq window (split-window nil nil dir) type 'window)) (cons window type))) (lambda (old-window new-window) - (when (window-live-p (if no-select old-window new-window)) + (when (and (not (eq windmove-display-no-select 'ignore)) + (window-live-p (if no-select old-window new-window))) (select-window (if no-select old-window new-window)))) (format "[display-%s]" dir)))) ;;;###autoload (defun windmove-display-left (&optional arg) "Display the next buffer in window to the left of the current one. -See the logic of the prefix ARG in `windmove-display-in-direction'." +See the logic of the prefix ARG and `windmove-display-no-select' +in `windmove-display-in-direction'." (interactive "P") (windmove-display-in-direction 'left arg)) ;;;###autoload (defun windmove-display-up (&optional arg) "Display the next buffer in window above the current one. -See the logic of the prefix ARG in `windmove-display-in-direction'." +See the logic of the prefix ARG and `windmove-display-no-select' +in `windmove-display-in-direction'." (interactive "P") (windmove-display-in-direction 'up arg)) ;;;###autoload (defun windmove-display-right (&optional arg) "Display the next buffer in window to the right of the current one. -See the logic of the prefix ARG in `windmove-display-in-direction'." +See the logic of the prefix ARG and `windmove-display-no-select' +in `windmove-display-in-direction'." (interactive "P") (windmove-display-in-direction 'right arg)) ;;;###autoload (defun windmove-display-down (&optional arg) "Display the next buffer in window below the current one. -See the logic of the prefix ARG in `windmove-display-in-direction'." +See the logic of the prefix ARG and `windmove-display-no-select' +in `windmove-display-in-direction'." (interactive "P") (windmove-display-in-direction 'down arg)) diff --git a/lisp/window.el b/lisp/window.el index 6afc519e28..c0511bec4c 100644 --- a/lisp/window.el +++ b/lisp/window.el @@ -8768,6 +8768,7 @@ to deactivate this overriding action." (new-window nil) (minibuffer-depth (minibuffer-depth)) (clearfun (make-symbol "clear-display-buffer-overriding-action")) + (postfun (make-symbol "post-display-buffer-override-next-command")) (action (lambda (buffer alist) (unless (> (minibuffer-depth) minibuffer-depth) (let* ((ret (funcall pre-function buffer alist)) @@ -8776,21 +8777,23 @@ to deactivate this overriding action." (setq new-window (window--display-buffer buffer window type alist)) ;; Reset display-buffer-overriding-action - ;; after the first buffer display action + ;; after the first display-buffer action (bug#39722). (funcall clearfun) - (setq post-function nil) new-window)))) (command this-command) (echofun (when echo (lambda () echo))) (exitfun (lambda () - (setcar display-buffer-overriding-action - (delq action (car display-buffer-overriding-action))) - (remove-hook 'post-command-hook clearfun) + (funcall clearfun) + (remove-hook 'post-command-hook postfun) (remove-hook 'prefix-command-echo-keystrokes-functions echofun) (when (functionp post-function) (funcall post-function old-window new-window))))) (fset clearfun + (lambda () + (setcar display-buffer-overriding-action + (delq action (car display-buffer-overriding-action))))) + (fset postfun (lambda () (unless (or ;; Remove the hook immediately @@ -8800,9 +8803,8 @@ to deactivate this overriding action." ;; adding the hook by the same command below. (eq this-command command)) (funcall exitfun)))) - ;; Reset display-buffer-overriding-action - ;; after the next command finishes - (add-hook 'post-command-hook clearfun) + ;; Call post-function after the next command finishes (bug#49057). + (add-hook 'post-command-hook postfun) (when echofun (add-hook 'prefix-command-echo-keystrokes-functions echofun)) (push action (car display-buffer-overriding-action))