commit e953490603e597530f9dac68acdd3d199283e534 (HEAD, refs/remotes/origin/master) Author: Eli Zaretskii Date: Fri Oct 28 09:23:12 2022 +0300 ; * lisp/progmodes/gud.el (gud-gdb): Doc fix. (Bug#58826) diff --git a/lisp/progmodes/gud.el b/lisp/progmodes/gud.el index 281762fb0a..9b7d7a0535 100644 --- a/lisp/progmodes/gud.el +++ b/lisp/progmodes/gud.el @@ -752,7 +752,12 @@ It should return a list of completion strings.") If COMMAND-LINE names a program FILE to debug, gdb will run in a buffer named *gud-FILE*, and the directory containing FILE becomes the initial working directory and source-file directory -for your debugger. +for your debugger. If you don't want `default-directory' to +change to the directory of FILE, specify FILE without leading +directories, in which case FILE should reside either in the +directory of the buffer from which this command is invoked, or +it can be found by searching PATH. + If COMMAND-LINE requests that gdb attaches to a process PID, gdb will run in *gud-PID*, otherwise it will run in *gud*; in these cases the initial working directory is the `default-directory' of commit 1e7710d00f909900c9934d61113c43cb2229530f Author: Protesilaos Stavrou Date: Fri Oct 28 07:51:55 2022 +0300 Update to modus-themes version 3.0.0 * doc/misc/modus-themes.org (Option for red-green color deficiency or deuteranopia) (Option for more bold constructs, Option for more italic constructs) (Option for font mixing, Option for box buttons) (Option for mode line presentation) (Option for accented background in tab interfaces) (Option for completion framework aesthetics, Option for mail citations) (Option for line numbers, Option for mouseover effects) (Option for diff buffer looks, Option for org-mode block styles) (Option for Org agenda constructs) (Option for the headings' overall style) (Option for variable-pitch font in UI elements, Note on SHR fonts): Revise markup of "non-nil" so that it is rendered properly in texinfo. (Option for fringe visibility, Option for line highlighting): Reword description of user option. (Full support for packages or face groups): Update list of supported packages or face groups. (Note on ERC escaped color sequences) (What is the best setup for legibility?) (Port the Modus themes to other platforms?): Prefer American English. (Note on pdf-tools link hints): Use double spacing between sentences (Acknowledgements): Update list of names that have contributed to the project, which was user feedback in this case. * etc/themes/modus-themes.el (modus-themes, modus-themes-faces): Reword doc string. (modus-themes--version): Update to current version. (modus-themes-version): Refine function definition. (modus-themes-completion-standard-first-match) (modus-themes-completion-standard-selected) (modus-themes-completion-extra-selected) (modus-themes-completion-key-binding, modus-themes-intense-markup) (modus-themes--heading-weights, modus-themes--completion): Delete obsolete forms, which were deprecated many months/version ago. (modus-themes-fringes, modus-themes-completions) (modus-themes-hl-line): Update default value and reword doc string accordingly. (modus-themes-faces): Update list of supported faces and their attributes. * etc/themes/modus-operandi-theme.el: * etc/themes/modus-vivendi-theme.el: Update version header. Complete release notes: . diff --git a/doc/misc/modus-themes.org b/doc/misc/modus-themes.org index 2680fe9eb5..c5accd0789 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.7.0 -#+macro: release-date 2022-10-01 -#+macro: development-version 2.8.0-dev +#+macro: stable-version 3.0.0 +#+macro: release-date 2022-10-28 +#+macro: development-version 3.1.0-dev #+macro: file @@texinfo:@file{@@$1@@texinfo:}@@ #+macro: space @@texinfo:@: @@ #+macro: kbd @@texinfo:@kbd{@@$1@@texinfo:}@@ @@ -35,6 +35,7 @@ Current development target is {{{development-version}}}. + Homepage: https://protesilaos.com/emacs/modus-themes. + Git repository: https://git.sr.ht/~protesilaos/modus-themes. + Mailing list: https://lists.sr.ht/~protesilaos/modus-themes. ++ Backronym: My Old Display Unexpectedly Sharpened ... themes #+toc: headlines 8 insert TOC here, with eight headline levels @@ -632,7 +633,7 @@ to user options to take effect ([[#h:3f3c3728-1b34-437d-9d0c-b110f5b161a9][Enabl :end: #+vindex: modus-themes-deuteranopia -Brief: When non-nil use red/blue color-coding instead of red/green, +Brief: When non-~nil~ use red/blue color-coding instead of red/green, where appropriate. Symbol: ~modus-themes-deuteranopia~ (=boolean= type) @@ -679,7 +680,7 @@ Possible values: The default is to use a bold typographic weight only when it is required. -With a non-nil value (~t~) display several syntactic constructs in bold +With a non-~nil~ value (~t~) display several syntactic constructs in bold weight. This concerns keywords and other important aspects of code syntax. It also affects certain mode line indicators and command-line prompts. @@ -709,7 +710,7 @@ Possible values: The default is to not use slanted text forms (italics) unless it is absolutely necessary. -With a non-nil value (~t~) choose to render more faces in italics. This +With a non-~nil~ value (~t~) choose to render more faces in italics. This typically affects documentation strings and code comments. Advanced users may also want to configure the exact attributes of the @@ -799,7 +800,7 @@ Possible values: 1. ~nil~ (default) 2. ~t~ -When set to non-nil (~t~), configure some spacing-sensitive faces like Org +When set to non-~nil~ (~t~), configure some spacing-sensitive faces like Org tables and code blocks to always inherit from the ~fixed-pitch~ face. This is to ensure that certain constructs like code blocks and tables remain monospaced even when users opt for a mode that remaps typeface @@ -926,8 +927,8 @@ an empty list). The list can include any of the following symbols: the form of =(height . FLOAT)= + ~all-buttons~ -The default (a nil value or an empty list) is a gray background combined -with a pseudo three-dimensional effect. +The default (a ~nil~ value or an empty list) is a gray background +combined with a pseudo three-dimensional effect. The ~flat~ property makes the button two dimensional. @@ -1068,7 +1069,7 @@ effect, color, and border visibility: + A floating point to set the height of the mode line's text. It can also be a cons cell in the form of ~(height . FLOAT)~. -The default (a nil value or an empty list) is a two-dimensional +The default (a ~nil~ value or an empty list) is a two-dimensional rectangle with a border around it. The active and the inactive mode lines use different shades of grayscale values for the background, foreground, border. @@ -1097,7 +1098,7 @@ of NATNUM pixels at the boundaries of the mode lines. The default value is 1 and does not need to be specified explicitly. The padding has no effect when the ~moody~ property is also used, because Moody already applies its own tweaks. To ensure that the underline is placed at the -bottom of the mode line, set ~x-underline-at-descent-line~ to non-nil +bottom of the mode line, set ~x-underline-at-descent-line~ to non-~nil~ (this is not needed when the ~borderless~ property is also set). For users on Emacs 29, the ~x-use-underline-position-properties~ variable must also be set to nil. @@ -1159,7 +1160,7 @@ colors (which have been carefully designed to be highly accessible). Furthermore, because Moody expects an underline and overline instead of a box style, it is strongly advised to set ~x-underline-at-descent-line~ -to a non-nil value. +to a non-~nil~ value. Finally, note that various packages which heavily modify the mode line, such as =doom-modeline=, =nano-modeline=, =powerline=, =spaceline= may not look @@ -1183,7 +1184,7 @@ Possible values: + ~t~ By default, all tab interfaces use backgrounds which are shades of gray. -When this option is set to non-nil, the backgrounds become colorful. +When this option is set to non-~nil~, the backgrounds become colorful. This affects the built-in ~tab-bar-mode~ and ~tab-line-mode~, as well as the Centaur tabs package. @@ -1202,8 +1203,9 @@ Symbol: ~modus-themes-completions~ (=alist= type properties) This affects Company, Corfu, Flx, Helm, Icomplete/Fido, Ido, Ivy, Orderless, Selectrum, Vertico. The value is an alist that takes the -form of a =(key . properties)= combination. Here is a sample, followed -by a description of the particularities: +form of a =(KEY . PROPERTIES)= combination. =KEY= is a symbol, while +=PROPERTIES= is a list. Here is a sample, followed by a description +of the particularities: #+begin_src emacs-lisp (setq modus-themes-completions @@ -1213,10 +1215,10 @@ by a description of the particularities: #+end_src The ~matches~ key refers to the highlighted characters that correspond -to the user's input. By default (nil or an empty list), they have a -bold weight and a colored foreground. The list of properties may -include any of the following symbols regardless of the order they may -appear in: +to the user's input. When its properties are ~nil~ or an empty list, +matching characters in the user interface will have a bold weight and +a colored foreground. The list of properties may include any of the +following symbols regardless of the order they may appear in: - ~background~ to add a background color; @@ -1232,10 +1234,10 @@ appear in: variable. The absence of a weight means that bold will be used. The ~selection~ key applies to the current line or currently matched -candidate, depending on the specifics of the User Interface. By default -(nil or an empty list), it has a subtle gray background, a bold weight, -and the base foreground value for the text. The list of properties it -accepts is as follows (order is not significant): +candidate, depending on the specifics of the user interface. When its +properties are ~nil~ or an empty list, it has a subtle gray background, +a bold weight, and the base foreground value for the text. The list +of properties it accepts is as follows (order is not significant): - ~accented~ to make the background colorful instead of gray; @@ -1251,7 +1253,11 @@ accepts is as follows (order is not significant): cetera. Valid symbols are defined in the ~modus-themes-weights~ variable. The absence of a weight means that bold will be used. -The ~popup~ key takes the same values as ~selection~. +The ~popup~ key takes the same values as ~selection~. The only +difference is that it applies specifically to user interfaces that +display an inline popup and thus have slightly different styling +requirements than the minibuffer. The two prominent packages are +=company= and =corfu=. Apart from specifying each key separately, a fallback list is accepted. This is only useful when the desired aesthetic is the same across all @@ -1276,21 +1282,10 @@ corresponding key is simply ignored (~matches~ does not have ~accented~ and ~text-also~, while ~selection~ and ~popup~ do not have ~background~). -A concise expression of those associations can be written as follows, -where the ~car~ is always the key and the ~cdr~ is the list of -properties (whatever order they may appear in): - -#+begin_src emacs-lisp -(setq modus-themes-completions - '((matches extrabold background intense) - (selection semibold accented intense) - (popup accented))) -#+end_src - [[#h:2793a224-2109-4f61-a106-721c57c01375][Configure bold and italic faces]]. -Also refer to the Orderless documentation for its intersection with -Company (if you choose to use those in tandem). +Also refer to the documentation of the ~orderless~ package for its +intersection with ~company~ (if you choose to use those in tandem). ** Option for mail citations :properties: @@ -1312,7 +1307,7 @@ Possible values: 3. ~faint~ 4. ~monochrome~ -By default (a nil value) citations are styled with contrasting hues to +By default (a ~nil~ value) citations are styled with contrasting hues to denote their depth. Colors are easy to tell apart because they complement each other, but they otherwise are not very prominent. @@ -1342,17 +1337,16 @@ Symbol: ~modus-themes-fringes~ (=choice= type) Possible values: -1. ~nil~ (default) +1. ~nil~ 2. ~subtle~ 3. ~intense~ -The default is to use the same color as that of the main background, -meaning that the fringes are not obvious though they still occupy the -space given to them by ~fringe-mode~. +When the value is nil, do not apply a distinct background color. -Options ~subtle~ and ~intense~ apply a gray background, making the fringes -visible. The difference between the two is one of degree, as their -names imply. +With a value of ~subtle~ use a gray background color that is +visible yet close to the main background color. + +With ~intense~ use a more pronounced gray background color. ** Option for language checkers :properties: @@ -1435,16 +1429,16 @@ Brief: Control the style of the current line of ~hl-line-mode~. Symbol: ~modus-themes-hl-line~ (=choice= type, list of properties) -Possible values are expressed as a list of properties (default is ~nil~ or -an empty list). The list can include any of the following symbols: +The value is a list of properties, each designated by a symbol. With +a ~nil~ value, or an empty list, the style is a subtle gray background +color. + +Possible properties are the following symbols: + ~accented~ + ~intense~ + ~underline~ -The default (a ~nil~ value or an empty list) is a subtle gray background -color. - The property ~accented~ changes the background to a colored variant. An ~underline~ property draws a line below the highlighted area. Its @@ -1471,8 +1465,9 @@ In user configuration files the form may look like this: (setq modus-themes-hl-line '(underline accented)) #+end_src -Set ~x-underline-at-descent-line~ to a non-nil value for better results -with underlines. +Set ~x-underline-at-descent-line~ to a non-~nil~ value so that the +placement of the underline coincides with the lower boundary of the +colored background. This style affects several packages that enable ~hl-line-mode~, such as =elfeed=, =notmuch=, and =mu4e=. @@ -1506,7 +1501,7 @@ Similarly, the faces for ~display-line-numbers-major-tick~ and its counterpart ~display-line-numbers-minor-tick~ use appropriate styles that involve a bespoke background and foreground combination. -With a non-nil value (~t~), line numbers have no background of their own. +With a non-~nil~ value (~t~), line numbers have no background of their own. Instead they retain the primary background of the theme, blending with the rest of the buffer. Foreground values for all relevant faces are updated to accommodate this aesthetic. @@ -1529,7 +1524,7 @@ Possible value: 2. ~t~ By default all mouseover effects apply a highlight with a subtle colored -background. When non-nil, these have a more pronounced effect. +background. When non-~nil~, these have a more pronounced effect. Note that this affects the generic ~highlight~ which, strictly speaking, is not limited to mouse usage. @@ -1713,11 +1708,11 @@ Option ~desaturated~ follows the same principles as with the default (~nil~), though it tones down all relevant colors. Option ~bg-only~ applies a background but does not override the text's -foreground. This makes it suitable for a non-nil value passed to +foreground. This makes it suitable for a non-~nil~ value passed to ~diff-font-lock-syntax~ (note: Magit does not support syntax highlighting in diffs---last checked on 2021-12-02). -When the user option ~modus-themes-deuteranopia~ is non-nil, all diffs +When the user option ~modus-themes-deuteranopia~ is non-~nil~, all diffs will use a red/blue color-coding system instead of the standard red/green. Other stylistic changes are made in the interest of optimizing for such a use-case. @@ -1776,8 +1771,8 @@ of the block. Disable the extension of such backgrounds by setting ~org-fontify-whole-block-delimiter-line~ to nil. Code blocks use their major mode's colors only when the variable -~org-src-fontify-natively~ is non-nil. While quote/verse blocks require -setting ~org-fontify-quote-and-verse-blocks~ to a non-nil value. +~org-src-fontify-natively~ is non-~nil~. While quote/verse blocks require +setting ~org-fontify-quote-and-verse-blocks~ to a non-~nil~ value. [[#h:f44cc6e3-b0f1-4a5e-8a90-9e48fa557b50][Update Org block delimiter fontification]]. @@ -1894,7 +1889,7 @@ An ~event~ key covers (i) headings with a plain time stamp that are shown on the agenda, also known as events, (ii) entries imported from the diary, and (iii) other items that derive from a symbolic expression or sexp (phases of the moon, holidays, etc.). By default all those look -the same and have a subtle foreground color (the default is a nil value +the same and have a subtle foreground color (the default is a ~nil~ value or an empty list). This key accepts a list of properties. Those are: - ~accented~ applies an accent value to the event's foreground, @@ -1925,7 +1920,7 @@ A ~scheduled~ key applies to tasks with a scheduled date. By default (a ~nil~ value), those use varying shades of yellow to denote (i) a past or current date and (ii) a future date. Valid values are symbols: -- nil (default); +- ~nil~ (default); - ~uniform~ to make all scheduled dates the same color; - ~rainbow~ to use contrasting colors for past, present, future scheduled dates. @@ -1963,7 +1958,7 @@ passed as a symbol. Those are: being too late. The difference between ready and clear states is attenuated by painting both of them using shades of green. This option thus highlights the alert and overdue states. -- When ~modus-themes-deuteranopia~ is non-nil the exact style of the habit +- When ~modus-themes-deuteranopia~ is non-~nil~ the exact style of the habit graph adapts to the needs of users with red-green color deficiency by substituting every instance of green with blue or cyan (depending on the specifics). @@ -2108,7 +2103,7 @@ In user configuration files the form may look like this: #+end_src When defining the styles per heading level, it is possible to pass a -non-nil value (~t~) instead of a list of properties. This will retain the +non-~nil~ value (~t~) instead of a list of properties. This will retain the original aesthetic for that level. For example: #+begin_src emacs-lisp @@ -2153,7 +2148,7 @@ and tab line. The default is to use the same font as the rest of Emacs, which usually is a monospaced family. -With a non-nil value (~t~) apply a proportionately spaced typeface. This +With a non-~nil~ value (~t~) apply a proportionately spaced typeface. This is done by assigning the ~variable-pitch~ face to the relevant items. [[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]]. @@ -4681,6 +4676,7 @@ have lots of extensions, so the "full support" may not be 100% true… + notmuch + num3-mode + nxml-mode ++ olivetti + orderless + org* + org-journal @@ -4753,7 +4749,7 @@ have lots of extensions, so the "full support" may not be 100% true… + tab-bar-groups + tab-bar-mode + tab-line-mode -+ table (built-in table.el) ++ table (built-in {{{file(table.el)}}}) + telega + telephone-line + terraform-mode @@ -4768,7 +4764,7 @@ have lots of extensions, so the "full support" may not be 100% true… + tuareg + typescript + undo-tree -+ vc (vc-dir.el, vc-hooks.el) ++ vc ({{{file(vc-dir.el)}}}, {{{file(vc-hooks.el)}}}) + vertico + vertico-quick + vimish-fold @@ -4793,8 +4789,7 @@ have lots of extensions, so the "full support" may not be 100% true… + yasnippet + ztree -Plus many other miscellaneous faces that are provided by the upstream -GNU Emacs distribution. +Plus many other miscellaneous faces that are provided by Emacs. ** Indirectly covered packages :properties: @@ -5397,7 +5392,7 @@ https://github.com/tumashu/company-posframe/] :custom_id: h:98bdf319-1e32-4469-8a01-771200fba65c :end: -The built-in IRC client ~erc~ has the ability to colorise any text using +The built-in IRC client ~erc~ has the ability to colorize any text using escape sequences that start with =^C= (inserted with {{{kbd(C-q C-c)}}}) and are followed by a number for the foreground and background.[fn:: This page explains the basics, though it is not specific to Emacs: @@ -5453,7 +5448,7 @@ Consult the doc string of ~shr-use-colors~. By default, packages that build on top of the Simple HTML Remember (=shr=) use proportionately spaced fonts. This is controlled by the user option -~shr-use-fonts~, which is set to non-nil by default. To use the standard +~shr-use-fonts~, which is set to non-~nil~ by default. To use the standard font instead, set that variable to nil. [[#h:defcf4fc-8fa8-4c29-b12e-7119582cc929][Font configurations for Org and others]]. @@ -5543,9 +5538,9 @@ ANSI color number 1 (red) from the already-supported array of :end: Hints are drawn by [[https://imagemagick.org/][ImageMagick]], not Emacs, i.e., ImageMagick doesn't -know about the hint face unless you tell ImageMagick about it. By +know about the hint face unless you tell ImageMagick about it. By default, only the foreground and background color attributes are -passed. The below snippet adds to those the various font attributes. As +passed. The below snippet adds to those the various font attributes. As it queries various faces, specifically ~pdf-links-read-link~ and the faces it inherits, it needs to be added to your initialization file after you've customized any faces. @@ -5816,9 +5811,9 @@ In general, an additional source of light other than that of the monitor can help reduce eye strain: the eyes are more relaxed when they do not have to focus on one point to gather light. -The monitor's display settings must be accounted for. Gamma values, in +The monitor's display settings must be accounted for. Gamma values, in particular, need to be calibrated to neither amplify nor distort the -perception of black. Same principle for sharpness, brightness, and +perception of black. Same principle for sharpness, brightness, and contrast as determined by the hardware, which all have an effect on how text is read on the screen. @@ -5956,7 +5951,7 @@ the themes, which is partially fleshed out in this manual. With regard to the artistic aspect (where "art" qua skill may amount to an imprecise science), there is no hard-and-fast rule in effect as it -requires one to exercise discretion and make decisions based on +requires one to exercize discretion and make decisions based on context-dependent information or constraints. As is true with most things in life, when in doubt, do not cling on to the letter of the law but try to understand its spirit. @@ -6125,22 +6120,22 @@ The Modus themes are a collective effort. Every bit of work matters. Yiltiz, Ilja Kocken, Iris Garcia, Ivan Popovych, Jeremy Friesen, Jerry Zhang, Johannes Grødem, John Haman, Jonas Collberg, Jorge Morais, Joshua O'Connor, Julio C. Villasante, Kenta Usami, Kevin - Fleming, Kévin Le Gouguec, Kostadin Ninev, Len Trigg, Lennart - C. Karssen, Luis Miguel Castañeda, Magne Hov, Manuel Uberti, Mark - Bestley, Mark Burton, Mark Simpson, Markus Beppler, Matt Armstrong, - Mauro Aranda, Maxime Tréca, Michael Goldenberg, Morgan Smith, Morgan - Willcock, Murilo Pereira, Nicky van Foreest, Nicolas De Jaeghere, - Paul Poloskov, Pengji Zhang, Pete Kazmier, Peter Wu, Philip - Kaludercic, Pierre Téchoueyres, Przemysław Kryger, Robert Hepple, - Roman Rudakov, Ryan Phillips, Rytis Paškauskas, Rudolf Adamkovič, - Sam Kleinman, Samuel Culpepper, Saša Janiška, Shreyas Ragavan, Simon - Pugnet, Tassilo Horn, Thibaut Verron, Thomas Heartman, Togan - Muftuoglu, Tony Zorman, Trey Merkley, Tomasz Hołubowicz, Toon Claes, - Uri Sharf, Utkarsh Singh, Vincent Foley. As well as users: Ben, - CsBigDataHub1, Emacs Contrib, Eugene, Fourchaux, Fredrik, Moesasji, - Nick, Summer Emacs, TheBlob42, Trey, bepolymathe, bit9tream, - derek-upham, doolio, fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, - pRot0ta1p. + Fleming, Kévin Le Gouguec, Kevin Kainan Li, Kostadin Ninev, Len + Trigg, Lennart C. Karssen, Luis Miguel Castañeda, Magne Hov, Manuel + Uberti, Mark Bestley, Mark Burton, Mark Simpson, Markus Beppler, + Matt Armstrong, Matthias Fuchs, Mauro Aranda, Maxime Tréca, Michael + Goldenberg, Morgan Smith, Morgan Willcock, Murilo Pereira, Nicky van + Foreest, Nicolas De Jaeghere, Pablo Stafforini, Paul Poloskov, + Pengji Zhang, Pete Kazmier, Peter Wu, Philip Kaludercic, Pierre + Téchoueyres, Przemysław Kryger, Robert Hepple, Roman Rudakov, Ryan + Phillips, Rytis Paškauskas, Rudolf Adamkovič, Sam Kleinman, Samuel + Culpepper, Saša Janiška, Shreyas Ragavan, Simon Pugnet, Tassilo + Horn, Thibaut Verron, Thomas Heartman, Togan Muftuoglu, Tony Zorman, + Trey Merkley, Tomasz Hołubowicz, Toon Claes, Uri Sharf, Utkarsh + Singh, Vincent Foley. As well as users: Ben, CsBigDataHub1, Emacs + Contrib, Eugene, Fourchaux, Fredrik, Moesasji, Nick, Summer Emacs, + TheBlob42, Trey, bepolymathe, bit9tream, derek-upham, doolio, + fleimgruber, gitrj95, iSeeU, jixiuf, okamsn, pRot0ta1p. + Packaging :: Basil L.{{{space()}}} Contovounesios, Eli Zaretskii, Glenn Morris, Mauro Aranda, Richard Stallman, Stefan Kangas (core diff --git a/etc/themes/modus-operandi-theme.el b/etc/themes/modus-operandi-theme.el index 0f0630a6d1..6ea92f8559 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.7.1 +;; Version: 3.0.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -71,6 +71,7 @@ which corresponds to a minimum contrast in relative luminance of (provide-theme 'modus-operandi)) -;;;###theme-autoload (put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus)) +;;;###theme-autoload +(put 'modus-operandi 'theme-properties '(:background-mode light :kind color-scheme :family modus)) ;;; modus-operandi-theme.el ends here diff --git a/etc/themes/modus-themes.el b/etc/themes/modus-themes.el index d5e1b0a120..a9d0d53cba 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.7.1 +;; Version: 3.0.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -88,7 +88,7 @@ (require 'subr-x)) (defgroup modus-themes () - "Options for `modus-operandi', `modus-vivendi'. + "Options for `modus-operandi', `modus-vivendi' themes. The Modus themes conform with the WCAG AAA standard for color contrast between background and foreground combinations (a minimum contrast of 7:1---the highest standard of its kind). The @@ -103,13 +103,13 @@ cover the blue-cyan-magenta side of the spectrum." :tag "Modus Themes") (defgroup modus-themes-faces () - "Faces defined by `modus-operandi' and `modus-vivendi'." + "Faces defined by `modus-operandi' and `modus-vivendi' themes." :group 'modus-themes :link '(info-link "(modus-themes) Top") :prefix "modus-themes-" :tag "Modus Themes Faces") -(defvar modus-themes--version "2.7.0" +(defvar modus-themes--version "3.0.0" "Current version of the Modus themes. The version either is the last tagged release, such as '1.0.0', @@ -123,10 +123,7 @@ those would count as part of '1.1.0-dev'.") If optional INSERT argument is provided from Lisp or as a prefix argument, insert the `modus-themes--version' at point." (interactive "P") - (if-let ((version modus-themes--version) - ((or insert current-prefix-arg))) - (insert version) - (message version))) + (funcall (if insert 'insert 'message) modus-themes--version)) ;;;###autoload (defun modus-themes-report-bug () @@ -1364,26 +1361,6 @@ The actual styling of the face is done by `modus-themes-faces'." The actual styling of the face is done by `modus-themes-faces'." :group 'modus-themes-faces) -(define-obsolete-face-alias - 'modus-themes-completion-standard-first-match - 'modus-themes-completion-selected - "2.2.0") - -(define-obsolete-face-alias - 'modus-themes-completion-standard-selected - 'modus-themes-completion-selected - "2.2.0") - -(define-obsolete-face-alias - 'modus-themes-completion-extra-selected - 'modus-themes-completion-selected - "2.2.0") - -(define-obsolete-face-alias - 'modus-themes-completion-key-binding - 'modus-themes-key-binding - "2.2.0") - (defface modus-themes-completion-selected nil "Face for current selection in completion UIs. The actual styling of the face is done by `modus-themes-faces'." @@ -1934,20 +1911,22 @@ For example: :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Org agenda")) -(defcustom modus-themes-fringes nil - "Define the visibility of fringes. +(defcustom modus-themes-fringes 'subtle + "Control the visibility of fringes. + +When the value is nil, do not apply a distinct background color. -Nil means the fringes have no background color. Option `subtle' -will apply a grayscale value that is visible yet close to the -main buffer background color. Option `intense' will use a more -pronounced grayscale value." +With a value of `subtle' use a gray background color that is +visible yet close to the main background color. + +With `intense' use a more pronounced gray background color." :group 'modus-themes - :package-version '(modus-themes . "1.0.0") - :version "28.1" + :package-version '(modus-themes . "3.0.0") + :version "29.1" :type '(choice - (const :format "[%v] %t\n" :tag "No visible fringes (default)" nil) - (const :format "[%v] %t\n" :tag "Subtle grayscale background" subtle) - (const :format "[%v] %t\n" :tag "Intense grayscale background" intense)) + (const :format "[%v] %t\n" :tag "No visible fringes" nil) + (const :format "[%v] %t\n" :tag "Subtle gray background" subtle) + (const :format "[%v] %t\n" :tag "Intense gray background" intense)) :set #'modus-themes--set-option :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Fringes")) @@ -2212,13 +2191,16 @@ interest of optimizing for such a use-case." :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Diffs")) -(defcustom modus-themes-completions nil +(defcustom modus-themes-completions + '((selection . (intense)) + (popup . (intense))) "Control the style of completion user interfaces. This affects Company, Corfu, Flx, Helm, Icomplete/Fido, Ido, Ivy, -Mct, Orderless, Selectrum, Vertico. The value is an alist that -takes the form of a (key . properties) combination. Here is a -sample, followed by a description of the particularities: +Orderless, Selectrum, Vertico. The value is an alist that takes +the form of a (KEY . PROPERTIES) combination. KEY is a symbol, +while PROPERTIES is a list. Here is a sample, followed by a +description of the particularities: (setq modus-themes-completions (quote ((matches . (extrabold background intense)) @@ -2226,10 +2208,11 @@ sample, followed by a description of the particularities: (popup . (accented))))) The `matches' key refers to the highlighted characters that -correspond to the user's input. By default (nil or an empty -list), they have a bold weight and a colored foreground. The -list of properties may include any of the following symbols -regardless of the order they may appear in: +correspond to the user's input. When its properties are nil or +an empty list, matching characters in the user interface will +have a bold weight and a colored foreground. The list of +properties may include any of the following symbols regardless of +the order they may appear in: - `background' to add a background color; @@ -2246,10 +2229,10 @@ regardless of the order they may appear in: that bold will be used. The `selection' key applies to the current line or currently -matched candidate, depending on the specifics of the User -Interface. By default (nil or an empty list), it has a subtle -gray background, a bold weight, and the base foreground value -for the text. The list of properties it accepts is as +matched candidate, depending on the specifics of the user +interface. When its properties are nil or an empty list, it has +a subtle gray background, a bold weight, and the base foreground +value for the text. The list of properties it accepts is as follows (order is not significant): - `accented' to make the background colorful instead of gray; @@ -2268,7 +2251,11 @@ follows (order is not significant): variable `modus-themes-weights'. The absence of a weight means that bold will be used. -The `popup' key takes the same values as `selection'. +The `popup' key takes the same values as `selection'. The only +difference is that it applies specifically to user interfaces +that display an inline popup and thus have slightly different +styling requirements than the minibuffer. The two prominent +packages are `company' and `corfu'. Apart from specifying each key separately, a fallback list is accepted. This is only useful when the desired aesthetic is the @@ -2290,22 +2277,14 @@ the corresponding key is simply ignored (`matches' does not have `accented' and `text-also', while `selection' and `popup' do not have `background'). -A concise expression of those associations can be written as -follows, where the `car' is always the key and the `cdr' is the -list of properties (whatever order they may appear in): - - (setq modus-themes-completions - (quote ((matches extrabold background intense) - (selection semibold accented intense) - (popup accented)))) - Check the manual for tweaking `bold' and `italic' faces: Info node `(modus-themes) Configure bold and italic faces'. -Also refer to the Orderless documentation for its intersection -with Company (if you choose to use those in tandem)." +Also refer to the documentation of the `orderless' package for +its intersection with `company' (if you choose to use those in +tandem)." :group 'modus-themes - :package-version '(modus-themes . "2.3.0") + :package-version '(modus-themes . "3.0.0") :version "29.1" :type `(set (cons :tag "Matches" @@ -2420,11 +2399,11 @@ In user configuration files the form may look like this: :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Command prompts")) -(defcustom modus-themes-hl-line nil - "Control the current line highlight of HL-line mode. +(defcustom modus-themes-hl-line '(intense) + "Control the current line highlight of `hl-line-mode'. The value is a list of properties, each designated by a symbol. -The default (a nil value or an empty list) is a subtle gray +With a nil value, or an empty list, the style is a subtle gray background color. The property `accented' changes the background to a colored @@ -2450,11 +2429,12 @@ In user configuration files the form may look like this: (setq modus-themes-hl-line (quote (underline accented))) -Set `x-underline-at-descent-line' to a non-nil value for better -results with underlines." +Set `x-underline-at-descent-line' to a non-nil value so that the +placement of the underline coincides with the lower boundary of +the colored background." :group 'modus-themes - :package-version '(modus-themes . "1.5.0") - :version "28.1" + :package-version '(modus-themes . "3.0.0") + :version "29.1" :type '(set :tag "Properties" :greedy t (const :tag "Colored background" accented) (const :tag "Underline" underline) @@ -2522,8 +2502,6 @@ Also check the variables `org-hide-emphasis-markers', :initialize #'custom-initialize-default :link '(info-link "(modus-themes) Markup")) -(make-obsolete 'modus-themes-intense-markup 'modus-themes-markup "2.1.0") - (defcustom modus-themes-paren-match nil "Control the style of matching parentheses or delimiters. @@ -3225,11 +3203,6 @@ an alternative to the default value." "Get cdr of KEY in ALIST." (cdr (assoc key alist))) -(define-obsolete-variable-alias - 'modus-themes--heading-weights - 'modus-themes-weights - "2.1.0") - (defconst modus-themes-weights '( thin ultralight extralight light semilight regular medium semibold bold heavy extrabold ultrabold) @@ -3582,9 +3555,6 @@ foreground unspecified." (list deuteran) (list main))) -(make-obsolete 'modus-themes--completion 'modus-themes--completion-line "2.3.0") -(make-obsolete 'modus-themes--completion 'modus-themes--completion-match "2.3.0") - (defun modus-themes--completion-line (key bg fg bgintense fgintense &optional bgaccent bgaccentintense) "Styles for `modus-themes-completions'. KEY is the key of a cons cell. BG and FG are the main colors. @@ -4309,8 +4279,8 @@ by virtue of calling either of `modus-themes-load-operandi' and magenta-subtle-bg magenta-intense)))) `(modus-themes-completion-match-1 ((,class ,@(modus-themes--completion-match - 'matches bg-special-faint-cold cyan - cyan-subtle-bg cyan-intense)))) + 'matches bg-special-faint-cold blue + blue-subtle-bg blue-intense)))) `(modus-themes-completion-match-2 ((,class ,@(modus-themes--completion-match 'matches bg-special-faint-mild green @@ -4798,9 +4768,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(consult-line-number-prefix ((,class :foreground ,fg-unfocused))) `(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))) `(corfu-bar ((,class :background ,fg-alt))) @@ -4928,16 +4896,12 @@ by virtue of calling either of `modus-themes-load-operandi' and ;;;;; diff-hl `(diff-hl-change ((,class :inherit modus-themes-fringe-yellow))) `(diff-hl-delete ((,class :inherit modus-themes-fringe-red))) - `(diff-hl-dired-change ((,class :inherit diff-hl-change))) - `(diff-hl-dired-delete ((,class :inherit diff-hl-delete))) - `(diff-hl-dired-ignored ((,class :inherit dired-ignored))) - `(diff-hl-dired-insert ((,class :inherit diff-hl-insert))) - `(diff-hl-dired-unknown ((,class :inherit dired-ignored))) `(diff-hl-insert ((,class :inherit modus-themes-grue-background-active))) `(diff-hl-reverted-hunk-highlight ((,class :background ,fg-main :foreground ,bg-main))) ;;;;; diff-mode `(diff-added ((,class :inherit modus-themes-diff-added))) `(diff-changed ((,class :inherit modus-themes-diff-changed :extend t))) + `(diff-changed-unspecified ((,class :inherit diff-changed))) `(diff-context ((,class ,@(unless (eq modus-themes-diffs 'bg-only) (list :foreground fg-unfocused))))) `(diff-error ((,class :inherit modus-themes-intense-red))) `(diff-file-header ((,class :inherit (bold diff-header)))) @@ -5741,17 +5705,43 @@ by virtue of calling either of `modus-themes-load-operandi' and ;; HACK 2022-06-23: The :inverse-video prevents hl-line-mode from ;; overriding the background. Such an override really defeats the ;; purpose of setting those highlights. - `(hi-aquamarine ((,class :background ,bg-main :foreground ,cyan :inverse-video t))) + ;; + ;; NOTE 2022-10-04: We do not use the ,class here but instead + ;; hardcode color values. We have to do this as the themes lack + ;; entries in their palette for such an edge case. Defining those + ;; entries is not appropriate. + `(hi-aquamarine ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#227f9f" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#66cbdc" :inverse-video t))) `(hi-black-b ((,class :inverse-video t))) `(hi-black-hb ((,class :background ,bg-main :foreground ,fg-alt :inverse-video t))) - `(hi-blue ((,class :background ,bg-main :foreground ,blue-alt :inverse-video t))) + `(hi-blue ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#3366dd" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#aaccff" :inverse-video t))) `(hi-blue-b ((,class :inherit (bold hi-blue)))) - `(hi-green ((,class :background ,bg-main :foreground ,green :inverse-video t))) + `(hi-green ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#008a00" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#66dd66" :inverse-video t))) `(hi-green-b ((,class :inherit (bold hi-green)))) - `(hi-pink ((,class :background ,bg-main :foreground ,magenta :inverse-video t))) - `(hi-red-b ((,class :inherit bold :background ,bg-main :foreground ,red :inverse-video t))) - `(hi-salmon ((,class :background ,bg-main :foreground ,red-alt-faint :inverse-video t))) - `(hi-yellow ((,class :background ,bg-main :foreground ,yellow-alt :inverse-video t))) + `(hi-pink ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#bd30aa" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#ff88ee" :inverse-video t))) + `(hi-red-b ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#dd0000" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#f06666" :inverse-video t))) + `(hi-salmon ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#bf555a" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#e08a50" :inverse-video t))) + `(hi-yellow ((((class color) (min-colors 88) (background light)) + :background "white" :foreground "#af6400" :inverse-video t) + (((class color) (min-colors 88) (background dark)) + :background "black" :foreground "#faea00" :inverse-video t))) `(highlight ((,class ,@(if modus-themes-intense-mouseovers (list :background blue-intense-bg :foreground fg-main) (list :background cyan-subtle-bg :foreground fg-main))))) @@ -5800,6 +5790,8 @@ by virtue of calling either of `modus-themes-load-operandi' and `(iflipb-other-buffer-face ((,class :inherit shadow))) ;;;;; image-dired `(image-dired-thumb-flagged ((,class :background ,red-intense-bg))) + `(image-dired-thumb-header-file-name ((,class :inherit bold))) + `(image-dired-thumb-header-file-size ((,class :foreground ,blue-active))) `(image-dired-thumb-mark ((,class :inherit modus-themes-grue-background-intense))) ;;;;; imenu-list `(imenu-list-entry-face-0 ((,class :foreground ,cyan))) @@ -6485,6 +6477,8 @@ by virtue of calling either of `modus-themes-load-operandi' and `(nxml-prolog-keyword ((,class :inherit font-lock-keyword-face))) `(nxml-ref ((,class :inherit modus-themes-bold :foreground ,fg-special-mild))) `(rng-error ((,class :inherit error))) +;;;;; olivetti + `(olivetti-fringe ((,class :background ,bg-main))) ;;;;; orderless `(orderless-match-face-0 ((,class :inherit modus-themes-completion-match-0))) `(orderless-match-face-1 ((,class :inherit modus-themes-completion-match-1))) @@ -7109,17 +7103,13 @@ by virtue of calling either of `modus-themes-load-operandi' and ;;;;; table (built-in table.el) `(table-cell ((,class :background ,blue-nuanced-bg))) ;;;;; telega - ;; FIXME 2021-03-28: Some aspects of `telega' are not fully - ;; supported or have not been tested thoroughly. Please understand - ;; that I do not use that service because it requires a smartphone - ;; and I have none. Help with testing is appreciated. `(telega-button ((,class :box t :foreground ,blue))) `(telega-button-active ((,class :box ,blue-intense-bg :background ,blue-intense-bg :foreground ,fg-main))) `(telega-button-highlight ((,class :inherit modus-themes-subtle-magenta))) `(telega-chat-prompt ((,class :inherit bold))) - `(telega-entity-type-code ((,class :inherit modus-themes-fixed-pitch))) + `(telega-entity-type-code ((,class :inherit modus-themes-markup-verbatim))) `(telega-entity-type-mention ((,class :foreground ,cyan))) - `(telega-entity-type-pre ((,class :inherit modus-themes-fixed-pitch))) + `(telega-entity-type-pre ((,class :inherit modus-themes-markup-code))) `(telega-entity-type-spoiler ((,class :background ,fg-main :foreground ,fg-main))) `(telega-msg-heading ((,class :background ,bg-alt))) `(telega-msg-self-title ((,class :inherit bold))) @@ -7168,7 +7158,7 @@ by virtue of calling either of `modus-themes-load-operandi' and `(term-color-yellow ((,class :background ,yellow :foreground ,yellow))) `(term-underline ((,class :underline t))) ;;;;; textsec - `(textsec-suspicious ((,class :inherit modus-themes-refine-red))) + `(textsec-suspicious (())) ;;;;; tomatinho `(tomatinho-ok-face ((,class :foreground ,blue-intense))) `(tomatinho-pause-face ((,class :foreground ,yellow-intense))) diff --git a/etc/themes/modus-vivendi-theme.el b/etc/themes/modus-vivendi-theme.el index 02c2d9e129..aefef540a1 100644 --- a/etc/themes/modus-vivendi-theme.el +++ b/etc/themes/modus-vivendi-theme.el @@ -1,4 +1,4 @@ -;;; modus-vivendi-theme.el --- Elegant, highly legible and customizable light theme -*- lexical-binding:t -*- +;;; modus-vivendi-theme.el --- Elegant, highly legible and customizable dark theme -*- lexical-binding:t -*- ;; Copyright (C) 2019-2022 Free Software Foundation, Inc. @@ -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.7.1 +;; Version: 3.0.0 ;; Package-Requires: ((emacs "27.1")) ;; Keywords: faces, theme, accessibility @@ -71,6 +71,7 @@ which corresponds to a minimum contrast in relative luminance of (provide-theme 'modus-vivendi)) -;;;###theme-autoload (put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus)) +;;;###theme-autoload +(put 'modus-vivendi 'theme-properties '(:background-mode dark :kind color-scheme :family modus)) ;;; modus-vivendi-theme.el ends here commit 41d3d71a1e6709a7357c1c7aeae4f49cd65fb602 Author: Stefan Kangas Date: Thu Oct 27 23:04:37 2022 +0200 ; Fix typos in symbol names diff --git a/lisp/allout-widgets.el b/lisp/allout-widgets.el index 7a65777d32..4eab2c11c6 100644 --- a/lisp/allout-widgets.el +++ b/lisp/allout-widgets.el @@ -2177,7 +2177,7 @@ Operation is inhibited by `allout-inhibit-body-modification-handler'." ;; ?? Escapes removal (before changes) is not done when edits span multiple ;; items, recognizing that item structure is being preserved, including ;; escaping of item-prefix-like text within bodies. See -;; `allout-before-modification-handler' and +;; `allout-body-modification-handler' and ;; `allout-inhibit-body-modification-handler'. ;; ;; Adds the overlay to the `allout-unresolved-body-mod-workroster' during diff --git a/lisp/cedet/ede/locate.el b/lisp/cedet/ede/locate.el index dc465a79f2..3d89419364 100644 --- a/lisp/cedet/ede/locate.el +++ b/lisp/cedet/ede/locate.el @@ -315,7 +315,7 @@ that created this EDE locate object." () "EDE Locator using Cscope. Configure EDE's use of Cscope through the cedet-cscope.el -file name searching variable `cedet-cscope-file-command'.") +file name searching variable `cedet-cscope-command'.") (cl-defmethod initialize-instance ((loc ede-locate-cscope) &rest _slots) diff --git a/lisp/gnus/gnus-bookmark.el b/lisp/gnus/gnus-bookmark.el index 18732218c9..29d963984b 100644 --- a/lisp/gnus/gnus-bookmark.el +++ b/lisp/gnus/gnus-bookmark.el @@ -65,7 +65,7 @@ ;; http://thread.gmane.org/v9fxx9fkm4.fsf@marauder.physik.uni-ulm.de ;; FIXME: Check if `gnus-bookmark.el' should use -;; `bookmark-make-cell-function'. +;; `bookmark-make-record-function'. ;; Cf. http://article.gmane.org/gmane.emacs.gnus.general/66076 (defgroup gnus-bookmark nil diff --git a/test/lisp/autorevert-tests.el b/test/lisp/autorevert-tests.el index 4bbff6d057..568820ec42 100644 --- a/test/lisp/autorevert-tests.el +++ b/test/lisp/autorevert-tests.el @@ -507,7 +507,7 @@ This expects `auto-revert--messages' to be bound by (should (equal (auto-revert-test--buffer-string buf-1) "1-a")) (auto-revert-test--write-file "1-b" file-1) ;; Since the file is deleted, it needs at least - ;; `autorevert-interval' to recognize the new file, + ;; `auto-revert-interval' to recognize the new file, ;; while polling. So increase the timeout. (auto-revert-test--wait-for-buffer-text buf-1 "1-b" (* 2 (auto-revert--timeout))) commit c6ec08e49af84ac35d0f793d01390a8b8c991f18 Author: Wamm K. D Date: Wed Aug 3 19:05:08 2022 -0500 Allow Hierarchy to delay computation of children This adds an option to allow callers to specify that computing the children of the hierarchy should be delayed to when the user calls for them, by utilizing the tree-widget :expander property. * lisp/emacs-lisp/hierarchy.el (hierarchy-add-tree) (hierarchy-add-trees): Add parameter 'delay-children-p'. * lisp/emacs-lisp/hierarchy.el (hierarchy--create-delayed-tree-widget): Add function. * lisp/emacs-lisp/hierarchy.el (hierarchy-convert-to-tree-widget): Utilize ':expander' if delaying children. (Bug#55900) * test/lisp/emacs-lisp/hierarchy-tests.el: Add tests for delayed-children functionality. diff --git a/etc/NEWS b/etc/NEWS index 530532fa07..bf50c900ea 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2664,6 +2664,14 @@ commands with a warning face as you type. *** New user option 'calc-kill-line-numbering'. Set it to nil to exclude line numbering from kills and copies. +** Hierarchy + ++++ +*** Tree Display can delay computation of children. +'hierarchy-add-tree' and 'hierarchy-add-trees' have an optional +argument which allows tree-widget display to be activated and computed +only when the user expands the node. + ** Miscellaneous --- diff --git a/lisp/emacs-lisp/hierarchy.el b/lisp/emacs-lisp/hierarchy.el index 6c95d86b47..4cb5ba64a8 100644 --- a/lisp/emacs-lisp/hierarchy.el +++ b/lisp/emacs-lisp/hierarchy.el @@ -71,7 +71,8 @@ (:conc-name hierarchy--)) (roots (list)) ; list of the hierarchy roots (no parent) (parents (make-hash-table :test 'equal)) ; map an item to its parent - (children (make-hash-table :test 'equal)) ; map an item to its childre + (children (make-hash-table :test 'equal)) ; map an item to its children + (delaying-parents (make-hash-table :test 'equal)) ; map an item to its childrenfn ;; cache containing the set of all items in the hierarchy (seen-items (make-hash-table :test 'equal))) ; map an item to t @@ -133,7 +134,8 @@ keys are :key and :test." "Create a hierarchy and return it." (hierarchy--make)) -(defun hierarchy-add-tree (hierarchy item parentfn &optional childrenfn acceptfn) +(defun hierarchy-add-tree (hierarchy item parentfn + &optional childrenfn acceptfn delay-children-p) "In HIERARCHY, add ITEM. PARENTFN is either nil or a function defining the child-to-parent @@ -151,27 +153,39 @@ CHILDRENFN are expected to be coherent with each other. ACCEPTFN is a function returning non-nil if its parameter (any object) should be an item of the hierarchy. By default, ACCEPTFN returns non-nil -if its parameter is non-nil." +if its parameter is non-nil. + +DELAY-CHILDREN-P is a predicate determining whether the children that would +normally be processed by CHILDRENFN should, instead, have their processing be +delayed and stored to be processed by CHILDRENFN when the child is selected +during use of the hierarchy." (unless (hierarchy-has-item hierarchy item) (let ((acceptfn (or acceptfn #'identity))) (hierarchy--seen-items-add hierarchy item) (let ((parent (and parentfn (funcall parentfn item)))) (when (funcall acceptfn parent) (hierarchy--add-relation hierarchy item parent acceptfn) - (hierarchy-add-tree hierarchy parent parentfn childrenfn))) - (let ((children (and childrenfn (funcall childrenfn item)))) - (mapc (lambda (child) - (when (funcall acceptfn child) - (hierarchy--add-relation hierarchy child item acceptfn) - (hierarchy-add-tree hierarchy child parentfn childrenfn))) - children))))) - -(defun hierarchy-add-trees (hierarchy items parentfn &optional childrenfn acceptfn) + (hierarchy-add-tree hierarchy parent + parentfn (if delay-children-p nil childrenfn)))) + (if (and childrenfn delay-children-p) + (map-put! (hierarchy--delaying-parents hierarchy) item childrenfn) + (let ((children (and childrenfn (funcall childrenfn item)))) + (map-put! (hierarchy--delaying-parents hierarchy) item nil) + (mapc (lambda (child) + (when (funcall acceptfn child) + (hierarchy--add-relation hierarchy child item acceptfn) + (hierarchy-add-tree hierarchy child parentfn childrenfn))) + children)))))) + +(defun hierarchy-add-trees (hierarchy items parentfn + &optional childrenfn acceptfn delay-children-p) "Call `hierarchy-add-tree' on HIERARCHY and each element of ITEMS. -PARENTFN, CHILDRENFN and ACCEPTFN have the same meaning as in `hierarchy-add'." +PARENTFN, CHILDRENFN, ACCEPTFN, and DELAY-CHILDREN-P have the same meaning as in +`hierarchy-add'." (seq-map (lambda (item) - (hierarchy-add-tree hierarchy item parentfn childrenfn acceptfn)) + (hierarchy-add-tree hierarchy item parentfn + childrenfn acceptfn delay-children-p)) items)) (defun hierarchy-add-list (hierarchy list &optional wrap childrenfn) @@ -541,6 +555,30 @@ nil. The buffer is returned." buffer)) (declare-function widget-convert "wid-edit") +(defun hierarchy--create-delayed-tree-widget (elem labelfn indent childrenfn) + "Return a list of tree-widgets for the children generated. + +ELEM is the element of the hierarchy passed from +`hierarchy-convert-to-tree-widget'; it and the CHILDRENFN are used to generate +the children of the element dynamically. + +LABELFN is the same function passed to `hierarchy-convert-to-tree-widget'. + +INDENT is the same function passed to `hierarchy-convert-to-tree-widget'. + +CHILDRENFN is the function used to discover the children of ELEM." + (lambda (widget) + (mapcar + (lambda (item) + (widget-convert + 'tree-widget + :tag (hierarchy-labelfn-to-string labelfn item indent) + :expander (hierarchy--create-delayed-tree-widget + item + labelfn + (1+ indent) + childrenfn))) + (funcall childrenfn elem)))) (defun hierarchy-convert-to-tree-widget (hierarchy labelfn) "Return a tree-widget for HIERARCHY. @@ -550,10 +588,21 @@ node label." (require 'wid-edit) (require 'tree-widget) (hierarchy-map-tree (lambda (item indent children) - (widget-convert - 'tree-widget - :tag (hierarchy-labelfn-to-string labelfn item indent) - :args children)) + (let ((childrenfn (map-elt + (hierarchy--delaying-parents hierarchy) + item))) + (apply + #'widget-convert + (list 'tree-widget + :tag (hierarchy-labelfn-to-string labelfn item indent) + (if childrenfn :expander :args) + (if childrenfn + (hierarchy--create-delayed-tree-widget + item + labelfn + (1+ indent) + childrenfn) + children))))) hierarchy)) (defun hierarchy-tree-display (hierarchy labelfn &optional buffer) diff --git a/test/lisp/emacs-lisp/hierarchy-tests.el b/test/lisp/emacs-lisp/hierarchy-tests.el index 41d3f2f3cc..d83460a2ba 100644 --- a/test/lisp/emacs-lisp/hierarchy-tests.el +++ b/test/lisp/emacs-lisp/hierarchy-tests.el @@ -552,5 +552,148 @@ (hierarchy-sort organisms) (should (equal (hierarchy-roots organisms) '(animal plant))))) +(defun hierarchy-examples-delayed--find-number (num) + "Find a number, NUM, by adding 1s together until you reach it. +This is entire contrived and mostly meant to be purposefully inefficient to +not be possible on a large scale. +Running the number 200 causes this function to crash; running this function in +`hierarchy-add-tree' with a root of 80 and no delayed children causes that to + crash. +If generating hierarchy children is not delayed, tests for that functionality +should fail as this function will crash." + + (funcall (lambda (funct) (funcall funct 1 funct)) + (lambda (n funct) + (if (< n num) + (+ 1 (funcall funct (+ 1 n) funct)) + 1)))) + +(defun hierarchy-examples-delayed--childrenfn (hier-elem) + "Return the children of HIER-ELEM. +Basially, feed the number, minus 1, to `hierarchy-examples-delayed--find-number' +and then create a list of the number plus 0.0–0.9." + + (when (> hier-elem 1) + (let ((next (hierarchy-examples-delayed--find-number (1- hier-elem)))) + (mapcar (lambda (dec) (+ next dec)) '(.0 .1 .2 .3 .4 .5 .6 .7 .8 .9))))) + +(ert-deftest hierarchy-delayed-add-one-root () + (let ((parentfn (lambda (_) nil)) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(190))))) + +(ert-deftest hierarchy-delayed-add-one-item-with-parent () + (let ((parentfn (lambda (item) + (cl-case item + (190 191)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(191))) + (should (equal (hierarchy-children hierarchy 191) '(190))) + (should (equal (hierarchy-children hierarchy 190) '())))) + +(ert-deftest hierarchy-delayed-add-one-item-with-parent-and-grand-parent () + (let ((parentfn (lambda (item) + (cl-case item + (190 191) + (191 192)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(192))) + (should (equal (hierarchy-children hierarchy 192) '(191))) + (should (equal (hierarchy-children hierarchy 191) '(190))) + (should (equal (hierarchy-children hierarchy 190) '())))) + +(ert-deftest hierarchy-delayed-add-same-root-twice () + (let ((parentfn (lambda (_) nil)) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(190))))) + +(ert-deftest hierarchy-delayed-add-same-child-twice () + (let ((parentfn (lambda (item) + (cl-case item + (190 191)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(191))) + (should (equal (hierarchy-children hierarchy 191) '(190))) + (should (equal (hierarchy-children hierarchy 190) '())))) + +(ert-deftest hierarchy-delayed-add-item-and-its-parent () + (let ((parentfn (lambda (item) + (cl-case item + (190 191)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (hierarchy-add-tree hierarchy 191 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(191))) + (should (equal (hierarchy-children hierarchy 191) '(190))) + (should (equal (hierarchy-children hierarchy 190) '())))) + +(ert-deftest hierarchy-delayed-add-item-and-its-child () + (let ((parentfn (lambda (item) + (cl-case item + (190 191)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 191 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(191))) + (should (equal (hierarchy-children hierarchy 191) '(190))) + (should (equal (hierarchy-children hierarchy 190) '())))) + +(ert-deftest hierarchy-delayed-add-two-items-sharing-parent () + (let ((parentfn (lambda (item) + (cl-case item + (190 191) + (190.5 191)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (hierarchy-add-tree hierarchy 190.5 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(191))) + (should (equal (hierarchy-children hierarchy 191) '(190 190.5))))) + +(ert-deftest hierarchy-delayed-add-two-hierarchies () + (let ((parentfn (lambda (item) + (cl-case item + (190 191) + (circle 'shape)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-tree hierarchy 190 parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (hierarchy-add-tree hierarchy 'circle parentfn) + (should (equal (hierarchy-roots hierarchy) '(191 shape))) + (should (equal (hierarchy-children hierarchy 191) '(190))) + (should (equal (hierarchy-children hierarchy 'shape) '(circle))))) + +(ert-deftest hierarchy-delayed-add-trees () + (let ((parentfn (lambda (item) + (cl-case item + (190 '191) + (190.5 '191) + (191 '192)))) + (hierarchy (hierarchy-new))) + (hierarchy-add-trees hierarchy '(191 190.5) parentfn + #'hierarchy-examples-delayed--childrenfn nil t) + (should (equal (hierarchy-roots hierarchy) '(192))) + (should (equal (hierarchy-children hierarchy '192) '(191))) + (should (equal (hierarchy-children hierarchy '191) '(190 190.5))))) + (provide 'hierarchy-tests) ;;; hierarchy-tests.el ends here commit d53febbd214bb238c9d0cb2df0d1b9cd20a59103 Author: Eli Zaretskii Date: Thu Oct 27 19:57:33 2022 +0300 ; * lisp/subr.el (keyboard-translate): Doc fix. (Bug#58805) diff --git a/lisp/subr.el b/lisp/subr.el index 7dfe0ac66c..83e2e75c41 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -1217,7 +1217,7 @@ Subkeymaps may be modified but are not canonicalized." (defun keyboard-translate (from to) "Translate character FROM to TO on the current terminal. -This is a legacy function; see `keymap-translate' for the +This is a legacy function; see `key-translate' for the recommended function to use instead. This function creates a `keyboard-translate-table' if necessary commit 7ac3d91eb2a7e9454087f17e1fadba350a86a208 Author: kobarity Date: Sat Oct 22 21:36:15 2022 +0900 Disable completion/ElDoc/FFAP when Python program is running * lisp/progmodes/python.el (python-completion-at-point) (python-ffap-module-path, python-eldoc--get-doc-at-point): Add check using `python-util-comint-end-of-output-p'. (python-util-comint-end-of-output-p): New function. * test/lisp/progmodes/python-tests.el (python-tests-shell-wait-for-prompt): Use `python-util-comint-end-of-output-p'. (python-completion-at-point-while-running-1) (python-ffap-module-path-1) (python-ffap-module-path-while-running-1) (python-eldoc--get-doc-at-point-1) (python-eldoc--get-doc-at-point-while-running-1): New tests. (Bug#58713) diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el index 1119589423..cec0d54a44 100644 --- a/lisp/progmodes/python.el +++ b/lisp/progmodes/python.el @@ -4375,7 +4375,9 @@ For this to work as best as possible you should call `python-shell-send-buffer' from time to time so context in inferior Python process is updated properly." (let ((process (python-shell-get-process))) - (when process + (when (and process + (python-shell-with-shell-buffer + (python-util-comint-end-of-output-p))) (python-shell-completion-at-point process)))) (define-obsolete-function-alias @@ -4800,6 +4802,8 @@ def __FFAP_get_module_path(objstr): (defun python-ffap-module-path (module) "Function for `ffap-alist' to return path for MODULE." (when-let ((process (python-shell-get-process)) + (ready (python-shell-with-shell-buffer + (python-util-comint-end-of-output-p))) (module-file (python-shell-send-string-no-output (format "%s\nprint(__FFAP_get_module_path(%s))" @@ -4918,7 +4922,9 @@ If not FORCE-INPUT is passed then what `python-eldoc--get-symbol-at-point' returns will be used. If not FORCE-PROCESS is passed what `python-shell-get-process' returns is used." (let ((process (or force-process (python-shell-get-process)))) - (when process + (when (and process + (python-shell-with-shell-buffer + (python-util-comint-end-of-output-p))) (let* ((input (or force-input (python-eldoc--get-symbol-at-point))) (docstring @@ -5664,6 +5670,13 @@ This is for compatibility with Emacs < 24.4." comint-last-prompt) (t nil))) +(defun python-util-comint-end-of-output-p () + "Return non-nil if the last prompt matches input prompt." + (when-let ((prompt (python-util-comint-last-prompt))) + (python-shell-comint-end-of-output-p + (buffer-substring-no-properties + (car prompt) (cdr prompt))))) + (defun python-util-forward-comment (&optional direction) "Python mode specific version of `forward-comment'. Optional argument DIRECTION defines the direction to move to." diff --git a/test/lisp/progmodes/python-tests.el b/test/lisp/progmodes/python-tests.el index 81c9217c62..8330525394 100644 --- a/test/lisp/progmodes/python-tests.el +++ b/test/lisp/progmodes/python-tests.el @@ -46,10 +46,7 @@ always located at the beginning of buffer." (defun python-tests-shell-wait-for-prompt () "Wait for the prompt in the shell buffer." (python-shell-with-shell-buffer - (while (not (if-let ((prompt (python-util-comint-last-prompt))) - (python-shell-comint-end-of-output-p - (buffer-substring-no-properties - (car prompt) (cdr prompt))))) + (while (not (python-util-comint-end-of-output-p)) (sit-for 0.1)))) (defmacro python-tests-with-temp-buffer-with-shell (contents &rest body) @@ -4478,6 +4475,21 @@ print('Hello') (insert "u") (should-not (nth 2 (python-completion-at-point)))))) +(ert-deftest python-completion-at-point-while-running-1 () + "Should not try to complete when a program is running in the Shell buffer." + (skip-unless (executable-find python-tests-shell-interpreter)) + (python-tests-with-temp-buffer-with-shell + " +import time + +time.sleep(3) +" + (let ((inhibit-message t)) + (python-shell-send-buffer) + (goto-char (point-max)) + (insert "time.") + (should-not (with-timeout (1 t) (completion-at-point)))))) + (ert-deftest python-completion-at-point-native-1 () (skip-unless (executable-find python-tests-shell-interpreter)) (python-tests-with-temp-buffer-with-shell @@ -4552,6 +4564,31 @@ import abc ;;; FFAP +(ert-deftest python-ffap-module-path-1 () + (skip-unless (executable-find python-tests-shell-interpreter)) + (python-tests-with-temp-buffer-with-shell + " +import abc +" + (let ((inhibit-message t)) + (python-shell-send-buffer) + (python-tests-shell-wait-for-prompt) + (should (file-exists-p (python-ffap-module-path "abc")))))) + +(ert-deftest python-ffap-module-path-while-running-1 () + "Should not get module path when a program is running in the Shell buffer." + (skip-unless (executable-find python-tests-shell-interpreter)) + (python-tests-with-temp-buffer-with-shell + " +import abc +import time + +time.sleep(3) +" + (let ((inhibit-message t)) + (python-shell-send-buffer) + (should-not (with-timeout (1 t) (python-ffap-module-path "abc")))))) + ;;; Code check @@ -4615,6 +4652,32 @@ some_symbol some_other_symbol (should (string= (python-eldoc--get-symbol-at-point) "some_symbol")))) +(ert-deftest python-eldoc--get-doc-at-point-1 () + (skip-unless (executable-find python-tests-shell-interpreter)) + (python-tests-with-temp-buffer-with-shell + " +import time +" + (let ((inhibit-message t)) + (python-shell-send-buffer) + (python-tests-shell-wait-for-prompt) + (python-tests-look-at "time") + (should (python-eldoc--get-doc-at-point))))) + +(ert-deftest python-eldoc--get-doc-at-point-while-running-1 () + "Should not get documentation when a program is running in the Shell buffer." + (skip-unless (executable-find python-tests-shell-interpreter)) + (python-tests-with-temp-buffer-with-shell + " +import time + +time.sleep(3) +" + (let ((inhibit-message t)) + (python-shell-send-buffer) + (python-tests-look-at "time") + (should-not (with-timeout (1 t) (python-eldoc--get-doc-at-point)))))) + ;;; Imenu commit d820c39bd18e493ba716ad3ceb8101c1dee3a02b Author: Eli Zaretskii Date: Thu Oct 27 18:45:28 2022 +0300 ; (rmail-summary-apply-filters-consecutively): Add :version. diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 1ed3664506..0144a34e5e 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -56,6 +56,7 @@ When this variable is non-nil, `rmail-summary-by-*' commands work on the current summary, and so their filtering can be stacked one on top of another. This allows gradual narrowing of the selection of the messages." :type 'boolean + :version "29.1" :group 'rmail-summary) (defvar rmail-summary-currently-displayed-msgs nil commit 8728da58ab319cbffc160b49c716b65429c8d5a6 Author: Andrea Monaco Date: Thu Oct 27 17:25:16 2022 +0300 Allow applying Rmail summary filters consecutively * lisp/mail/rmailsum.el (rmail-summary-currently-displayed-msgs): New variable. (rmail-summary-apply-filters-consecutively): New user option. (rmail-summary-fill-displayed-messages, rmail-summary-negate): New functions. (rmail-summary-by-labels, rmail-summary-by-recipients) (rmail-summary-by-regexp, rmail-summary-by-topic) (rmail-summary-by-senders): Obey 'rmail-summary-apply-filters-consecutively'. KEEP-FILTERING, to narrow the existing filtered summary. * etc/NEWS: Announce the change. diff --git a/etc/NEWS b/etc/NEWS index cbbf90fde6..530532fa07 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2051,6 +2051,18 @@ Formerly it was a pair of numbers '(A B)' that represented 65536*A + B, to cater to older Emacs implementations that lacked bignums. The older form still works but is undocumented. +** Rmail + +--- +*** Rmail partial summaries can now be applied one on top of the other. +You can now narrow the filtering of messages by the summary's criteria +(recipients, topic, senders, etc.) by making a summary of the already +summarized messages. For example, invoking 'rmail-summary-by-senders', +followed by 'rmail-summary-by-topic' will produce a summary where both +the senders and the topic are according to your selection. The new +user option 'rmail-summary-apply-filters-consecutively' controls +whether the stacking of the filters is in effect. + ** EIEIO +++ diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index b959f45250..1ed3664506 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -50,6 +50,22 @@ Setting this option to nil might speed up the generation of summaries." :type 'boolean :group 'rmail-summary) +(defcustom rmail-summary-apply-filters-consecutively nil + "If non-nil, Rmail summary commands apply filtering on top existing filtering. +When this variable is non-nil, `rmail-summary-by-*' commands work on the +current summary, and so their filtering can be stacked one on top of another. +This allows gradual narrowing of the selection of the messages." + :type 'boolean + :group 'rmail-summary) + +(defvar rmail-summary-currently-displayed-msgs nil + "String made of `y' and `n'. +The character at position i tells wether message i is shown in the +summary or not. First character is ignored. +Used when applying `rmail-summary-by-*' commands consecutively. Filled +by `rmail-summary-fill-displayed-messages'.") +(put 'rmail-summary-currently-displayed-msgs 'permanent-local t) + (defvar rmail-summary-font-lock-keywords '(("^ *[0-9]+D.*" . font-lock-string-face) ; Deleted. ("^ *[0-9]+-.*" . font-lock-type-face) ; Unread. @@ -267,6 +283,34 @@ Setting this option to nil might speed up the generation of summaries." (defun rmail-update-summary (&rest _) (apply (car rmail-summary-redo) (cdr rmail-summary-redo))) +(defun rmail-summary-fill-displayed-messages () + "Fill the rmail-summary-currently-displayed-msgs string." + (with-current-buffer rmail-buffer + (with-current-buffer rmail-summary-buffer + (setq rmail-summary-currently-displayed-msgs + (make-string (1+ rmail-total-messages) ?n)) + (goto-char (point-min)) + (while (not (eobp)) + (aset rmail-summary-currently-displayed-msgs + (string-to-number (thing-at-point 'line)) + ?y) + (forward-line 1))))) + +(defun rmail-summary-negate () + "Toggle display of messages that match the summary and those which do not." + (interactive) + (rmail-summary-fill-displayed-messages) + (rmail-new-summary "Negate" + '(rmail-summary-by-regexp ".*") + (lambda (msg) + (if + (= (aref rmail-summary-currently-displayed-msgs msg) + ?n) + (progn + (aset rmail-summary-currently-displayed-msgs msg ?y) t) + (progn + (aset rmail-summary-currently-displayed-msgs msg ?n) nil))))) + ;;;###autoload (defun rmail-summary () "Display a summary of all messages, one line per message." @@ -282,9 +326,16 @@ LABELS should be a string containing the desired labels, separated by commas." (setq labels (or rmail-last-multi-labels (error "No label specified")))) (setq rmail-last-multi-labels labels) + (if rmail-summary-apply-filters-consecutively + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "labels " labels) (list 'rmail-summary-by-labels labels) - 'rmail-message-labels-p + (if rmail-summary-apply-filters-consecutively + (lambda (msg l) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-labels-p msg l))) + 'rmail-message-labels-p) (concat " \\(" (mail-comma-list-regexp labels) "\\)\\(,\\|\\'\\)"))) @@ -297,10 +348,18 @@ but if PRIMARY-ONLY is non-nil (prefix arg given), only look in the To and From fields. RECIPIENTS is a regular expression." (interactive "sRecipients to summarize by: \nP") + (if rmail-summary-apply-filters-consecutively + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "recipients " recipients) (list 'rmail-summary-by-recipients recipients primary-only) - 'rmail-message-recipients-p recipients primary-only)) + (if rmail-summary-apply-filters-consecutively + (lambda (msg r &optional po) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-recipients-p msg r po))) + 'rmail-message-recipients-p) + recipients primary-only)) (defun rmail-message-recipients-p (msg recipients &optional primary-only) (rmail-apply-in-message msg 'rmail-message-recipients-p-1 @@ -328,9 +387,16 @@ Emacs will list the message in the summary." (setq regexp (or rmail-last-regexp (error "No regexp specified")))) (setq rmail-last-regexp regexp) + (if rmail-summary-apply-filters-consecutively + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "regexp " regexp) (list 'rmail-summary-by-regexp regexp) - 'rmail-message-regexp-p + (if rmail-summary-apply-filters-consecutively + (lambda (msg r) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-regexp-p msg r))) + 'rmail-message-regexp-p) regexp)) (defun rmail-message-regexp-p (msg regexp) @@ -365,7 +431,7 @@ Emacs will list the message in the summary." ;;;###autoload (defun rmail-summary-by-topic (subject &optional whole-message) "Display a summary of all messages with the given SUBJECT. -Normally checks just the Subject field of headers; but with prefix +Normally checks just the Subject field of headers; but when prefix argument WHOLE-MESSAGE is non-nil, looks in the whole message. SUBJECT is a regular expression." (interactive @@ -376,10 +442,18 @@ SUBJECT is a regular expression." (if subject ", default current subject" "") "): "))) (list (read-string prompt nil nil subject) current-prefix-arg))) + (if rmail-summary-apply-filters-consecutively + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "about " subject) (list 'rmail-summary-by-topic subject whole-message) - 'rmail-message-subject-p subject whole-message)) + (if rmail-summary-apply-filters-consecutively + (lambda (msg s &optional wm) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-subject-p msg s wm))) + 'rmail-message-subject-p) + subject whole-message)) (defun rmail-message-subject-p (msg subject &optional whole-message) (if whole-message @@ -402,9 +476,18 @@ sender of the current message." (if sender ", default this message's sender" "") "): "))) (list (read-string prompt nil nil sender)))) + (if rmail-summary-apply-filters-consecutively + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "senders " senders) - (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders)) + (list 'rmail-summary-by-senders senders) + (if rmail-summary-apply-filters-consecutively + (lambda (msg s) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-senders-p msg s))) + 'rmail-message-senders-p) + senders)) (defun rmail-message-senders-p (msg senders) (string-match senders (or (rmail-get-header "From" msg) ""))) commit 582eaadde7d1cdbea4f8c813d6932a9caec482c7 Author: Eli Zaretskii Date: Thu Oct 27 17:15:51 2022 +0300 Revert "Allow applying filters to summary consecutively" This reverts commit c8b9ba5fa1bf3a20b9b08a553ad088ca33f3d1ba. diff --git a/etc/NEWS b/etc/NEWS index 21907c7ffb..cbbf90fde6 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2051,18 +2051,6 @@ Formerly it was a pair of numbers '(A B)' that represented 65536*A + B, to cater to older Emacs implementations that lacked bignums. The older form still works but is undocumented. -** Rmail - ---- -*** Rmail partial summaries can now be applied one on top of the other. -You can now narrow the filtering of messages by the summary's criteria -(recipients, topic, senders, etc.) by making a summary of the already -summarized messages. For example, invoking 'rmail-summary-by-senders', -followed by 'rmail-summary-by-topic' will produce a summary where both -the senders and the topic are according to your selection. Most Rmail -summary commands can be told to filter the existing summary by -invoking them with the prefix argument. - ** EIEIO +++ diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index 4e5b3d0904..b959f45250 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -50,13 +50,6 @@ Setting this option to nil might speed up the generation of summaries." :type 'boolean :group 'rmail-summary) -(defvar rmail-summary-currently-displayed-msgs nil - "String made of `y' and `n'. -At position i it tells wether message i is shown on the summary or not. -First character is ignored. Used when applying rmail-summary-by-* commands -consecutively.") -(put 'rmail-summary-currently-displayed-msgs 'permanent-local t) - (defvar rmail-summary-font-lock-keywords '(("^ *[0-9]+D.*" . font-lock-string-face) ; Deleted. ("^ *[0-9]+-.*" . font-lock-type-face) ; Unread. @@ -274,34 +267,6 @@ consecutively.") (defun rmail-update-summary (&rest _) (apply (car rmail-summary-redo) (cdr rmail-summary-redo))) -(defun rmail-summary-fill-displayed-messages () - "Fill the `rmail-summary-currently-displayed-msgs' string." - (with-current-buffer rmail-buffer - (with-current-buffer rmail-summary-buffer - (setq rmail-summary-currently-displayed-msgs - (make-string (1+ rmail-total-messages) ?n)) - (goto-char (point-min)) - (while (not (eobp)) - (aset rmail-summary-currently-displayed-msgs - (string-to-number (thing-at-point 'line)) - ?y) - (forward-line 1))))) - -(defun rmail-summary-negate () - "Toggle showing messages that match/don't match the current summary." - (interactive) - (rmail-summary-fill-displayed-messages) - (rmail-new-summary "Negate" - '(rmail-summary-by-regexp ".*" t) - (lambda (msg) - (if - (= (aref rmail-summary-currently-displayed-msgs msg) - ?n) - (progn - (aset rmail-summary-currently-displayed-msgs msg ?y) t) - (progn - (aset rmail-summary-currently-displayed-msgs msg ?n) nil))))) - ;;;###autoload (defun rmail-summary () "Display a summary of all messages, one line per message." @@ -309,52 +274,33 @@ consecutively.") (rmail-new-summary "All" '(rmail-summary) nil)) ;;;###autoload -(defun rmail-summary-by-labels (labels &optional keep-filtering) +(defun rmail-summary-by-labels (labels) "Display a summary of all messages with one or more LABELS. -LABELS should be a string containing the desired labels, separated by commas. -If KEEP-FILTERING is non-nil (interactively, the prefix argument), operate -on the current summary instead of all mail messages." - (interactive "sLabels to summarize by: \nP") +LABELS should be a string containing the desired labels, separated by commas." + (interactive "sLabels to summarize by: ") (if (string= labels "") (setq labels (or rmail-last-multi-labels (error "No label specified")))) (setq rmail-last-multi-labels labels) - (if keep-filtering - (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "labels " labels) - (list 'rmail-summary-by-labels labels keep-filtering) - (if keep-filtering - (lambda (msg l) - (and (= (aref rmail-summary-currently-displayed-msgs msg) - ?y) - (rmail-message-labels-p msg l))) - 'rmail-message-labels-p) + (list 'rmail-summary-by-labels labels) + 'rmail-message-labels-p (concat " \\(" (mail-comma-list-regexp labels) "\\)\\(,\\|\\'\\)"))) ;;;###autoload -(defun rmail-summary-by-recipients (recipients &optional primary-only keep-filtering) +(defun rmail-summary-by-recipients (recipients &optional primary-only) "Display a summary of all messages with the given RECIPIENTS. Normally checks the To, From and Cc fields of headers; but if PRIMARY-ONLY is non-nil (prefix arg given), only look in the To and From fields. -RECIPIENTS is a regular expression. -If KEEP-FILTERING is non-nil, operate on the current summary -instead of all mail messages." +RECIPIENTS is a regular expression." (interactive "sRecipients to summarize by: \nP") - (if keep-filtering - (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "recipients " recipients) - (list 'rmail-summary-by-recipients recipients primary-only keep-filtering) - (if keep-filtering - (lambda (msg r) - (and (= (aref rmail-summary-currently-displayed-msgs msg) - ?y) - (rmail-message-recipients-p msg r))) - 'rmail-message-recipients-p) - recipients primary-only)) + (list 'rmail-summary-by-recipients recipients primary-only) + 'rmail-message-recipients-p recipients primary-only)) (defun rmail-message-recipients-p (msg recipients &optional primary-only) (rmail-apply-in-message msg 'rmail-message-recipients-p-1 @@ -372,28 +318,19 @@ instead of all mail messages." ;; Also, the optional WHOLE-MESSAGE argument of r-s-by-topic would ;; seem more natural here. ;;;###autoload -(defun rmail-summary-by-regexp (regexp &optional keep-filtering) +(defun rmail-summary-by-regexp (regexp) "Display a summary of all messages according to regexp REGEXP. If the regular expression is found in the header of the message \(including in the date and other lines, as well as the subject line), -Emacs will list the message in the summary. -If KEEP-FILTERING is non-nil (interactively, the prefix argument), operate -on the current summary instead of all mail messages." - (interactive "sRegexp to summarize by: \nP") +Emacs will list the message in the summary." + (interactive "sRegexp to summarize by: ") (if (string= regexp "") (setq regexp (or rmail-last-regexp (error "No regexp specified")))) (setq rmail-last-regexp regexp) - (if keep-filtering - (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "regexp " regexp) - (list 'rmail-summary-by-regexp regexp keep-filtering) - (if keep-filtering - (lambda (msg r) - (and (= (aref rmail-summary-currently-displayed-msgs msg) - ?y) - (rmail-message-regexp-p msg r))) - 'rmail-message-regexp-p) + (list 'rmail-summary-by-regexp regexp) + 'rmail-message-regexp-p regexp)) (defun rmail-message-regexp-p (msg regexp) @@ -426,14 +363,11 @@ on the current summary instead of all mail messages." (rmail--decode-and-apply 're-search-forward regexp nil t))) ;;;###autoload -(defun rmail-summary-by-topic (subject &optional whole-message keep-filtering) +(defun rmail-summary-by-topic (subject &optional whole-message) "Display a summary of all messages with the given SUBJECT. -Normally checks just the Subject field of headers; but when -WHOLE-MESSAGE is non-nil (interactively, prefix argument), -looks in the whole message. -SUBJECT is a regular expression. -If KEEP-FILTERING is non-nil, operate on the current summary instead -of all mail messages." +Normally checks just the Subject field of headers; but with prefix +argument WHOLE-MESSAGE is non-nil, looks in the whole message. +SUBJECT is a regular expression." (interactive ;; We quote the default subject, because if it contains regexp ;; special characters (eg "?"), it can fail to match itself. (Bug#2333) @@ -442,18 +376,10 @@ of all mail messages." (if subject ", default current subject" "") "): "))) (list (read-string prompt nil nil subject) current-prefix-arg))) - (if keep-filtering - (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "about " subject) - (list 'rmail-summary-by-topic subject whole-message keep-filtering) - (if keep-filtering - (lambda (msg s wo) - (and (= (aref rmail-summary-currently-displayed-msgs msg) - ?y) - (rmail-message-subject-p msg s wo))) - 'rmail-message-subject-p) - subject whole-message)) + (list 'rmail-summary-by-topic subject whole-message) + 'rmail-message-subject-p subject whole-message)) (defun rmail-message-subject-p (msg subject &optional whole-message) (if whole-message @@ -463,12 +389,10 @@ of all mail messages." (string-match subject (rmail-simplified-subject msg)))) ;;;###autoload -(defun rmail-summary-by-senders (senders &optional keep-filtering) +(defun rmail-summary-by-senders (senders) "Display a summary of all messages whose \"From\" field matches SENDERS. SENDERS is a regular expression. The default for SENDERS matches the -sender of the current message. -If KEEP-FILTERING is non-nil (interactively, the prefix argument), operate -on the current summary instead of all mail messages." +sender of the current message." (interactive (let* ((def (rmail-get-header "From")) ;; We quote the default argument, because if it contains regexp @@ -477,20 +401,10 @@ on the current summary instead of all mail messages." (prompt (concat "Senders to summarize by (regexp" (if sender ", default this message's sender" "") "): "))) - (list (read-string prompt nil nil sender) - current-prefix-arg))) - (if keep-filtering - (rmail-summary-fill-displayed-messages)) + (list (read-string prompt nil nil sender)))) (rmail-new-summary (concat "senders " senders) - (list 'rmail-summary-by-senders senders keep-filtering) - (if keep-filtering - (lambda (msg s) - (and (= (aref rmail-summary-currently-displayed-msgs msg) - ?y) - (rmail-message-senders-p msg s))) - 'rmail-message-senders-p) - senders)) + (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders)) (defun rmail-message-senders-p (msg senders) (string-match senders (or (rmail-get-header "From" msg) ""))) commit c8b9ba5fa1bf3a20b9b08a553ad088ca33f3d1ba Author: Andrea Monaco Date: Thu Oct 27 16:56:12 2022 +0300 Allow applying filters to summary consecutively * lisp/mail/rmailsum.el (rmail-summary-currently-displayed-msgs): New variable. (rmail-summary-fill-displayed-messages, rmail-summary-negate): New functions. (rmail-summary-by-labels, rmail-summary-by-recipients) (rmail-summary-by-regexp, rmail-summary-by-topic) (rmail-summary-by-senders): Accept an additional argument KEEP-FILTERING, to narrow the existing filtered summary. * etc/NEWS: Announce the change. diff --git a/etc/NEWS b/etc/NEWS index cbbf90fde6..21907c7ffb 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -2051,6 +2051,18 @@ Formerly it was a pair of numbers '(A B)' that represented 65536*A + B, to cater to older Emacs implementations that lacked bignums. The older form still works but is undocumented. +** Rmail + +--- +*** Rmail partial summaries can now be applied one on top of the other. +You can now narrow the filtering of messages by the summary's criteria +(recipients, topic, senders, etc.) by making a summary of the already +summarized messages. For example, invoking 'rmail-summary-by-senders', +followed by 'rmail-summary-by-topic' will produce a summary where both +the senders and the topic are according to your selection. Most Rmail +summary commands can be told to filter the existing summary by +invoking them with the prefix argument. + ** EIEIO +++ diff --git a/lisp/mail/rmailsum.el b/lisp/mail/rmailsum.el index b959f45250..4e5b3d0904 100644 --- a/lisp/mail/rmailsum.el +++ b/lisp/mail/rmailsum.el @@ -50,6 +50,13 @@ Setting this option to nil might speed up the generation of summaries." :type 'boolean :group 'rmail-summary) +(defvar rmail-summary-currently-displayed-msgs nil + "String made of `y' and `n'. +At position i it tells wether message i is shown on the summary or not. +First character is ignored. Used when applying rmail-summary-by-* commands +consecutively.") +(put 'rmail-summary-currently-displayed-msgs 'permanent-local t) + (defvar rmail-summary-font-lock-keywords '(("^ *[0-9]+D.*" . font-lock-string-face) ; Deleted. ("^ *[0-9]+-.*" . font-lock-type-face) ; Unread. @@ -267,6 +274,34 @@ Setting this option to nil might speed up the generation of summaries." (defun rmail-update-summary (&rest _) (apply (car rmail-summary-redo) (cdr rmail-summary-redo))) +(defun rmail-summary-fill-displayed-messages () + "Fill the `rmail-summary-currently-displayed-msgs' string." + (with-current-buffer rmail-buffer + (with-current-buffer rmail-summary-buffer + (setq rmail-summary-currently-displayed-msgs + (make-string (1+ rmail-total-messages) ?n)) + (goto-char (point-min)) + (while (not (eobp)) + (aset rmail-summary-currently-displayed-msgs + (string-to-number (thing-at-point 'line)) + ?y) + (forward-line 1))))) + +(defun rmail-summary-negate () + "Toggle showing messages that match/don't match the current summary." + (interactive) + (rmail-summary-fill-displayed-messages) + (rmail-new-summary "Negate" + '(rmail-summary-by-regexp ".*" t) + (lambda (msg) + (if + (= (aref rmail-summary-currently-displayed-msgs msg) + ?n) + (progn + (aset rmail-summary-currently-displayed-msgs msg ?y) t) + (progn + (aset rmail-summary-currently-displayed-msgs msg ?n) nil))))) + ;;;###autoload (defun rmail-summary () "Display a summary of all messages, one line per message." @@ -274,33 +309,52 @@ Setting this option to nil might speed up the generation of summaries." (rmail-new-summary "All" '(rmail-summary) nil)) ;;;###autoload -(defun rmail-summary-by-labels (labels) +(defun rmail-summary-by-labels (labels &optional keep-filtering) "Display a summary of all messages with one or more LABELS. -LABELS should be a string containing the desired labels, separated by commas." - (interactive "sLabels to summarize by: ") +LABELS should be a string containing the desired labels, separated by commas. +If KEEP-FILTERING is non-nil (interactively, the prefix argument), operate +on the current summary instead of all mail messages." + (interactive "sLabels to summarize by: \nP") (if (string= labels "") (setq labels (or rmail-last-multi-labels (error "No label specified")))) (setq rmail-last-multi-labels labels) + (if keep-filtering + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "labels " labels) - (list 'rmail-summary-by-labels labels) - 'rmail-message-labels-p + (list 'rmail-summary-by-labels labels keep-filtering) + (if keep-filtering + (lambda (msg l) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-labels-p msg l))) + 'rmail-message-labels-p) (concat " \\(" (mail-comma-list-regexp labels) "\\)\\(,\\|\\'\\)"))) ;;;###autoload -(defun rmail-summary-by-recipients (recipients &optional primary-only) +(defun rmail-summary-by-recipients (recipients &optional primary-only keep-filtering) "Display a summary of all messages with the given RECIPIENTS. Normally checks the To, From and Cc fields of headers; but if PRIMARY-ONLY is non-nil (prefix arg given), only look in the To and From fields. -RECIPIENTS is a regular expression." +RECIPIENTS is a regular expression. +If KEEP-FILTERING is non-nil, operate on the current summary +instead of all mail messages." (interactive "sRecipients to summarize by: \nP") + (if keep-filtering + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "recipients " recipients) - (list 'rmail-summary-by-recipients recipients primary-only) - 'rmail-message-recipients-p recipients primary-only)) + (list 'rmail-summary-by-recipients recipients primary-only keep-filtering) + (if keep-filtering + (lambda (msg r) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-recipients-p msg r))) + 'rmail-message-recipients-p) + recipients primary-only)) (defun rmail-message-recipients-p (msg recipients &optional primary-only) (rmail-apply-in-message msg 'rmail-message-recipients-p-1 @@ -318,19 +372,28 @@ RECIPIENTS is a regular expression." ;; Also, the optional WHOLE-MESSAGE argument of r-s-by-topic would ;; seem more natural here. ;;;###autoload -(defun rmail-summary-by-regexp (regexp) +(defun rmail-summary-by-regexp (regexp &optional keep-filtering) "Display a summary of all messages according to regexp REGEXP. If the regular expression is found in the header of the message \(including in the date and other lines, as well as the subject line), -Emacs will list the message in the summary." - (interactive "sRegexp to summarize by: ") +Emacs will list the message in the summary. +If KEEP-FILTERING is non-nil (interactively, the prefix argument), operate +on the current summary instead of all mail messages." + (interactive "sRegexp to summarize by: \nP") (if (string= regexp "") (setq regexp (or rmail-last-regexp (error "No regexp specified")))) (setq rmail-last-regexp regexp) + (if keep-filtering + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "regexp " regexp) - (list 'rmail-summary-by-regexp regexp) - 'rmail-message-regexp-p + (list 'rmail-summary-by-regexp regexp keep-filtering) + (if keep-filtering + (lambda (msg r) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-regexp-p msg r))) + 'rmail-message-regexp-p) regexp)) (defun rmail-message-regexp-p (msg regexp) @@ -363,11 +426,14 @@ Emacs will list the message in the summary." (rmail--decode-and-apply 're-search-forward regexp nil t))) ;;;###autoload -(defun rmail-summary-by-topic (subject &optional whole-message) +(defun rmail-summary-by-topic (subject &optional whole-message keep-filtering) "Display a summary of all messages with the given SUBJECT. -Normally checks just the Subject field of headers; but with prefix -argument WHOLE-MESSAGE is non-nil, looks in the whole message. -SUBJECT is a regular expression." +Normally checks just the Subject field of headers; but when +WHOLE-MESSAGE is non-nil (interactively, prefix argument), +looks in the whole message. +SUBJECT is a regular expression. +If KEEP-FILTERING is non-nil, operate on the current summary instead +of all mail messages." (interactive ;; We quote the default subject, because if it contains regexp ;; special characters (eg "?"), it can fail to match itself. (Bug#2333) @@ -376,10 +442,18 @@ SUBJECT is a regular expression." (if subject ", default current subject" "") "): "))) (list (read-string prompt nil nil subject) current-prefix-arg))) + (if keep-filtering + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "about " subject) - (list 'rmail-summary-by-topic subject whole-message) - 'rmail-message-subject-p subject whole-message)) + (list 'rmail-summary-by-topic subject whole-message keep-filtering) + (if keep-filtering + (lambda (msg s wo) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-subject-p msg s wo))) + 'rmail-message-subject-p) + subject whole-message)) (defun rmail-message-subject-p (msg subject &optional whole-message) (if whole-message @@ -389,10 +463,12 @@ SUBJECT is a regular expression." (string-match subject (rmail-simplified-subject msg)))) ;;;###autoload -(defun rmail-summary-by-senders (senders) +(defun rmail-summary-by-senders (senders &optional keep-filtering) "Display a summary of all messages whose \"From\" field matches SENDERS. SENDERS is a regular expression. The default for SENDERS matches the -sender of the current message." +sender of the current message. +If KEEP-FILTERING is non-nil (interactively, the prefix argument), operate +on the current summary instead of all mail messages." (interactive (let* ((def (rmail-get-header "From")) ;; We quote the default argument, because if it contains regexp @@ -401,10 +477,20 @@ sender of the current message." (prompt (concat "Senders to summarize by (regexp" (if sender ", default this message's sender" "") "): "))) - (list (read-string prompt nil nil sender)))) + (list (read-string prompt nil nil sender) + current-prefix-arg))) + (if keep-filtering + (rmail-summary-fill-displayed-messages)) (rmail-new-summary (concat "senders " senders) - (list 'rmail-summary-by-senders senders) 'rmail-message-senders-p senders)) + (list 'rmail-summary-by-senders senders keep-filtering) + (if keep-filtering + (lambda (msg s) + (and (= (aref rmail-summary-currently-displayed-msgs msg) + ?y) + (rmail-message-senders-p msg s))) + 'rmail-message-senders-p) + senders)) (defun rmail-message-senders-p (msg senders) (string-match senders (or (rmail-get-header "From" msg) ""))) commit 877f706c861ec14a3258e53b82b9c8fd86890ca4 Author: Eli Zaretskii Date: Thu Oct 27 15:29:46 2022 +0300 ; * src/keyboard.c (command_loop_1): Remove unused variable. diff --git a/src/keyboard.c b/src/keyboard.c index 8ab4a451b4..b9a08ab91b 100644 --- a/src/keyboard.c +++ b/src/keyboard.c @@ -1268,7 +1268,6 @@ command_loop_1 (void) { modiff_count prev_modiff = 0; struct buffer *prev_buffer = NULL; - bool already_adjusted = 0; kset_prefix_arg (current_kboard, Qnil); kset_last_prefix_arg (current_kboard, Qnil); @@ -1458,8 +1457,6 @@ command_loop_1 (void) safe_run_hooks_maybe_narrowed (Qpre_command_hook, XWINDOW (selected_window)); - already_adjusted = 0; - if (NILP (Vthis_command)) /* nil means key is undefined. */ call0 (Qundefined); @@ -1615,9 +1612,8 @@ command_loop_1 (void) the automatic composition, we must update the display. */ windows_or_buffers_changed = 21; - if (!already_adjusted) - adjust_point_for_property (last_point_position, - MODIFF != prev_modiff); + adjust_point_for_property (last_point_position, + MODIFF != prev_modiff); } else if (PT > BEGV && PT < ZV && (composition_adjust_point (last_point_position, PT) commit 93fb14d0c805f492f0107c5ddd2914cde6d219b5 Author: Eli Zaretskii Date: Thu Oct 27 15:24:53 2022 +0300 Avoid recentering when point enters invisible text at BOL * src/xdisp.c (try_cursor_movement): Don't say we must scroll when point is inside invisible text at beginning of a glyph row. (Bug#58793) diff --git a/src/xdisp.c b/src/xdisp.c index 557cb60631..32675cd76a 100644 --- a/src/xdisp.c +++ b/src/xdisp.c @@ -18926,7 +18926,7 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, while (MATRIX_ROW_BOTTOM_Y (row) < last_y && MATRIX_ROW_END_CHARPOS (row) == PT && row < MATRIX_MODE_LINE_ROW (w->current_matrix) - && MATRIX_ROW_START_CHARPOS (row+1) == PT + && MATRIX_ROW_START_CHARPOS (row+1) >= PT && !cursor_row_p (row)) ++row; @@ -19023,7 +19023,12 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, rc = CURSOR_MOVEMENT_SUCCESS; } - if (PT < MATRIX_ROW_START_CHARPOS (row) + if ((PT < MATRIX_ROW_START_CHARPOS (row) + && (row == MATRIX_FIRST_TEXT_ROW (w->current_matrix) + /* Don't give up if point is inside invisible text + at the beginning of its glyph row. */ + || (MATRIX_ROW_END_CHARPOS (row-1) + == MATRIX_ROW_START_CHARPOS (row)))) || PT > MATRIX_ROW_END_CHARPOS (row)) { /* if PT is not in the glyph row, give up. */ @@ -19105,12 +19110,23 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, continuation lines' rows is implemented for bidi-reordered rows. */ bool rv = false; + bool pt_invis = false; + Lisp_Object val = get_char_property_and_overlay (make_fixnum (PT), + Qinvisible, + Qnil, NULL); + + if (TEXT_PROP_MEANS_INVISIBLE (val) != 0) + pt_invis = true; do { bool at_zv_p = false, exact_match_p = false; - if (MATRIX_ROW_START_CHARPOS (row) <= PT + /* If point is in invisible text, we cannot assume + it must be after row's start position, since the + row could have invisible text at its beginning + where point is located. */ + if ((pt_invis || MATRIX_ROW_START_CHARPOS (row) <= PT) && PT <= MATRIX_ROW_END_CHARPOS (row) && cursor_row_p (row)) rv |= set_cursor_from_row (w, row, w->current_matrix, @@ -19142,16 +19158,8 @@ try_cursor_movement (Lisp_Object window, struct text_pos startp, invisible text? In that case, we trust 'set_cursor_from_row' to do its job and find the best position for the cursor. */ - if (!exact_match_p) - { - Lisp_Object val = - get_char_property_and_overlay (make_fixnum (PT), - Qinvisible, - Qnil, NULL); - - if (TEXT_PROP_MEANS_INVISIBLE (val) != 0) - exact_match_p = true; - } + if (!exact_match_p && pt_invis) + exact_match_p = true; } if (at_zv_p || exact_match_p) { commit af46d8a7ecb5c8c0016cc8dc88fa59ef244a0ced Author: Po Lu Date: Thu Oct 27 19:14:56 2022 +0800 Fix reporting of iconic state on old window managers * src/xterm.c (x_handle_wm_state): Handle IconicState if the window manager does not support _NET_WM_STATE_HIDDEN. diff --git a/src/xterm.c b/src/xterm.c index 9f6112745e..c8ac30c72c 100644 --- a/src/xterm.c +++ b/src/xterm.c @@ -17868,6 +17868,7 @@ x_coords_from_dnd_message (struct x_display_info *dpyinfo, static void x_handle_wm_state (struct frame *f, struct input_event *ie) { + struct x_display_info *dpyinfo; Atom type; int format; unsigned long nitems, bytes_after; @@ -17875,10 +17876,11 @@ x_handle_wm_state (struct frame *f, struct input_event *ie) unsigned long *state; data = NULL; + dpyinfo = FRAME_DISPLAY_INFO (f); if (XGetWindowProperty (FRAME_X_DISPLAY (f), FRAME_OUTER_WINDOW (f), - FRAME_DISPLAY_INFO (f)->Xatom_wm_state, 0, 2, - False, AnyPropertyType, &type, &format, &nitems, + dpyinfo->Xatom_wm_state, 0, 2, False, + AnyPropertyType, &type, &format, &nitems, &bytes_after, &data) != Success) return; @@ -17903,6 +17905,20 @@ x_handle_wm_state (struct frame *f, struct input_event *ie) ie->kind = DEICONIFY_EVENT; XSETFRAME (ie->frame_or_window, f); } + else if (state[0] == IconicState + /* _NET_WM_STATE_HIDDEN should be used if the window + manager supports that. */ + && !x_wm_supports (f, dpyinfo->Xatom_net_wm_state_hidden)) + { + /* The frame is actually iconified right now. Mark it as + such. */ + + SET_FRAME_VISIBLE (f, 0); + SET_FRAME_ICONIFIED (f, true); + + ie->kind = ICONIFY_EVENT; + XSETFRAME (ie->frame_or_window, f); + } /* state[0] can also be WithdrawnState, meaning that the window has been withdrawn and is no longer iconified. However, Emacs sets commit 8deb7978974f87b9fc43babf93a96b045c8e788d Author: Stefan Kangas Date: Thu Oct 27 13:09:49 2022 +0200 ; Fix quoting of non-nil in texinfo sources diff --git a/doc/emacs/display.texi b/doc/emacs/display.texi index b7c8825efa..cf4f041452 100644 --- a/doc/emacs/display.texi +++ b/doc/emacs/display.texi @@ -270,7 +270,7 @@ either at the top or bottom of the window depending on the scroll direction. By default, @code{scroll-conservatively} is@tie{}0, which means to always center point in the window. This said, in minibuffer windows, scrolling is always conservative by -default because @code{scroll-minibuffer-conservatively} is non-nil, +default because @code{scroll-minibuffer-conservatively} is non-@code{nil}, which takes precedence over @code{scroll-conservatively}. @vindex scroll-step diff --git a/doc/emacs/haiku.texi b/doc/emacs/haiku.texi index ac631a39a6..33c81b6f17 100644 --- a/doc/emacs/haiku.texi +++ b/doc/emacs/haiku.texi @@ -108,7 +108,7 @@ You can create such a file with the @command{xmlbmessage} tool. @cindex crashes, Haiku @cindex haiku debugger @vindex haiku-debug-on-fatal-error - If the variable @code{haiku-debug-on-fatal-error} is non-nil, Emacs + If the variable @code{haiku-debug-on-fatal-error} is non-@code{nil}, Emacs will launch the system debugger when a fatal signal is received. It defaults to @code{t}. If GDB cannot be used on your system, please attach the report generated by the system debugger when reporting a diff --git a/doc/emacs/macos.texi b/doc/emacs/macos.texi index d7c432d420..1457a8bc3a 100644 --- a/doc/emacs/macos.texi +++ b/doc/emacs/macos.texi @@ -159,7 +159,7 @@ dialogue on quitting. @vindex ns-auto-hide-menu-bar @item ns-auto-hide-menu-bar This variable specifies whether the macOS menu bar is hidden when an -Emacs frame is selected. If non-nil the menu bar is not shown unless +Emacs frame is selected. If non-@code{nil} the menu bar is not shown unless the mouse pointer is moved near to the top of the screen. @vindex ns-use-native-fullscreen @@ -178,14 +178,14 @@ These variables only apply to macOS 10.7 (Lion) and above. @item ns-use-mwheel-acceleration This variable controls whether Emacs ignores the system mousewheel acceleration. When nil each `click' of the mousewheel will correspond -exactly with one mousewheel event. When non-nil, the default, each +exactly with one mousewheel event. When non-@code{nil}, the default, each `click' may correspond with more than one mousewheel event, depending on the user's input. @vindex ns-use-mwheel-momentum @item ns-use-mwheel-momentum This variable controls whether Emacs ignores the system `momentum' -when scrolling using a trackpad. When non-nil, the default, scrolling +when scrolling using a trackpad. When non-@code{nil}, the default, scrolling rapidly may result in the buffer continuing to scroll for a short while after the user has lifted their fingers off the trackpad. diff --git a/doc/emacs/maintaining.texi b/doc/emacs/maintaining.texi index 2de6b3604f..3e03bd817a 100644 --- a/doc/emacs/maintaining.texi +++ b/doc/emacs/maintaining.texi @@ -3298,7 +3298,7 @@ according to @code{bug-reference-setup-from-mail-alist}, and @code{bug-reference-maybe-setup-from-irc} which does the setup according to @code{bug-reference-setup-from-irc-alist}. @end itemize -A setup function should return non-nil if it could setup bug-reference +A setup function should return non-@code{nil} if it could setup bug-reference mode which is the case if the last thing the function does is calling one of the helper functions above. diff --git a/doc/emacs/misc.texi b/doc/emacs/misc.texi index 1514e316f8..29c0bed19c 100644 --- a/doc/emacs/misc.texi +++ b/doc/emacs/misc.texi @@ -1540,7 +1540,7 @@ color is supported. Therefore, Emacs provides an option @code{comint-terminfo-terminal} to let you choose a terminal with more advanced features, as defined in your system's terminfo database. Emacs will use this option as the value for @env{TERM} so long as -@code{system-uses-terminfo} is non-nil. +@code{system-uses-terminfo} is non-@code{nil}. Both @code{comint-terminfo-terminal} and @code{system-uses-terminfo} can be declared as connection-local variables to adjust these options diff --git a/doc/lispref/backups.texi b/doc/lispref/backups.texi index d99487368b..f0b154e495 100644 --- a/doc/lispref/backups.texi +++ b/doc/lispref/backups.texi @@ -474,7 +474,7 @@ Each transform is a list of the form @w{@code{(@var{regexp} @var{replacement} [@var{uniquify}])}}. @var{regexp} is a regular expression to match against the file name; if it matches, @code{replace-match} is used to replace the matching part with -@var{replacement}. If the optional element @var{uniquify} is non-nil, +@var{replacement}. If the optional element @var{uniquify} is non-@code{nil}, the auto-save file name is constructed by concatenating the directory part of the transformed file name with the buffer's file name in which all directory separators were changed to @samp{!} to prevent clashes. diff --git a/doc/lispref/commands.texi b/doc/lispref/commands.texi index ede1c4d762..377b433cae 100644 --- a/doc/lispref/commands.texi +++ b/doc/lispref/commands.texi @@ -2726,7 +2726,7 @@ coordinates @var{x} and @var{y} in a specified frame or window, @var{frame-or-window}, which defaults to the selected window. The coordinates @var{x} and @var{y} are relative to the text area of the selected window. -If @var{whole} is @code{non-nil}, the @var{x} coordinate is relative +If @var{whole} is non-@code{nil}, the @var{x} coordinate is relative to the entire window area including scroll bars, margins and fringes. @end defun diff --git a/doc/lispref/compile.texi b/doc/lispref/compile.texi index 6f8431c55c..d1d281d709 100644 --- a/doc/lispref/compile.texi +++ b/doc/lispref/compile.texi @@ -1077,7 +1077,7 @@ pristine environment, that may not be true for the subprocess. @end defopt @defopt native-comp-async-query-on-exit -If this variable's value is non-nil, Emacs will query upon exiting +If this variable's value is non-@code{nil}, Emacs will query upon exiting whether to exit and kill any asynchronous native-compilation subprocesses that are still running, thus preventing the corresponding @file{.eln} files from being written. If the value is @code{nil}, the diff --git a/doc/lispref/display.texi b/doc/lispref/display.texi index 15cd5518d9..c75107fb58 100644 --- a/doc/lispref/display.texi +++ b/doc/lispref/display.texi @@ -2587,7 +2587,7 @@ meaning the foreground color of the face. Omitting the attribute @code{:color} means to use the foreground color of the face. @var{style} should be a symbol @code{line} or @code{wave}, meaning to use a straight or wavy line. Omitting the attribute @code{:style} -means to use a straight line. @var{position}, if non-nil, means to +means to use a straight line. @var{position}, if non-@code{nil}, means to display the underline at the descent of the text, instead of at the baseline level. If it is a number, then it specifies the amount of pixels above the descent to display the underline. @@ -7347,7 +7347,7 @@ Display the next search result in @var{xwidget}. This function will signal an error if a search query has not been already started in @var{xwidget} through @code{xwidget-webkit-search}. -If @code{wrap-around} was non-nil when @code{xwidget-webkit-search} +If @code{wrap-around} was non-@code{nil} when @code{xwidget-webkit-search} was called, then the search will restart from the beginning of the document when its end is reached. @end defun @@ -7357,7 +7357,7 @@ Display the previous search result in @var{xwidget}. This function signals an error if a search query has not been already started in @var{xwidget} through @code{xwidget-webkit-search}. -If @code{wrap-around} was non-nil when @code{xwidget-webkit-search} +If @code{wrap-around} was non-@code{nil} when @code{xwidget-webkit-search} was called, then the search will restart from the end of the document when its beginning is reached. @end defun diff --git a/doc/lispref/files.texi b/doc/lispref/files.texi index b26d4f1058..183b2786ea 100644 --- a/doc/lispref/files.texi +++ b/doc/lispref/files.texi @@ -3136,7 +3136,7 @@ a list of file names that match it. @var{pattern} is, by default, a ``glob''/wildcard string, e.g., @samp{"/tmp/*.png"} or @samp{"/*/*/foo.png"}, but can also be a -regular expression if the optional @var{regexp} parameter is non-nil. +regular expression if the optional @var{regexp} parameter is non-@code{nil}. In any case, the matches are applied per sub-directory, so a match can't span a parent/sub directory. diff --git a/doc/lispref/modes.texi b/doc/lispref/modes.texi index 434538dcbf..9527df33b8 100644 --- a/doc/lispref/modes.texi +++ b/doc/lispref/modes.texi @@ -198,7 +198,7 @@ on the hook. The optional argument @var{depth} lets you indicate where the function should be inserted in the list: it should then be a number between -100 and 100 where the higher the value, the closer to the end of the list the function should go. The @var{depth} defaults to 0 and for backward -compatibility when @var{depth} is a non-nil symbol it is interpreted as a depth +compatibility when @var{depth} is a non-@code{nil} symbol it is interpreted as a depth of 90. Furthermore, when @var{depth} is strictly greater than 0 the function is added @emph{after} rather than before functions of the same depth. One should never use a depth of 100 (or -100), because one can never be @@ -1256,7 +1256,7 @@ will be a vector for the ID at @var{pos}. If there is no entry at @vindex tabulated-list-use-header-line @defun tabulated-list-header-overlay-p &optional POS -This @code{defsubst} returns non-nil if there is a fake header at +This @code{defsubst} returns non-@code{nil} if there is a fake header at @var{pos}. A fake header is used if @code{tabulated-list-use-header-line} is @code{nil} to put the column names at the beginning of the buffer. If omitted or @code{nil}, @@ -1269,7 +1269,7 @@ This function puts @var{tag} in the padding area of the current line. The padding area can be empty space at the beginning of the line, the width of which is governed by @code{tabulated-list-padding}. @var{tag} should be a string, with a length less than or equal to -@code{tabulated-list-padding}. If @var{advance} is non-nil, this +@code{tabulated-list-padding}. If @var{advance} is non-@code{nil}, this function advances point by one line. @end defun @@ -1284,7 +1284,7 @@ This function changes the tabulated list entry at point, setting the name of the column to change. @var{desc} is the new column descriptor, which is inserted via @code{tabulated-list-print-col}. -If @var{change-entry-data} is non-nil, this function modifies the +If @var{change-entry-data} is non-@code{nil}, this function modifies the underlying data (usually the column descriptor in the list @code{tabulated-list-entries}) by setting the column descriptor of the vector to @code{desc}. diff --git a/doc/lispref/processes.texi b/doc/lispref/processes.texi index db6b4c35ef..da8df96854 100644 --- a/doc/lispref/processes.texi +++ b/doc/lispref/processes.texi @@ -507,7 +507,7 @@ string describing this signal. Since there are processes violating this rule, returning exit codes greater than 128 which are not bound to a signal, @code{process-file} returns always the exit code as natural number for remote processes. -Setting this user option to non-nil forces @code{process-file} to +Setting this user option to non-@code{nil} forces @code{process-file} to interpret such exit codes as signals, and to return a corresponding string. @end defopt diff --git a/doc/lispref/searching.texi b/doc/lispref/searching.texi index 04f9297ec4..743718b560 100644 --- a/doc/lispref/searching.texi +++ b/doc/lispref/searching.texi @@ -1294,12 +1294,12 @@ Match any character that has whitespace syntax @item @code{lower}, @code{lower-case} Match anything lower-case, as determined by the current case table. -If @code{case-fold-search} is non-nil, this also matches any +If @code{case-fold-search} is non-@code{nil}, this also matches any upper-case letter. @item @code{upper}, @code{upper-case} Match anything upper-case, as determined by the current case table. -If @code{case-fold-search} is non-nil, this also matches any +If @code{case-fold-search} is non-@code{nil}, this also matches any lower-case letter. @item @code{graph}, @code{graphic} diff --git a/doc/lispref/symbols.texi b/doc/lispref/symbols.texi index 1074a8a829..2ef4f8c291 100644 --- a/doc/lispref/symbols.texi +++ b/doc/lispref/symbols.texi @@ -794,7 +794,7 @@ this case. @end defvar @defvar print-symbols-bare -When bound to non-nil, the Lisp printer prints only the bare symbol of +When bound to non-@code{nil}, the Lisp printer prints only the bare symbol of a symbol with position, ignoring the position. @end defvar diff --git a/doc/lispref/text.texi b/doc/lispref/text.texi index d1010db515..793c22949c 100644 --- a/doc/lispref/text.texi +++ b/doc/lispref/text.texi @@ -1525,7 +1525,7 @@ Some commands leave the region active after execution in such a way that it interferes with selective undo of that command. To make @code{undo} ignore the active region when invoked immediately after such a command, set the property @code{undo-inhibit-region} of the command's function -symbol to a non-nil value. @xref{Standard Properties}. +symbol to a non-@code{nil} value. @xref{Standard Properties}. @node Maintaining Undo @section Maintaining Undo Lists @@ -5926,7 +5926,7 @@ methods if these concepts apply to the transport. If they do, then any system resources (e.g.@: processes, timers, etc.) used to listen for messages on the wire should be released in @code{jsonrpc-shutdown}, i.e.@: they should only be needed while @code{jsonrpc-running-p} is -non-nil. +non-@code{nil}. @end enumerate diff --git a/doc/lispref/windows.texi b/doc/lispref/windows.texi index e946a408fd..37884faec7 100644 --- a/doc/lispref/windows.texi +++ b/doc/lispref/windows.texi @@ -2624,7 +2624,7 @@ default value is an empty display action, i.e., @w{@code{(nil . nil)}}. The value of this option is an alist mapping conditions to display actions. Each condition is passed to @code{buffer-match-p}, along with the buffer name and the @var{action} argument passed to -@code{display-buffer}. If it returns a non-nil value, then +@code{display-buffer}. If it returns a non-@code{nil} value, then @code{display-buffer} uses the corresponding display action to display the buffer. @end defopt diff --git a/doc/misc/cc-mode.texi b/doc/misc/cc-mode.texi index ab41737794..bade04fb95 100644 --- a/doc/misc/cc-mode.texi +++ b/doc/misc/cc-mode.texi @@ -2191,7 +2191,7 @@ foo& bar @defvar c-asymmetry-fontification-flag @vindex asymmetry-fontification-flag @r{(c-)} -When @code{c-asymmetry-fontification-flag} is non-nil (which it is by +When @code{c-asymmetry-fontification-flag} is non-@code{nil} (which it is by default), code like the above, with white space either before or after the operator, but not both, is fontified as a declaration. When the variable is nil, such a construct gets the default face. diff --git a/doc/misc/cl.texi b/doc/misc/cl.texi index a6747b1096..e4b344f267 100644 --- a/doc/misc/cl.texi +++ b/doc/misc/cl.texi @@ -4051,7 +4051,7 @@ following keywords can be used: @table @code @item :read-only -A non-nil value means the slot should not be @code{setf}-able; +A non-@code{nil} value means the slot should not be @code{setf}-able; the slot's value is determined when the object is created and does not change afterward. diff --git a/doc/misc/eshell.texi b/doc/misc/eshell.texi index 2945c05e85..ff368c9dc4 100644 --- a/doc/misc/eshell.texi +++ b/doc/misc/eshell.texi @@ -800,12 +800,12 @@ command-line switch: @table @var @item short -This element, if non-nil, should be a character to be used as a short +This element, if non-@code{nil}, should be a character to be used as a short switch, like @code{-@var{short}}. At least one of this element and -@var{long} must be non-nil. +@var{long} must be non-@code{nil}. @item long -This element, if non-nil, should be a string to be used as a long +This element, if non-@code{nil}, should be a string to be used as a long switch, like @code{--@var{long}}. @item value diff --git a/doc/misc/flymake.texi b/doc/misc/flymake.texi index 7406557623..da1695099a 100644 --- a/doc/misc/flymake.texi +++ b/doc/misc/flymake.texi @@ -312,7 +312,7 @@ been reported. Which fringe (if any) should show the warning/error bitmaps. @item flymake-wrap-around -If non-nil, moving to errors with @code{flymake-goto-next-error} and +If non-@code{nil}, moving to errors with @code{flymake-goto-next-error} and @code{flymake-goto-prev-error} wraps around buffer boundaries. @end vtable @@ -878,7 +878,7 @@ line-idx col-idx err-text-idx)}. @xref{Parsing the output}. @item flymake-proc-diagnostic-type-pred A function to classify a diagnostic text as particular type of error. Should be a function taking an error text and returning a diagnostic -symbol (@pxref{Flymake error types}). If non-nil is returned but +symbol (@pxref{Flymake error types}). If non-@code{nil} is returned but there is no such symbol in that table, a warning is assumed. If nil is returned, an error is assumed. Can also be a regular expression that should match only warnings. This variable replaces the old diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi index ec728c09ad..7bcf334297 100644 --- a/doc/misc/gnus.texi +++ b/doc/misc/gnus.texi @@ -10497,7 +10497,7 @@ normally, but it'll make this command work a whole lot faster. Of course, it'll make group entry somewhat slow. @vindex gnus-refer-thread-use-search -If @code{gnus-refer-thread-use-search} is non-nil then those backends +If @code{gnus-refer-thread-use-search} is non-@code{nil} then those backends that know how to find threads directly will search not just in the current group but all groups on the same server. @@ -10515,7 +10515,7 @@ is true and the initial referral starts from a summary buffer for a non-virtual group this may not be possible. In this case a new summary buffer is created holding a virtual group with the result of the thread search.) If @code{gnus-refer-thread-limit-to-thread} is -non-nil then the summary buffer will be limited to articles in the +non-@code{nil} then the summary buffer will be limited to articles in the thread. @item M-^ (Summary) @@ -21569,7 +21569,7 @@ Search Groups}). Search queries can be specified one of two ways: either using the syntax of the engine responsible for the group you're searching, or using Gnus' generalized search syntax. Set the option -@code{gnus-search-use-parsed-queries} to a non-nil value to used the +@code{gnus-search-use-parsed-queries} to a non-@code{nil} value to used the generalized syntax. The advantage of this syntax is that, if you have multiple backends indexed by different engines, you don't need to remember which one you're searching---it's also possible to issue the @@ -26329,7 +26329,7 @@ size, it will reject insertion of new entries. @end defvar @defvar gnus-registry-register-all -If this option is non-nil, the registry will register all messages, as +If this option is non-@code{nil}, the registry will register all messages, as you see them. This is important to making split-to-parent and Message-ID references work correctly, as the registry needs to know where all messages are, but it can slow down group opening and the @@ -26429,7 +26429,7 @@ have to put a rule like this: in your fancy split setup. -If @code{gnus-registry-register-all} is non-nil (the default), the +If @code{gnus-registry-register-all} is non-@code{nil} (the default), the registry will perform splitting for all messages. If it is nil, splitting will only happen for children of messages you've explicitly registered. @@ -26508,7 +26508,7 @@ Store @code{value} under @code{key} for message @code{id}. @defun gnus-registry-get-id-key (id key) Get the data under @code{key} for message @code{id}. If the option -@code{gnus-registry-register-all} is non-nil, this function will also +@code{gnus-registry-register-all} is non-@code{nil}, this function will also create an entry for @code{id} if one doesn't exist. @end defun @@ -26633,7 +26633,7 @@ connections after the system resumes. On systems compiled with D-Bus support (check the value of @code{(featurep 'dbusbind)}), Gnus can register a D-Bus signal to automatically close all server connections before the system goes to sleep. To enable this, set -@code{gnus-dbus-close-on-sleep} to a non-nil value. +@code{gnus-dbus-close-on-sleep} to a non-@code{nil} value. For more information about D-Bus and Emacs, @pxref{Top,,, dbus, D-Bus integration in Emacs}. diff --git a/doc/misc/newsticker.texi b/doc/misc/newsticker.texi index 92dba55c01..fec571d923 100644 --- a/doc/misc/newsticker.texi +++ b/doc/misc/newsticker.texi @@ -172,7 +172,7 @@ is fetched for the very first time. @vindex newsticker-obsolete-item-max-age @item newsticker-keep-obsolete-items Obsolete headlines are removed immediately unless -@code{newsticker-keep-obsolete-items} is non-nil in which case they +@code{newsticker-keep-obsolete-items} is non-@code{nil} in which case they are kept until @code{newsticker-obsolete-item-max-age} is reached. @vindex newsticker-automatically-mark-items-as-old diff --git a/doc/misc/rcirc.texi b/doc/misc/rcirc.texi index 307fe55a63..84933a9ca7 100644 --- a/doc/misc/rcirc.texi +++ b/doc/misc/rcirc.texi @@ -259,7 +259,7 @@ Use @kbd{C-c C-@key{SPC}} to switch to these buffers. @vindex rcirc-track-ignore-server-buffer-flag If the user wishes to ignore events in the server buffer, set -@code{rcirc-track-ignore-server-buffer-flag} to a non-nil value. +@code{rcirc-track-ignore-server-buffer-flag} to a non-@code{nil} value. @node Reference @chapter Reference @@ -693,7 +693,7 @@ buffers. @cindex rcirc-track-abbrevate-flag By default the channel names are abbreviated, set -@code{rcirc-track-abbrevate-flag} to a non-nil value. This might be +@code{rcirc-track-abbrevate-flag} to a non-@code{nil} value. This might be interesting if the IRC activities are not tracked in the mode line, but somewhere else. diff --git a/doc/misc/transient.texi b/doc/misc/transient.texi index 24c3090ef7..a6745131d8 100644 --- a/doc/misc/transient.texi +++ b/doc/misc/transient.texi @@ -945,7 +945,7 @@ that multiple suffix commands can be bound to the same key, provided they are never active at the same time, see @ref{Predicate Slots}. Unfortunately both false-positives and false-negatives are possible. -To deal with the former use non-nil @var{KEEP-OTHER@.} To deal with the +To deal with the former use non-@code{nil} @var{KEEP-OTHER@.} To deal with the latter remove the conflicting binding explicitly. @end defun diff --git a/doc/misc/url.texi b/doc/misc/url.texi index 546639b017..420a2b56c5 100644 --- a/doc/misc/url.texi +++ b/doc/misc/url.texi @@ -268,7 +268,7 @@ argument is @code{nil}, the allowed characters are those specified as @dfn{unreserved characters} by RFC 3986 (see the variable @code{url-unreserved-chars}). Otherwise, @var{allowed-chars} should be either a list of allowed chars, or a vector whose Nth element is -non-nil if character N is allowed. +non-@code{nil} if character N is allowed. @end defun @defun url-unhex-string string &optional allow-newlines commit e16ee5fde6db97ecd70630c15196c4337726154a Author: Stephen Leake Date: Thu Oct 27 03:29:20 2022 -0700 Fix auto-insert-alist ada-mode entry to match current ELPA ada-mode diff --git a/lisp/autoinsert.el b/lisp/autoinsert.el index 51d939151c..354b28da5a 100644 --- a/lisp/autoinsert.el +++ b/lisp/autoinsert.el @@ -135,7 +135,7 @@ If this contains a %s, that will be replaced by the matching rule." (if (eq major-mode (default-value 'major-mode)) (sh-mode)))) - (ada-mode . ada-header) + (ada-mode . ada-skel-initial-string) (("\\.[1-9]\\'" . "Man page skeleton") "Short description: "