[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Replace trivial pcase occurrences in the Emacs sources
From: |
Garreau\, Alexandre |
Subject: |
Re: Replace trivial pcase occurrences in the Emacs sources |
Date: |
Thu, 01 Nov 2018 00:44:57 +0100 |
User-agent: |
Gnus (5.13), GNU Emacs 25.1.1 (i686-pc-linux-gnu, GTK+ Version 3.22.11) of 2017-09-15, modified by Debian |
On 2018-10-31 at 21:31, Michael Heerdegen wrote:
> ;;; ** Search the Emacs Elisp sources for
> `',(or
> (pred keywordp)
> (pred numberp)
> (pred stringp))
>
> ;;; ** 509 matches in 50 files:
>
I believe a “few examples” contexts might be useful:
> ;;; *** /home/micha/software/emacs/lisp/allout.el (1 match)
>
> ;;;; Line 5138
> ':
Context:
> (cond ((eq curr-elem '*) (allout-show-current-subtree)
> (if (> allout-recent-end-of-subtree max-pos)
> (setq max-pos allout-recent-end-of-subtree)))
> ((eq curr-elem '+)
> (if (not (allout-hidden-p))
> (save-excursion (allout-hide-current-subtree t)))
> (allout-show-current-branches)
> (if (> allout-recent-end-of-subtree max-pos)
> (setq max-pos allout-recent-end-of-subtree)))
> ((eq curr-elem '-) (allout-show-current-entry))
> ((eq curr-elem ':)
> (setq stay t)
> ;; Expand the `repeat' spec to an explicit version,
> ;; w.r.t. remaining siblings:
> ;;; *** /home/micha/software/emacs/lisp/cus-edit.el (2 matches)
>
> ;;;; Line 4711
> ':style
Context:
> (widget-put (get 'boolean 'widget-type)
> :custom-menu (lambda (_widget symbol)
> (vector (custom-unlispify-menu-entry symbol)
> `(customize-variable ',symbol)
> ':style 'toggle
> ':selected symbol)))
> ;;; *** /home/micha/software/emacs/lisp/cus-load.el (154 matches)
>
> ;;;; Line 929
> '"20.4"
>
> ;;;; Line 931
> '"21.1"
Context:
> (custom-put-if-not 'SQL 'custom-version '"20.4")
> […]
> (custom-put-if-not 'align 'custom-version '"21.1")
And so on…
> ;;; *** /home/micha/software/emacs/lisp/descr-text.el (1 match)
>
> ;;;; Line 684
> '#xa0
> ((and nobreak-char-display char (eq char '#xa0))
> 'nobreak-space)
> ;;; *** /home/micha/software/emacs/lisp/info.el (1 match)
>
> ;;;; Line 5163
> '"(dir)top"
Context:
> (setq completions
> (Info-speedbar-fetch-file-nodes (or node '"(dir)top"))))
> ;;; *** /home/micha/software/emacs/lisp/ldefs-boot.el (57 matches)
>
> ;;;; Line 393
> '3
Context:
> (function-put 'defadvice 'doc-string-elt '3)
> ;;; *** /home/micha/software/emacs/lisp/calc/calc-aent.el (2 matches)
>
> ;;;; Line 718
> '?\.
>
> ;;;; Line 721
> '?_
Context:
> (and (eq ch '?\.)
> (eq (string-match "\\.[0-9]" math-exp-str math-exp-pos)
> math-exp-pos))
> (and (eq ch '?_)
> (eq (string-match "_\\.?[0-9]" math-exp-str math-exp-pos)
> math-exp-pos)
All the rest is alike.
In the end I believe the maximally useful and compact presentation would
be one example per type, with context along (most often upper sexp is
enough, maybe some lines around too). Suggesting that for el-search.
- What `case' have done you? [Was: Re: Replace trivial pcase occurrences in the Emacs sources], (continued)
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/30
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Garreau\, Alexandre, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources,
Garreau\, Alexandre <=
- Re: Replace trivial pcase occurrences in the Emacs sources, Michael Heerdegen, 2018/10/31
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Clément Pit-Claudel, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Alan Mackenzie, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/24
- Re: Replace trivial pcase occurrences in the Emacs sources, Stephen Berman, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources, Eli Zaretskii, 2018/10/25
- Re: Replace trivial pcase occurrences in the Emacs sources, Stefan Monnier, 2018/10/25