(format "%s: Skip (y/n/N/q/%s)? " str
(key-description (vector help-char)))
'(?y ?n ?N ?q)))
- (`?y (setq skip t))
- (`?q (keyboard-quit))
+ (?y (setq skip t))
+ (?q (keyboard-quit))
;; A single log entry can match skip-regexp multiple
;; times. If you are sure you don't want to skip it,
;; you don't want to be asked multiple times.
- (`?N (setq skip 'no))))))
+ (?N (setq skip 'no))))))
(if (eq skip t)
(push revno skipped)
(push revno revnos)))))
;; need to keep them grouped together like this: "\\( \\|[ ...][ ...]\\)".
(while (< i end)
(pcase (aref string i)
- (`?\s (setq spaces (1+ spaces)))
+ (?\s (setq spaces (1+ spaces)))
(c (when (> spaces 0)
(push (char-fold--make-space-string spaces) out)
(setq spaces 0))
("no" ?n "skip to next")
("all" ?! "delete all remaining directories with no more questions")
("quit" ?q "exit")))
- ('"all" (setq recursive 'always dired-recursive-deletes recursive))
- ('"yes" (if (eq recursive 'top) (setq recursive 'always)))
- ('"no" (setq recursive nil))
- ('"quit" (keyboard-quit))
+ ("all" (setq recursive 'always dired-recursive-deletes recursive))
+ ("yes" (if (eq recursive 'top) (setq recursive 'always)))
+ ("no" (setq recursive nil))
+ ("quit" (keyboard-quit))
(_ (keyboard-quit))))) ; catch all unknown answers
(setq recursive nil)) ; Empty dir or recursive is nil.
(delete-directory file recursive trash))))
;; Process the keyword args.
(while (keywordp (car body))
(pcase (pop body)
- (`:group (setq group (pop body)))
- (`:abbrev-table (setq abbrev (pop body)) (setq declare-abbrev nil))
- (`:syntax-table (setq syntax (pop body)) (setq declare-syntax nil))
- (`:after-hook (setq after-hook (pop body)))
+ (:group (setq group (pop body)))
+ (:abbrev-table (setq abbrev (pop body)) (setq declare-abbrev nil))
+ (:syntax-table (setq syntax (pop body)) (setq declare-syntax nil))
+ (:after-hook (setq after-hook (pop body)))
(_ (pop body))))
(setq docstring (derived-mode-make-docstring
(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
(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
(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))
(let ((arg (cadr menu-items)))
(setq menu-items (cddr menu-items))
(pcase keyword
- (`:filter
+ (:filter
(setq filter (lambda (menu)
(easy-menu-filter-return (funcall arg menu)
menu-name))))
- ((or `:enable `:active) (setq enable (or arg ''nil)))
- (`:label (setq label arg))
- (`:help (setq help arg))
- ((or `:included `:visible) (setq visible (or arg ''nil))))))
+ ((or :enable :active) (setq enable (or arg ''nil)))
+ (:label (setq label arg))
+ (:help (setq help arg))
+ ((or :included :visible) (setq visible (or arg ''nil))))))
(if (equal visible ''nil)
nil ; Invisible menu entry, return nil.
(if (and visible (not (easy-menu-always-true-p visible)))
(setq arg (aref item (1+ count)))
(setq count (+ 2 count))
(pcase keyword
- ((or `:included `:visible) (setq visible (or arg ''nil)))
- (`:key-sequence (setq cache arg cache-specified t))
- (`:keys (setq keys arg no-name nil))
- (`:label (setq label arg))
- ((or `:active `:enable) (setq active (or arg ''nil)))
- (`:help (setq prop (cons :help (cons arg prop))))
- (`:suffix (setq suffix arg))
- (`:style (setq style arg))
- (`:selected (setq selected (or arg ''nil)))))
+ ((or :included :visible) (setq visible (or arg ''nil)))
+ (:key-sequence (setq cache arg cache-specified t))
+ (:keys (setq keys arg no-name nil))
+ (:label (setq label arg))
+ ((or :active :enable) (setq active (or arg ''nil)))
+ (:help (setq prop (cons :help (cons arg prop))))
+ (:suffix (setq suffix arg))
+ (:style (setq style arg))
+ (:selected (setq selected (or arg ''nil)))))
(if suffix
(setq label
(if (stringp suffix)
;; Clean up the meaning of protection.
(setq prot
(pcase prot
- ((or 'nil 'public ':public) nil)
- ((or 'protected ':protected) 'protected)
- ((or 'private ':private) 'private)
+ ((or 'nil 'public :public) nil)
+ ((or 'protected :protected) 'protected)
+ ((or 'private :private) 'private)
(_ (signal 'invalid-slot-type (list :protection prot)))))
;; The default type specifier is supposed to be t, meaning anything.
Return (PKG-DESC [NAME VERSION STATUS DOC])."
(let* ((status (package-desc-status pkg))
(face (pcase status
- (`"built-in" 'package-status-built-in)
- (`"external" 'package-status-external)
- (`"available" 'package-status-available)
- (`"avail-obso" 'package-status-avail-obso)
- (`"new" 'package-status-new)
- (`"held" 'package-status-held)
- (`"disabled" 'package-status-disabled)
- (`"installed" 'package-status-installed)
- (`"dependency" 'package-status-dependency)
- (`"unsigned" 'package-status-unsigned)
- (`"incompat" 'package-status-incompat)
+ ("built-in" 'package-status-built-in)
+ ("external" 'package-status-external)
+ ("available" 'package-status-available)
+ ("avail-obso" 'package-status-avail-obso)
+ ("new" 'package-status-new)
+ ("held" 'package-status-held)
+ ("disabled" 'package-status-disabled)
+ ("installed" 'package-status-installed)
+ ("dependency" 'package-status-dependency)
+ ("unsigned" 'package-status-unsigned)
+ ("incompat" 'package-status-incompat)
(_ 'font-lock-warning-face)))) ; obsolete.
(list pkg
`[(,(symbol-name (package-desc-name pkg))
(let ((k (pop keywords))
(v (pop keywords)))
(pcase k
- (`:forward-token
+ (:forward-token
(set (make-local-variable 'smie-forward-token-function) v))
- (`:backward-token
+ (:backward-token
(set (make-local-variable 'smie-backward-token-function) v))
(_ (message "smie-setup: ignoring unknown keyword %s" k)))))
(let ((ca (cdr (assq :smie-closer-alist grammar))))
an integer value."
(let ((valid
(pcase attribute
- (`:family
+ (:family
(if (window-system frame)
(mapcar (lambda (x) (cons x x))
(font-family-list))
;; Only one font on TTYs.
(list (cons "default" "default"))))
- (`:foundry
+ (:foundry
(list nil))
- (`:width
+ (:width
(mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1)))
font-width-table))
- (`:weight
+ (:weight
(mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1)))
font-weight-table))
- (`:slant
+ (:slant
(mapcar #'(lambda (x) (cons (symbol-name (aref x 1)) (aref x 1)))
font-slant-table))
- (`:inverse-video
+ (:inverse-video
(mapcar #'(lambda (x) (cons (symbol-name x) x))
(internal-lisp-face-attribute-values attribute)))
- ((or `:underline `:overline `:strike-through `:box)
+ ((or :underline :overline :strike-through :box)
(if (window-system frame)
(nconc (mapcar #'(lambda (x) (cons (symbol-name x) x))
(internal-lisp-face-attribute-values attribute))
(defined-colors frame)))
(mapcar #'(lambda (x) (cons (symbol-name x) x))
(internal-lisp-face-attribute-values attribute))))
- ((or `:foreground `:background)
+ ((or :foreground :background)
(mapcar #'(lambda (c) (cons c c))
(defined-colors frame)))
- (`:height
+ (:height
'integerp)
- (`:stipple
+ (:stipple
(and (memq (window-system frame) '(x ns)) ; No stipple on w32
(mapcar #'list
(apply #'nconc
(file-directory-p dir)
(directory-files dir)))
x-bitmap-file-path)))))
- (`:inherit
+ (:inherit
(cons '("none" . nil)
(mapcar #'(lambda (c) (cons (symbol-name c) c))
(face-list))))
(defun filesets-get-fileset-from-name (name &optional mode)
"Get fileset definition for NAME."
(pcase mode
- ((or `:ingroup `:tree) name)
+ ((or :ingroup :tree) name)
(_ (assoc name filesets-data))))
;; FIXME: "^." are two tokens, not one.
(defun m2-smie-forward-token ()
(pcase (smie-default-forward-token)
- (`"VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg"))
- (`"CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg"))
- (`";" (save-excursion (m2-smie-refine-semi)))
- (`"OF" (save-excursion (forward-char -2) (m2-smie-refine-of)))
- (`":" (save-excursion (forward-char -1) (m2-smie-refine-colon)))
+ ("VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg"))
+ ("CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg"))
+ (";" (save-excursion (m2-smie-refine-semi)))
+ ("OF" (save-excursion (forward-char -2) (m2-smie-refine-of)))
+ (":" (save-excursion (forward-char -1) (m2-smie-refine-colon)))
;; (`"END" (if (and (looking-at "[ \t\n]*\\(\\(?:\\sw\\|\\s_\\)+\\)")
;; (not (assoc (match-string 1) m2-smie-grammar)))
;; "END-proc" "END"))
(defun m2-smie-backward-token ()
(pcase (smie-default-backward-token)
- (`"VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg"))
- (`"CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg"))
- (`";" (save-excursion (forward-char 1) (m2-smie-refine-semi)))
- (`"OF" (save-excursion (m2-smie-refine-of)))
- (`":" (save-excursion (m2-smie-refine-colon)))
+ ("VAR" (if (zerop (car (syntax-ppss))) "VAR" "VAR-arg"))
+ ("CONST" (if (zerop (car (syntax-ppss))) "CONST" "CONST-arg"))
+ (";" (save-excursion (forward-char 1) (m2-smie-refine-semi)))
+ ("OF" (save-excursion (m2-smie-refine-of)))
+ (":" (save-excursion (m2-smie-refine-colon)))
;; (`"END" (if (and (looking-at "\\sw+[ \t\n]+\\(\\(?:\\sw\\|\\s_\\)+\\)")
;; (not (assoc (match-string 1) m2-smie-grammar)))
;; "END-proc" "END"))
(pcase (cons kind token)
(`(:elem . basic) m2-indent)
(`(:after . ":=") (or m2-indent smie-indent-basic))
- (`(:after . ,(or `"CONST" `"VAR" `"TYPE"))
+ (`(:after . ,(or "CONST" "VAR" "TYPE"))
(or m2-indent smie-indent-basic))
;; (`(:before . ,(or `"VAR" `"TYPE" `"CONST"))
;; (if (smie-rule-parent-p "PROCEDURE") 0))
(unless found (goto-char orig))
found))))
(pcase (and buffer-file-name (file-name-extension buffer-file-name))
- (`"cc" (funcall search
- "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
+ ("cc" (funcall search
+ "\\_<DEFUN\\(?:_DLD\\)?\\s-*(\\s-*\\(\\(?:\\sw\\|\\s_\\)+\\)" 1))
(_ (funcall search octave-function-header-regexp 3)))))
(defun octave-function-file-p ()
(read-char-choice
"Which name to use? (a/b/q) " '(?a ?b ?q))))))
(pcase c
- (`?a (let ((newname (expand-file-name
- (concat func (file-name-extension
- buffer-file-name t)))))
- (when (or (not (file-exists-p newname))
- (yes-or-no-p
- (format "Target file %s exists; proceed? " newname)))
- (when (file-exists-p buffer-file-name)
- (rename-file buffer-file-name newname t))
- (set-visited-file-name newname))))
- (`?b (save-excursion
- (goto-char name-start)
- (delete-region name-start name-end)
- (insert file)))))))))
+ (?a (let ((newname (expand-file-name
+ (concat func (file-name-extension
+ buffer-file-name t)))))
+ (when (or (not (file-exists-p newname))
+ (yes-or-no-p
+ (format "Target file %s exists; proceed? " newname)))
+ (when (file-exists-p buffer-file-name)
+ (rename-file buffer-file-name newname t))
+ (set-visited-file-name newname))))
+ (?b (save-excursion
+ (goto-char name-start)
+ (delete-region name-start name-end)
+ (insert file)))))))))
(defun octave-update-function-file-comment (beg end)
"Query replace function names in function file comment."
(defun octave-find-definition-default-filename (name)
"Default value for `octave-find-definition-filename-function'."
(pcase (file-name-extension name)
- (`"oct"
+ ("oct"
(octave-find-definition-default-filename
(concat "libinterp/dldfcn/"
(file-name-sans-extension (file-name-nondirectory name))
".cc")))
- (`"cc"
+ ("cc"
(let ((file (or (locate-file name (octave-source-directories))
(locate-file (file-name-nondirectory name)
(octave-source-directories)))))
(or (and file (file-exists-p file))
(error "File `%s' not found" name))
file))
- (`"mex"
+ ("mex"
(if (yes-or-no-p (format-message "File `%s' may be binary; open? "
(file-name-nondirectory name)))
name
(if (null (nth 8 ppss))
(when (looking-at opascal--literal-start-re)
(pcase (char-after)
- (`?/ 'comment-single-line)
- (`?\{ 'comment-multi-line-1)
- (`?\( 'comment-multi-line-2)
- (`?\' 'string)
- (`?\" 'double-quoted-string)))
+ (?/ 'comment-single-line)
+ (?\{ 'comment-multi-line-1)
+ (?\( 'comment-multi-line-2)
+ (?\' 'string)
+ (?\" 'double-quoted-string)))
(if (nth 3 ppss) ;String.
(if (eq (nth 3 ppss) ?\")
'double-quoted-string 'string)
(pcase (nth 7 ppss)
- (`2 'comment-single-line)
- (`1 'comment-multi-line-2)
+ (2 'comment-single-line)
+ (1 'comment-multi-line-2)
(_ 'comment-multi-line-1))))))))
(defun opascal-literal-start-pattern (literal-kind)
(cons (car (string-to-syntax "< c"))
;; Remember the names of heredocs found on this line.
(cons (cons (pcase (aref name 0)
- (`?\\ (substring name 1))
- ((or `?\" `?\' `?\`) (substring name 1 -1))
+ (?\\ (substring name 1))
+ ((or ?\" ?\' ?\`) (substring name 1 -1))
(_ name))
indented)
(cdr st)))))))
;; -> thenrule
;; ; elserule
;; )
- (`(:before . ,(or `"->" `";"))
+ (`(:before . ,(or "->" ";"))
(and (smie-rule-bolp) (smie-rule-parent-p "(") (smie-rule-parent 0)))
- (`(:after . ,(or `"->" `"*->"))
+ (`(:after . ,(or "->" "*->"))
;; We distinguish
;;
;; (a ->
(defun prolog-post-self-insert ()
(pcase last-command-event
- (`?_ (prolog-electric--underscore))
- (`?- (prolog-electric--dash))
- (`?: (prolog-electric--colon))
- ((or `?\( `?\; `?>) (prolog-electric--if-then-else))
- (`?. (prolog-electric--dot))))
+ (?_ (prolog-electric--underscore))
+ (?- (prolog-electric--dash))
+ (?: (prolog-electric--colon))
+ ((or ?\( ?\; ?>) (prolog-electric--if-then-else))
+ (?. (prolog-electric--dot))))
(defun prolog-find-term (functor arity &optional prefix)
"Go to the position at the start of the next occurrence of a term.
;; For (invalid) code between switch and case.
;; (if (smie-parent-p "switch") 4)
))
- (`(:before . ,(or `"(" `"[" `"{"))
+ (`(:before . ,(or "(" "[" "{"))
(cond
((and (equal token "{")
(not (smie-rule-prev-p "(" "{" "[" "," "=>" "=" "return" ";"))
(forward-char -1))
(smie-indent-virtual))
(t (smie-rule-parent))))))
- (`(:after . ,(or `"(" "[" "{"))
+ (`(:after . ,(or "(" "[" "{"))
;; FIXME: Shouldn't this be the default behavior of
;; `smie-indent-after-keyword'?
(save-excursion
(smie-backward-sexp ".")
(cons 'column (+ (current-column)
ruby-indent-level))))
- (`(:before . ,(or `"else" `"then" `"elsif" `"rescue" `"ensure"))
+ (`(:before . ,(or "else" "then" "elsif" "rescue" "ensure"))
(smie-rule-parent))
(`(:before . "when")
;; Align to the previous `when', but look up the virtual
(cond ((looking-at "\\s)")
(goto-char (scan-sexps (1+ (point)) -1))
(pcase (char-before)
- (`?% (forward-char -1))
- ((or `?q `?Q `?w `?W `?r `?x)
+ (?% (forward-char -1))
+ ((or ?q ?Q ?w ?W ?r ?x)
(if (eq (char-before (1- (point))) ?%)
(forward-char -2))))
nil)
(forward-char 1)
(while (progn (forward-word-strictly -1)
(pcase (char-before)
- (`?_ t)
- (`?. (forward-char -1) t)
- ((or `?$ `?@)
+ (?_ t)
+ (?. (forward-char -1) t)
+ ((or ?$ ?@)
(forward-char -1)
(and (eq (char-before) (char-after))
(forward-char -1)))
- (`?:
+ (?:
(forward-char -1)
(eq (char-before) :)))))
(if (looking-at ruby-block-end-re)
;; ((...)) or $((...)) or $[...] or ${...}. Nested
;; parenthesis can occur inside the first of these forms, so
;; parse backward recursively.
- (`?\( (eq ?\( (char-before)))
- ((or `?\{ `?\[) (eq ?\$ (char-before))))
+ (?\( (eq ?\( (char-before)))
+ ((or ?\{ ?\[) (eq ?\$ (char-before))))
(sh--inside-noncommand-expression (1- (point))))))))
(defun sh-font-lock-open-heredoc (start string eol)
(`(:elem . basic) sh-basic-offset)
(`(:after . "case-)") (- (sh-var-value 'sh-indent-for-case-alt)
(sh-var-value 'sh-indent-for-case-label)))
- (`(:before . ,(or `"(" `"{" `"[" "while" "if" "for" "case"))
+ (`(:before . ,(or "(" "{" "[" "while" "if" "for" "case"))
(if (not (smie-rule-prev-p "&&" "||" "|"))
(when (smie-rule-hanging-p)
(smie-rule-parent))
`(column . ,(smie-indent-virtual)))))
;; FIXME: Maybe this handling of ;; should be made into
;; a smie-rule-terminator function that takes the substitute ";" as arg.
- (`(:before . ,(or `";;" `";&" `";;&"))
+ (`(:before . ,(or ";;" ";&" ";;&"))
(if (and (smie-rule-bolp) (looking-at ";;?&?[ \t]*\\(#\\|$\\)"))
(cons 'column (smie-indent-keyword ";"))
(smie-rule-separator kind)))
- (`(:after . ,(or `";;" `";&" `";;&"))
+ (`(:after . ,(or ";;" ";&" ";;&"))
(with-demoted-errors
(smie-backward-sexp token)
(cons 'column
(smie-rule-bolp))))
(current-column)
(smie-indent-calculate)))))
- (`(:before . ,(or `"|" `"&&" `"||"))
+ (`(:before . ,(or "|" "&&" "||"))
(unless (smie-rule-parent-p token)
(smie-backward-sexp token)
`(column . ,(+ (funcall smie-rules-function :elem 'basic)
;; sh-indent-after-done: aligned completely differently.
(`(:after . "in") (sh-var-value 'sh-indent-for-case-label))
;; sh-indent-for-continuation: Line continuations are handled differently.
- (`(:after . ,(or `"(" `"{" `"["))
+ (`(:after . ,(or "(" "{" "["))
(if (not (looking-at ".[ \t]*[^\n \t#]"))
(sh-var-value 'sh-indent-after-open)
(goto-char (1- (match-end 0)))
(save-excursion
(when (sh-smie--rc-after-special-arg-p)
`(column . ,(current-column)))))
- (`(:before . ,(or `"(" `"{" `"["))
+ (`(:before . ,(or "(" "{" "["))
(if (smie-rule-hanging-p) (smie-rule-parent)))
;; FIXME: SMIE parses "if (exp) cmd" as "(if ((exp) cmd))" so "cmd" is
;; treated as an arg to (exp) by default, which indents it all wrong.
;; rule we have is the :list-intro hack, which we use here to align "cmd"
;; with "(exp)", which is rarely the right thing to do, but is better
;; than nothing.
- (`(:list-intro . ,(or `"for" `"if" `"while")) t)
+ (`(:list-intro . ,(or "for" "if" "while")) t)
;; sh-indent-after-switch: handled implicitly by the default { rule.
))
(while args-left
(pcase (pop args-left)
;; -version CLIENT-VERSION: obsolete at birth.
- (`"-version" (pop args-left))
+ ("-version" (pop args-left))
;; -nowait: Emacsclient won't wait for a result.
- (`"-nowait" (setq nowait t))
+ ("-nowait" (setq nowait t))
;; -current-frame: Don't create frames.
- (`"-current-frame" (setq use-current-frame t))
+ ("-current-frame" (setq use-current-frame t))
;; -frame-parameters: Set frame parameters
- (`"-frame-parameters"
+ ("-frame-parameters"
(let ((alist (pop args-left)))
(if coding-system
(setq alist (decode-coding-string alist coding-system)))
;; -display DISPLAY:
;; Open X frames on the given display instead of the default.
- (`"-display"
+ ("-display"
(setq display (pop args-left))
(if (zerop (length display)) (setq display nil)))
;; -parent-id ID:
;; Open X frame within window ID, via XEmbed.
- (`"-parent-id"
+ ("-parent-id"
(setq parent-id (pop args-left))
(if (zerop (length parent-id)) (setq parent-id nil)))
;; -window-system: Open a new X frame.
- (`"-window-system"
+ ("-window-system"
(if (fboundp 'x-create-frame)
(setq dontkill t
tty-name 'window-system)))
;; -resume: Resume a suspended tty frame.
- (`"-resume"
+ ("-resume"
(let ((terminal (process-get proc 'terminal)))
(setq dontkill t)
(push (lambda ()
;; -suspend: Suspend the client's frame. (In case we
;; get out of sync, and a C-z sends a SIGTSTP to
;; emacsclient.)
- (`"-suspend"
+ ("-suspend"
(let ((terminal (process-get proc 'terminal)))
(setq dontkill t)
(push (lambda ()
;; -ignore COMMENT: Noop; useful for debugging emacsclient.
;; (The given comment appears in the server log.)
- (`"-ignore"
+ ("-ignore"
(setq dontkill t)
(pop args-left))
;; -tty DEVICE-NAME TYPE: Open a new tty frame.
;; (But if we see -window-system later, use that.)
- (`"-tty"
+ ("-tty"
(setq tty-name (pop args-left)
tty-type (pop args-left)
dontkill (or dontkill
;; -position LINE[:COLUMN]: Set point to the given
;; position in the next file.
- (`"-position"
+ ("-position"
(if (not (string-match "\\+\\([0-9]+\\)\\(?::\\([0-9]+\\)\\)?"
(car args-left)))
(error "Invalid -position command in client args"))
""))))))
;; -file FILENAME: Load the given file.
- (`"-file"
+ ("-file"
(let ((file (pop args-left)))
(if coding-system
(setq file (decode-coding-string file coding-system)))
(setq filepos nil))
;; -eval EXPR: Evaluate a Lisp expression.
- (`"-eval"
+ ("-eval"
(if use-current-frame
(setq use-current-frame 'always))
(let ((expr (pop args-left)))
(setq filepos nil)))
;; -env NAME=VALUE: An environment variable.
- (`"-env"
+ ("-env"
(let ((var (pop args-left)))
;; XXX Variables should be encoded as in getenv/setenv.
(process-put proc 'env
(cons var (process-get proc 'env)))))
;; -dir DIRNAME: The cwd of the emacsclient process.
- (`"-dir"
+ ("-dir"
(setq dir (pop args-left))
(if coding-system
(setq dir (decode-coding-string dir coding-system)))
i frame nextframe)))
(pcase skip
(`nil nil)
- (`0 t)
+ (0 t)
(_ (setq i (+ i skip -1)) (funcall get-next-frame)))))))
;; Now `frame' should be "the function from which we were called".
(pcase (cons frame nextframe)
(`(:elem . basic) css-indent-offset)
(`(:elem . arg) 0)
;; "" stands for BOB (bug#15467).
- (`(:list-intro . ,(or `";" `"" `":-property")) t)
+ (`(:list-intro . ,(or ";" "" ":-property")) t)
(`(:before . "{")
(when (or (smie-rule-hanging-p) (smie-rule-bolp))
(smie-backward-sexp ";")
(should (pcase-tests-grep
'memq (macroexpand-all '(pcase x ((or 1 2 3) body)))))
(should (pcase-tests-grep
- 'member (macroexpand-all '(pcase x ((or '"a" '2 '3) body)))))
+ 'member (macroexpand-all '(pcase x ((or "a" 2 3) body)))))
(should-not (pcase-tests-grep
'memq (macroexpand-all '(pcase x ((or "a" 2 3) body)))))
(let ((exp (macroexpand-all