1
Fork 0
mirror of git://git.sv.gnu.org/emacs.git synced 2025-12-06 06:20:55 -08:00

Don't quote self-quoting pcase patterns

* admin/bzrmerge.el:
* lisp/char-fold.el:
* lisp/dired.el:
* lisp/emacs-lisp/derived.el:
* lisp/emacs-lisp/easy-mmode.el:
* lisp/emacs-lisp/easymenu.el:
* lisp/emacs-lisp/eieio-core.el:
* lisp/emacs-lisp/package.el:
* lisp/emacs-lisp/smie.el:
* lisp/faces.el:
* lisp/filesets.el:
* lisp/progmodes/modula2.el:
* lisp/progmodes/octave.el:
* lisp/progmodes/opascal.el:
* lisp/progmodes/perl-mode.el:
* lisp/progmodes/prolog.el:
* lisp/progmodes/ruby-mode.el:
* lisp/progmodes/sh-script.el:
* lisp/server.el:
* lisp/subr.el:
* lisp/textmodes/css-mode.el:
* test/lisp/emacs-lisp/pcase-tests.el: Don't quote self-quoting
'pcase' patterns.
This commit is contained in:
Michael Heerdegen 2018-10-27 01:48:35 +02:00
parent 607cc2901b
commit 049bd5d267
22 changed files with 167 additions and 167 deletions

View file

@ -217,30 +217,30 @@ For example, you could write
(while (keywordp (setq keyw (car body)))
(setq body (cdr body))
(pcase keyw
(`:init-value (setq init-value (pop body)))
(`:lighter (setq lighter (purecopy (pop body))))
(`:global (setq globalp (pop body))
(when (and globalp (symbolp mode))
(setq setter `(setq-default ,mode))
(setq getter `(default-value ',mode))))
(`:extra-args (setq extra-args (pop body)))
(`:set (setq set (list :set (pop body))))
(`:initialize (setq initialize (list :initialize (pop body))))
(`:group (setq group (nconc group (list :group (pop body)))))
(`:type (setq type (list :type (pop body))))
(`:require (setq require (pop body)))
(`:keymap (setq keymap (pop body)))
(`:variable (setq variable (pop body))
(if (not (and (setq tmp (cdr-safe variable))
(or (symbolp tmp)
(functionp tmp))))
;; PLACE is not of the form (GET . SET).
(progn
(setq setter `(setf ,variable))
(setq getter variable))
(setq getter (car variable))
(setq setter `(funcall #',(cdr variable)))))
(`:after-hook (setq after-hook (pop body)))
(:init-value (setq init-value (pop body)))
(:lighter (setq lighter (purecopy (pop body))))
(:global (setq globalp (pop body))
(when (and globalp (symbolp mode))
(setq setter `(setq-default ,mode))
(setq getter `(default-value ',mode))))
(:extra-args (setq extra-args (pop body)))
(:set (setq set (list :set (pop body))))
(:initialize (setq initialize (list :initialize (pop body))))
(:group (setq group (nconc group (list :group (pop body)))))
(:type (setq type (list :type (pop body))))
(:require (setq require (pop body)))
(:keymap (setq keymap (pop body)))
(:variable (setq variable (pop body))
(if (not (and (setq tmp (cdr-safe variable))
(or (symbolp tmp)
(functionp tmp))))
;; PLACE is not of the form (GET . SET).
(progn
(setq setter `(setf ,variable))
(setq getter variable))
(setq getter (car variable))
(setq setter `(funcall #',(cdr variable)))))
(:after-hook (setq after-hook (pop body)))
(_ (push keyw extra-keywords) (push (pop body) extra-keywords))))
(setq keymap-sym (if (and keymap (symbolp keymap)) keymap
@ -407,8 +407,8 @@ on if the hook has explicitly disabled it."
(while (keywordp (setq keyw (car keys)))
(setq keys (cdr keys))
(pcase keyw
(`:group (setq group (nconc group (list :group (pop keys)))))
(`:global (setq keys (cdr keys)))
(:group (setq group (nconc group (list :group (pop keys)))))
(:global (setq keys (cdr keys)))
(_ (push keyw extra-keywords) (push (pop keys) extra-keywords))))
(unless group
@ -533,11 +533,11 @@ Valid keywords and arguments are:
(let ((key (pop args))
(val (pop args)))
(pcase key
(`:name (setq name val))
(`:dense (setq dense val))
(`:inherit (setq inherit val))
(`:suppress (setq suppress val))
(`:group)
(:name (setq name val))
(:dense (setq dense val))
(:inherit (setq inherit val))
(:suppress (setq suppress val))
(:group)
(_ (message "Unknown argument %s in defmap" key)))))
(unless (keymapp m)
(setq bs (append m bs))