\f
(defconst make-manuals-dist-output-variables
- `(("@\\(top_\\)?srcdir@" . ".") ; top_srcdir is wrong, but not used
+ '(("@\\(top_\\)?srcdir@" . ".") ; top_srcdir is wrong, but not used
("^\\(\\(?:texinfo\\|buildinfo\\|emacs\\)dir *=\\).*" . "\\1 .")
("^\\(clean:.*\\)" . "\\1 infoclean")
("@MAKEINFO@" . "makeinfo")
(dolist (x (cdr lh-entry))
(pcase (car-safe x)
;; (autoload (push (cdr x) autoloads))
- (`require (push (cdr x) requires))
- (`provide (push (cdr x) provides))
- (`t nil) ; Skip "was an autoload" entries.
+ ('require (push (cdr x) requires))
+ ('provide (push (cdr x) provides))
+ ('t nil) ; Skip "was an autoload" entries.
;; FIXME: Print information about each individual method: both
;; its docstring and specializers (bug#21422).
- (`cl-defmethod (push (cadr x) provides))
+ ('cl-defmethod (push (cadr x) provides))
(_ (push (or (cdr-safe x) x) symbols))))
(let ((apropos-pattern "")) ;Dummy binding for apropos-symbols-internal.
(apropos-symbols-internal
;; The code below assumes the name is relative and may do undesirable
;; things otherwise.
(error "Can't extract files with non-relative names")
- (archive-extract-by-file archive name `("unar" "-no-directory" "-o") "Successfully extracted")))
+ (archive-extract-by-file archive name '("unar" "-no-directory" "-o") "Successfully extracted")))
;;; Section: Rar self-extracting .exe archives.
(defcustom auth-source-save-behavior 'ask
"If set, auth-source will respect it for save behavior."
:version "23.2" ;; No Gnus
- :type `(choice
+ :type '(choice
:tag "auth-source new token save behavior"
(const :tag "Always save" t)
(const :tag "Never save" nil)
(defcustom auth-source-do-cache t
"Whether auth-source should cache information with `password-cache'."
:version "23.2" ;; No Gnus
- :type `boolean)
+ :type 'boolean)
(defcustom auth-source-debug nil
"Whether auth-source should log debug messages.
If the value is a function, debug messages are logged by calling
that function using the same arguments as `message'."
:version "23.2" ;; No Gnus
- :type `(choice
+ :type '(choice
:tag "auth-source debugging mode"
(const :tag "Log using `message' to the *Messages* buffer" t)
(const :tag "Log all trivia with `message' to the *Messages* buffer"
'frame-or-window
mouse-avoidance-banish-position 'eq))
(list-values (pcase fra-or-win
- (`frame (list 0 0 (frame-width) (frame-height)))
- (`window (window-edges))))
+ ('frame (list 0 0 (frame-width) (frame-height)))
+ ('window (window-edges))))
(alist (cl-loop for v in list-values
for k in '(left top right bottom)
collect (cons k v)))
'top-or-bottom-pos
mouse-avoidance-banish-position #'eq))
(side-fn (pcase side
- (`left '+)
- (`right '-)))
+ ('left '+)
+ ('right '-)))
(top-or-bottom-fn (pcase top-or-bottom
- (`top '+)
- (`bottom '-))))
+ ('top '+)
+ ('bottom '-))))
(cons (funcall side-fn ; -/+
(assoc-default side alist 'eq) ; right or left
side-dist) ; distance from side
This option specifies both the field width and the type of offset
displayed in `mode-line-position', a component of the default
`mode-line-format'."
- :type `(radio
+ :type '(radio
(const :tag "nil: No offset is displayed" nil)
(const :tag "\"%o\": Proportion of \"travel\" of the window through the buffer"
(-3 "%o"))
;; FIXME: Maybe beginning-of-line, beginning-of-buffer, end-of-line,
;; end-of-buffer, end-of-file, buffer-read-only, and
;; file-supersession should all be user-errors!
- `(beginning-of-line beginning-of-buffer end-of-line
- end-of-buffer end-of-file buffer-read-only
- file-supersession mark-inactive
- user-error ;; That's the main one!
- ))
+ '(beginning-of-line beginning-of-buffer end-of-line
+ end-of-buffer end-of-file buffer-read-only
+ file-supersession mark-inactive
+ user-error ;; That's the main one!
+ ))
(make-variable-buffer-local 'indent-tabs-mode)
(let ((res
(with-current-buffer (bs--current-buffer)
(setq bs-buffer-show-mark (pcase bs-buffer-show-mark
- (`nil 'never)
- (`never 'always)
+ ('nil 'never)
+ ('never 'always)
(_ nil))))))
(bs--update-current-line)
(bs--set-window-height)
(DX (if (and X calculator-deg) (degrees-to-radians X) X))
(L calculator-saved-list)
(fF `(calculator-funcall ',f x y))
- (fD `(if calculator-deg (radians-to-degrees x) x)))
+ (fD '(if calculator-deg (radians-to-degrees x) x)))
(eval `(cl-flet ((F (&optional x y) ,fF) (D (x) ,fD))
(let ((X ,X) (Y ,Y) (DX ,DX) (TX ,TX) (TY ,TY) (L ',L))
,f))
(when (and (or calculator-display-fragile
(not (numberp (car calculator-stack))))
(<= inp (pcase calculator-input-radix
- (`nil ?9) (`bin ?1) (`oct ?7) (_ 999))))
+ ('nil ?9) ('bin ?1) ('oct ?7) (_ 999))))
(calculator-clear-fragile)
(setq calculator-curnum
(concat (if (equal calculator-curnum "0") ""
;; -----------------------------------------------------------------------------
(defvar todo-key-bindings-t
- `(
- ("Af" todo-find-archive)
+ '(("Af" todo-find-archive)
("Ac" todo-choose-archive)
("Ad" todo-archive-done-item)
("Cv" todo-toggle-view-done-items)
("k" todo-delete-item)
("m" todo-move-item)
("u" todo-item-undone)
- ([remap newline] newline-and-indent)
- )
+ ([remap newline] newline-and-indent))
"List of key bindings for Todo mode only.")
(defvar todo-key-bindings-t+a+f
- `(
- ("C*" todo-mark-category)
+ '(("C*" todo-mark-category)
("Cu" todo-unmark-category)
("Fh" todo-toggle-item-header)
("h" todo-toggle-item-header)
("p" todo-previous-item)
("q" todo-quit)
("s" todo-save)
- ("t" todo-show)
- )
+ ("t" todo-show))
"List of key bindings for Todo, Archive, and Filtered Items modes.")
(defvar todo-key-bindings-t+a
- `(
- ("Fc" todo-show-categories-table)
+ '(("Fc" todo-show-categories-table)
("S" todo-search)
("X" todo-clear-matches)
("b" todo-backward-category)
("f" todo-forward-category)
- ("*" todo-toggle-mark-item)
- )
+ ("*" todo-toggle-mark-item))
"List of key bindings for Todo and Todo Archive modes.")
(defvar todo-key-bindings-t+f
- `(
- ("l" todo-lower-item-priority)
+ '(("l" todo-lower-item-priority)
("r" todo-raise-item-priority)
- ("#" todo-set-item-priority)
- )
+ ("#" todo-set-item-priority))
"List of key bindings for Todo and Todo Filtered Items modes.")
(defvar todo-mode-map
"Indicate that the current buffer is unparseable.
It is also true that the parse tree will need either updating or
a rebuild. This state will be changed when the user edits the buffer."
- `(setq semantic-parse-tree-state 'unparseable))
+ '(setq semantic-parse-tree-state 'unparseable))
(defmacro semantic-parse-tree-unparseable-p ()
"Return non-nil if the current buffer has been marked unparseable."
- `(eq semantic-parse-tree-state 'unparseable))
+ '(eq semantic-parse-tree-state 'unparseable))
(defmacro semantic-parse-tree-set-needs-update ()
"Indicate that the current parse tree needs to be updated.
The parse tree can be updated by `semantic-parse-changes'."
- `(setq semantic-parse-tree-state 'needs-update))
+ '(setq semantic-parse-tree-state 'needs-update))
(defmacro semantic-parse-tree-needs-update-p ()
"Return non-nil if the current parse tree needs to be updated."
- `(eq semantic-parse-tree-state 'needs-update))
+ '(eq semantic-parse-tree-state 'needs-update))
(defmacro semantic-parse-tree-set-needs-rebuild ()
"Indicate that the current parse tree needs to be rebuilt.
The parse tree must be rebuilt by `semantic-parse-region'."
- `(setq semantic-parse-tree-state 'needs-rebuild))
+ '(setq semantic-parse-tree-state 'needs-rebuild))
(defmacro semantic-parse-tree-needs-rebuild-p ()
"Return non-nil if the current parse tree needs to be rebuilt."
- `(eq semantic-parse-tree-state 'needs-rebuild))
+ '(eq semantic-parse-tree-state 'needs-rebuild))
(defmacro semantic-parse-tree-set-up-to-date ()
"Indicate that the current parse tree is up to date."
- `(setq semantic-parse-tree-state nil))
+ '(setq semantic-parse-tree-state nil))
(defmacro semantic-parse-tree-up-to-date-p ()
"Return non-nil if the current parse tree is up to date."
- `(null semantic-parse-tree-state))
+ '(null semantic-parse-tree-state))
;;; Interfacing with the system
;;
'mouse-face 'custom-button-pressed-face
'tag tag
'action
- `(lambda (button)
- (let ((buff nil)
- (pnt nil))
- (save-excursion
- (semantic-go-to-tag
- (button-get button 'tag))
- (setq buff (current-buffer))
- (setq pnt (point)))
- (if (get-buffer-window buff)
- (select-window (get-buffer-window buff))
- (pop-to-buffer buff t))
- (goto-char pnt)
- (pulse-line-hook-function)))
+ (lambda (button)
+ (let ((buff nil)
+ (pnt nil))
+ (save-excursion
+ (semantic-go-to-tag
+ (button-get button 'tag))
+ (setq buff (current-buffer))
+ (setq pnt (point)))
+ (if (get-buffer-window buff)
+ (select-window (get-buffer-window buff))
+ (pop-to-buffer buff t))
+ (goto-char pnt)
+ (pulse-line-hook-function)))
))
(princ "\"")
(princ str)
"Return the current nonterminal symbol.
Part of the grammar source debugger. Depends on the existing
environment of `semantic-bovinate-stream'."
- `(if nt-stack
+ '(if nt-stack
(car (aref (car nt-stack) 2))
nonterminal))
TODO: use ffap.el to locate such items?
NOTE: Obsolete this, or use as special user")
-(make-variable-buffer-local `semantic-dependency-include-path)
+(make-variable-buffer-local 'semantic-dependency-include-path)
(defvar semantic-dependency-system-include-path nil
"Defines the system include path.
class include, this path will be inspected for includes of type
`system'. Some include tags are agnostic to this setting and will
check both the project and system directories.")
-(make-variable-buffer-local `semantic-dependency-system-include-path)
+(make-variable-buffer-local 'semantic-dependency-system-include-path)
(defmacro defcustom-mode-local-semantic-dependency-system-include-path
(mode name value &optional docstring)
;;
(defvar semantic-grammar-syntax-help
- `(
+ '(
;; Lexical Symbols
("symbol" . "Syntax: A symbol of alpha numeric and symbol characters")
("number" . "Syntax: Numeric characters.")
(defmacro wisent-log-buffer ()
"Return the log buffer.
Its name is defined in constant `wisent-log-buffer-name'."
- `(get-buffer-create wisent-log-buffer-name))
+ '(get-buffer-create wisent-log-buffer-name))
(defmacro wisent-clear-log ()
"Delete the entire contents of the log buffer."
- `(with-current-buffer (wisent-log-buffer)
+ '(with-current-buffer (wisent-log-buffer)
(erase-buffer)))
(defvar byte-compile-current-file)
"Expand call to SKIP-TOKEN grammar macro.
Return the form to skip the lookahead token.
See also the function `wisent-skip-token'."
- `(wisent-skip-token))
+ '(wisent-skip-token))
(defun wisent-grammar-assocs ()
"Return associativity and precedence level definitions."
])
"---"
'( "Insert ..." :filter srecode-minor-mode-templates-menu )
- `( "Generate ..." :filter srecode-minor-mode-generate-menu )
+ '( "Generate ..." :filter srecode-minor-mode-generate-menu )
"---"
- (semantic-menu-item
- ["Customize..."
- (customize-group "srecode")
- :active t
- :help "Customize SRecode options"
- ])
+ (semantic-menu-item
+ ["Customize..."
+ (customize-group "srecode")
+ :active t
+ :help "Customize SRecode options"
+ ])
(list
"Debugging Tools..."
(semantic-menu-item
:group 'custom-faces)
(defface custom-variable-tag
- `((((class color) (background dark))
+ '((((class color) (background dark))
:foreground "light blue" :weight bold)
(((min-colors 88) (class color) (background light))
:foreground "blue1" :weight bold)
(defun custom-hook-convert-widget (widget)
;; Handle `:options'.
(let* ((options (widget-get widget :options))
- (other `(editable-list :inline t
+ (other '(editable-list :inline t
:entry-format "%i %d%v"
(function :format " %v")))
(args (if options
(defmacro doc-view-current-page (&optional win)
`(image-mode-window-get 'page ,win))
-(defmacro doc-view-current-info () `(image-mode-window-get 'info))
-(defmacro doc-view-current-overlay () `(image-mode-window-get 'overlay))
-(defmacro doc-view-current-image () `(image-mode-window-get 'image))
-(defmacro doc-view-current-slice () `(image-mode-window-get 'slice))
+(defmacro doc-view-current-info () '(image-mode-window-get 'info))
+(defmacro doc-view-current-overlay () '(image-mode-window-get 'overlay))
+(defmacro doc-view-current-image () '(image-mode-window-get 'image))
+(defmacro doc-view-current-slice () '(image-mode-window-get 'slice))
(defun doc-view-last-page-number ()
(length doc-view--current-files))
"Convert PDF-PS to PNG asynchronously."
(funcall
(pcase doc-view-doc-type
- (`pdf doc-view-pdf->png-converter-function)
- (`djvu #'doc-view-djvu->tiff-converter-ddjvu)
+ ('pdf doc-view-pdf->png-converter-function)
+ ('djvu #'doc-view-djvu->tiff-converter-ddjvu)
(_ #'doc-view-ps->png-converter-ghostscript))
pdf-ps png nil
(let ((resolution doc-view-resolution))
"Convert the current document to text and call CALLBACK when done."
(make-directory (doc-view--current-cache-dir) t)
(pcase doc-view-doc-type
- (`pdf
+ ('pdf
;; Doc is a PDF, so convert it to TXT
(doc-view-pdf->txt doc-view--buffer-file-name txt callback))
- (`ps
+ ('ps
;; Doc is a PS, so convert it to PDF (which will be converted to
;; TXT thereafter).
(let ((pdf (doc-view-current-cache-doc-pdf)))
(doc-view-ps->pdf doc-view--buffer-file-name pdf
(lambda () (doc-view-pdf->txt pdf txt callback)))))
- (`dvi
+ ('dvi
;; Doc is a DVI. This means that a doc.pdf already exists in its
;; cache subdirectory.
(doc-view-pdf->txt (doc-view-current-cache-doc-pdf) txt callback))
- (`odf
+ ('odf
;; Doc is some ODF (or MS Office) doc. This means that a doc.pdf
;; already exists in its cache subdirectory.
(doc-view-pdf->txt (doc-view-current-cache-doc-pdf) txt callback))
(doc-view--current-cache-dir))))
(make-directory (doc-view--current-cache-dir) t)
(pcase doc-view-doc-type
- (`dvi
+ ('dvi
;; DVI files have to be converted to PDF before Ghostscript can process
;; it.
(let ((pdf (doc-view-current-cache-doc-pdf)))
(doc-view-dvi->pdf doc-view--buffer-file-name pdf
(lambda () (doc-view-pdf/ps->png pdf png-file)))))
- (`odf
+ ('odf
;; ODF files have to be converted to PDF before Ghostscript can
;; process it.
(let ((pdf (doc-view-current-cache-doc-pdf))
;; file name. It's named like the input file with the
;; extension replaced by pdf.
(funcall doc-view-odf->pdf-converter-function doc-view--buffer-file-name
- (lambda ()
- ;; Rename to doc.pdf
- (rename-file opdf pdf)
- (doc-view-pdf/ps->png pdf png-file)))))
- ((or `pdf `djvu)
+ (lambda ()
+ ;; Rename to doc.pdf
+ (rename-file opdf pdf)
+ (doc-view-pdf/ps->png pdf png-file)))))
+ ((or 'pdf 'djvu)
(let ((pages (doc-view-active-pages)))
;; Convert doc to bitmap images starting with the active pages.
(doc-view-document->bitmap doc-view--buffer-file-name png-file pages)))
"Find the right single-page converter for the current document type"
(pcase-let ((`(,conv-function ,type ,extension)
(pcase doc-view-doc-type
- (`djvu (list #'doc-view-djvu->tiff-converter-ddjvu 'tiff "tif"))
+ ('djvu (list #'doc-view-djvu->tiff-converter-ddjvu 'tiff "tif"))
(_ (list doc-view-pdf->png-converter-function 'png "png")))))
(setq-local doc-view-single-page-converter-function conv-function)
(setq-local doc-view--image-type type)
pos))
(forward-char))
;; Insert matching pair.
- ((and (memq syntax `(?\( ?\" ?\$))
+ ((and (memq syntax '(?\( ?\" ?\$))
(not overwrite-mode)
(or unconditional
(not (funcall electric-pair-inhibit-predicate
;; multiple times), but I'm not sure it's what we want.
;;
;; FIXME: check eolp before inserting \n?
- (`before (goto-char (1- pos)) (skip-chars-backward " \t")
+ ('before (goto-char (1- pos)) (skip-chars-backward " \t")
(unless (bolp) (insert "\n")))
- (`after (insert "\n"))
- (`after-stay (save-excursion
+ ('after (insert "\n"))
+ ('after-stay (save-excursion
(let ((electric-layout-rules nil))
(newline 1 t))))
- (`around (save-excursion
+ ('around (save-excursion
(goto-char (1- pos)) (skip-chars-backward " \t")
(unless (bolp) (insert "\n")))
(insert "\n"))) ; FIXME: check eolp before inserting \n?
(let* ((macrop (memq car '(defmacro cl-defmacro defmacro*)))
(name (nth 1 form))
(args (pcase car
- ((or `defun `defmacro
- `defun* `defmacro* `cl-defun `cl-defmacro
- `define-overloadable-function)
+ ((or 'defun 'defmacro
+ 'defun* 'defmacro* 'cl-defun 'cl-defmacro
+ 'define-overloadable-function)
(nth 2 form))
- (`define-skeleton '(&optional str arg))
- ((or `define-generic-mode `define-derived-mode
- `define-compilation-mode)
+ ('define-skeleton '(&optional str arg))
+ ((or 'define-generic-mode 'define-derived-mode
+ 'define-compilation-mode)
nil)
(_ t)))
(body (nthcdr (or (function-get car 'doc-string-elt) 3) form))
(gcs (make-symbol "gcs"))
(gc (make-symbol "gc"))
(code (byte-compile `(lambda () ,@forms)))
- (lambda-code (byte-compile `(lambda ()))))
+ (lambda-code (byte-compile '(lambda ()))))
`(let ((,gc gc-elapsed)
(,gcs gcs-done))
(list ,(if (or (symbolp repetitions) (> repetitions 1))
(setq fn (or (symbol-function name)
(cdr (assq name byte-compile-function-environment)))))
(pcase fn
- (`nil
+ ('nil
(byte-compile-warn "attempt to inline `%s' before it was defined"
name)
form)
(setq form (car (last (cdr form)))))
(cond ((consp form)
(pcase (car form)
- (`quote (cadr form))
+ ('quote (cadr form))
;; Can't use recursion in a defsubst.
;; (`progn (byte-compile-trueconstp (car (last (cdr form)))))
))
(setq form (car (last (cdr form)))))
(cond ((consp form)
(pcase (car form)
- (`quote (null (cadr form)))
+ ('quote (null (cadr form)))
;; Can't use recursion in a defsubst.
;; (`progn (byte-compile-nilconstp (car (last (cdr form)))))
))
(file-name-nondirectory source))))
(progn (cl-incf
(pcase (byte-recompile-file source force arg)
- (`no-byte-compile skip-count)
- (`t file-count)
+ ('no-byte-compile skip-count)
+ ('t file-count)
(_ fail-count)))
(or noninteractive
(message "Checking %s..." directory))
(cl-assert (listp fargs))
(while fargs
(pcase (car fargs)
- (`&optional (setq fargs (cdr fargs)))
- (`&rest (setq fmax2 (+ (* 2 (length dynbinds)) 1))
+ ('&optional (setq fargs (cdr fargs)))
+ ('&rest (setq fmax2 (+ (* 2 (length dynbinds)) 1))
(push (cadr fargs) dynbinds)
(setq fargs nil))
(_ (push (pop fargs) dynbinds))))
(not (memq var byte-compile-not-obsolete-vars))
(not (memq var byte-compile-global-not-obsolete-vars))
(or (pcase (nth 1 od)
- (`set (not (eq access-type 'reference)))
- (`get (eq access-type 'reference))
+ ('set (not (eq access-type 'reference)))
+ ('get (eq access-type 'reference))
(_ t)))))
(byte-compile-warn-obsolete var))))
arg)
;; `lam' is the lambda expression in `fun' (or nil if not
;; recognized).
- ((or `(,(or `quote `function) ,lam) (let lam nil))
+ ((or `(,(or 'quote 'function) ,lam) (let lam nil))
fun)
;; `arglist' is the list of arguments (or t if not recognized).
;; `body' is the body of `lam' (or t if not recognized).
(setq byte-compile-call-tree
(sort byte-compile-call-tree
(pcase byte-compile-call-tree-sort
- (`callers
+ ('callers
(lambda (x y) (< (length (nth 1 x))
- (length (nth 1 y)))))
- (`calls
+ (length (nth 1 y)))))
+ ('calls
(lambda (x y) (< (length (nth 2 x))
- (length (nth 2 y)))))
- (`calls+callers
+ (length (nth 2 y)))))
+ ('calls+callers
(lambda (x y) (< (+ (length (nth 1 x))
- (length (nth 2 x)))
- (+ (length (nth 1 y))
- (length (nth 2 y))))))
- (`name
+ (length (nth 2 x)))
+ (+ (length (nth 1 y))
+ (length (nth 2 y))))))
+ ('name
(lambda (x y) (string< (car x) (car y))))
(_ (error "`byte-compile-call-tree-sort': `%s' - unknown sort mode"
byte-compile-call-tree-sort))))))
;; so we never touch it(unless we enter to the other closure).
;;(if (listp form) (print (car form)) form)
(pcase form
- (`(,(and letsym (or `let* `let)) ,binders . ,body)
+ (`(,(and letsym (or 'let* 'let)) ,binders . ,body)
; let and let* special forms
(let ((binders-new '())
(`(function . ,_) form)
;defconst, defvar
- (`(,(and sym (or `defconst `defvar)) ,definedsymbol . ,forms)
+ (`(,(and sym (or 'defconst 'defvar)) ,definedsymbol . ,forms)
`(,sym ,definedsymbol
. ,(when (consp forms)
(cons (cconv-convert (car forms) env extend)
`((let ((,var (list ,var))) ,@body))))))
handlers))))
- (`(,(and head (or (and `catch (guard byte-compile--use-old-handlers))
- `unwind-protect))
+ (`(,(and head (or (and 'catch (guard byte-compile--use-old-handlers))
+ 'unwind-protect))
,form . ,body)
`(,head ,(cconv-convert form env extend)
:fun-body ,(cconv--convert-function () body env form)))
`(progn . ,(nreverse prognlist))
(car prognlist)))))
- (`(,(and (or `funcall `apply) callsym) ,fun . ,args)
+ (`(,(and (or 'funcall 'apply) callsym) ,fun . ,args)
;; These are not special forms but we treat them separately for the needs
;; of lambda lifting.
(let ((mapping (cdr (assq fun env))))
and updates the data stored in ENV."
(pcase form
; let special form
- (`(,(and (or `let* `let) letsym) ,binders . ,body-forms)
+ (`(,(and (or 'let* 'let) letsym) ,binders . ,body-forms)
(let ((orig-env env)
(newvars nil)
form "variable"))))
;; FIXME: The bytecode for unwind-protect forces us to wrap the unwind.
- (`(,(or (and `catch (guard byte-compile--use-old-handlers))
- `unwind-protect)
+ (`(,(or (and 'catch (guard byte-compile--use-old-handlers))
+ 'unwind-protect)
,form . ,body)
(cconv-analyze-form form env)
(cconv--analyze-function () body env form))
(`(defvar ,var) (push var byte-compile-bound-variables))
- (`(,(or `defconst `defvar) ,var ,value . ,_)
+ (`(,(or 'defconst 'defvar) ,var ,value . ,_)
(push var byte-compile-bound-variables)
(cconv-analyze-form value env))
- (`(,(or `funcall `apply) ,fun . ,args)
+ (`(,(or 'funcall 'apply) ,fun . ,args)
;; Here we ignore fun because funcall and apply are the only two
;; functions where we can pass a candidate for lambda lifting as
;; argument. So, if we see fun elsewhere, we'll delete it from
"Concatenate, into a sequence of type TYPE, the argument SEQUENCEs.
\n(fn TYPE SEQUENCE...)"
(pcase type
- (`vector (apply #'vconcat sequences))
- (`string (apply #'concat sequences))
- (`list (apply #'append (append sequences '(nil))))
+ ('vector (apply #'vconcat sequences))
+ ('string (apply #'concat sequences))
+ ('list (apply #'append (append sequences '(nil))))
(_ (error "Not a sequence type name: %S" type))))
;;; List functions.
(with-eval-after-load 'find-func
(defvar find-function-regexp-alist)
(add-to-list 'find-function-regexp-alist
- `(define-type . cl--typedef-regexp)))
+ '(define-type . cl--typedef-regexp)))
(define-button-type 'cl-help-type
:supertype 'help-function-def
(add-to-list 'find-function-regexp-alist
`(cl-defmethod . ,#'cl--generic-search-method))
(add-to-list 'find-function-regexp-alist
- `(cl-defgeneric . cl--generic-find-defgeneric-regexp)))
+ '(cl-defgeneric . cl--generic-find-defgeneric-regexp)))
(defun cl--generic-method-info (method)
(let* ((specializers (cl--generic-method-specializers method))
(push (nreverse block) blocks)
(setq block (list label-or-stmt))))
(unless (eq 'go (car-safe (car-safe block)))
- (push `(go cl--exit) block))
+ (push '(go cl--exit) block))
(push (nreverse block) blocks))
(let ((catch-tag (make-symbol "cl--tagbody-tag"))
(cl--tagbody-alist cl--tagbody-alist))
;; The behavior of CL made sense in a dynamically scoped
;; language, but nowadays, lexical scoping semantics is more often
;; expected.
- (`(,(or `let `let*) . ,(or `(,bindings . ,body) dontcare))
+ (`(,(or 'let 'let*) . ,(or `(,bindings . ,body) dontcare))
(let ((nbs ()) (found nil))
(dolist (binding bindings)
(let* ((var (if (symbolp binding) binding (car binding)))
(defun cl--defstruct-predicate (type)
(let ((cons (assq (cl-struct-sequence-type type)
- `((list . consp)
+ '((list . consp)
(vector . vectorp)
(nil . recordp)))))
(if cons
(put ',name 'cl-deftype-handler
(cl-function (lambda (&cl-defs ('*) ,@arglist) ,@body)))))
-(cl-deftype extended-char () `(and character (not base-char)))
+(cl-deftype extended-char () '(and character (not base-char)))
;;; Additional functions that we can now define because we've defined
;;; `cl-defsubst' and `cl-typep'.
"Insert a copyright by $ORGANIZATION notice at cursor."
"Company: "
comment-start
- "Copyright (C) " `(format-time-string "%Y") " by "
+ "Copyright (C) " '(format-time-string "%Y") " by "
(or (getenv "ORGANIZATION")
str)
'(if (copyright-offset-too-large-p)
(pcase (car args)
;; lambda is for debug-on-call when a function call is next.
;; debug is for debug-on-entry function called.
- ((or `lambda `debug)
+ ((or 'lambda 'debug)
(insert "--entering a function:\n"))
;; Exiting a function.
- (`exit
+ ('exit
(insert "--returning value: ")
(insert (backtrace-print-to-string debugger-value))
(insert ?\n))
;; Watchpoint triggered.
- ((and `watchpoint (let `(,symbol ,newval . ,details) (cdr args)))
+ ((and 'watchpoint (let `(,symbol ,newval . ,details) (cdr args)))
(insert
"--"
(pcase details
- (`(makunbound nil) (format "making %s void" symbol))
+ ('(makunbound nil) (format "making %s void" symbol))
(`(makunbound ,buffer) (format "killing local value of %s in buffer %s"
symbol buffer))
(`(defvaralias ,_) (format "aliasing %s to %s" symbol newval))
(`(let ,_) (format "let-binding %s to %s" symbol
(backtrace-print-to-string newval)))
(`(unlet ,_) (format "ending let-binding of %s" symbol))
- (`(set nil) (format "setting %s to %s" symbol
+ ('(set nil) (format "setting %s to %s" symbol
(backtrace-print-to-string newval)))
(`(set ,buffer) (format "setting %s in buffer %s to %s"
symbol buffer
": ")
(insert ?\n))
;; Debugger entered for an error.
- (`error
+ ('error
(insert "--Lisp error: ")
(insert (backtrace-print-to-string (nth 1 args)))
(insert ?\n))
;; debug-on-call, when the next thing is an eval.
- (`t
+ ('t
(insert "--beginning evaluation of function call form:\n"))
;; User calls debug directly.
(_
;; `no-applicable-method', which have slightly different calling
;; convention than their cl-generic counterpart.
(pcase method
- (`no-next-method
+ ('no-next-method
(setq method 'cl-no-next-method)
(setq specializers `(generic method ,@specializers))
(lambda (_generic _method &rest args) (apply code args)))
- (`no-applicable-method
+ ('no-applicable-method
(setq method 'cl-no-applicable-method)
(setq specializers `(generic ,@specializers))
(lambda (generic arg &rest args)
test
(ert-test-most-recent-result test))))
universe))
- (:unexpected (ert-select-tests `(not :expected) universe))
+ (:unexpected (ert-select-tests '(not :expected) universe))
((pred stringp)
(pcase-exhaustive universe
(`t (mapcar #'ert-get-test
;; Process `and'.
- (`(and) ; (and) -> t
- (cps--transform-1 t next-state))
+ ('(and) ; (and) -> t
+ (cps--transform-1 t next-state))
(`(and ,condition) ; (and CONDITION) -> CONDITION
(cps--transform-1 condition next-state))
(`(and ,condition . ,rest)
;; Process `cond': transform into `if' or `or' depending on the
;; precise kind of the condition we're looking at.
- (`(cond) ; (cond) -> nil
- (cps--transform-1 nil next-state))
+ ('(cond) ; (cond) -> nil
+ (cps--transform-1 nil next-state))
(`(cond (,condition) . ,rest)
(cps--transform-1 `(or ,condition (cond ,@rest))
next-state))
;; Process `progn' and `inline': they are identical except for the
;; name, which has some significance to the byte compiler.
- (`(inline) (cps--transform-1 nil next-state))
+ ('(inline) (cps--transform-1 nil next-state))
(`(inline ,form) (cps--transform-1 form next-state))
(`(inline ,form . ,rest)
(cps--transform-1 form
(cps--transform-1 `(inline ,@rest)
next-state)))
- (`(progn) (cps--transform-1 nil next-state))
+ ('(progn) (cps--transform-1 nil next-state))
(`(progn ,form) (cps--transform-1 form next-state))
(`(progn ,form . ,rest)
(cps--transform-1 form
;; Process `or'.
- (`(or) (cps--transform-1 nil next-state))
+ ('(or) (cps--transform-1 nil next-state))
(`(or ,condition) (cps--transform-1 condition next-state))
(`(or ,condition . ,rest)
(cps--transform-1
,(cps--make-close-iterator-form terminal-state)))))
(t (error "unknown iterator operation %S" op))))))
,(when finalizer-symbol
- `(funcall iterator
- :stash-finalizer
- (make-finalizer
- (lambda ()
- (iter-close iterator)))))
+ '(funcall iterator
+ :stash-finalizer
+ (make-finalizer
+ (lambda ()
+ (iter-close iterator)))))
iterator))))
(defun iter-yield (value)
`(error ,@args))
(defun inline--warning (&rest _args)
- `(throw 'inline--just-use
+ '(throw 'inline--just-use
;; FIXME: This would inf-loop by calling us right back when
;; macroexpand-all recurses to expand inline--form.
;; (macroexp--warn-and-return (format ,@args)
(cddr form))
(cdr form))
form))
- (`(,(or `defvar `defconst) . ,_) (macroexp--all-forms form 2))
+ (`(,(or 'defvar 'defconst) . ,_) (macroexp--all-forms form 2))
(`(function ,(and f `(lambda . ,_)))
(macroexp--cons 'function
(macroexp--cons (macroexp--all-forms f 2)
nil
(cdr form))
form))
- (`(,(or `function `quote) . ,_) form)
- (`(,(and fun (or `let `let*)) . ,(or `(,bindings . ,body) dontcare))
+ (`(,(or 'function 'quote) . ,_) form)
+ (`(,(and fun (or 'let 'let*)) . ,(or `(,bindings . ,body) dontcare))
(macroexp--cons fun
(macroexp--cons (macroexp--all-clauses bindings 1)
(macroexp--all-forms body)
;; here, so that any code that cares about the difference will
;; see the same transformation.
;; First arg is a function:
- (`(,(and fun (or `funcall `apply `mapcar `mapatoms `mapconcat `mapc))
+ (`(,(and fun (or 'funcall 'apply 'mapcar 'mapatoms 'mapconcat 'mapc))
',(and f `(lambda . ,_)) . ,args)
(macroexp--warn-and-return
(format "%s quoted with ' rather than with #'"
(list 'lambda (nth 1 f) '...))
(macroexp--expand-all `(,fun ,f . ,args))))
;; Second arg is a function:
- (`(,(and fun (or `sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args)
+ (`(,(and fun (or 'sort)) ,arg1 ',(and f `(lambda . ,_)) . ,args)
(macroexp--warn-and-return
(format "%s quoted with ' rather than with #'"
(list 'lambda (nth 1 f) '...))
"Bind each binding in BINDINGS as `macroexp-let2' does."
(declare (indent 2) (debug (sexp (&rest (sexp form)) body)))
(pcase-exhaustive bindings
- (`nil (macroexp-progn body))
+ ('nil (macroexp-progn body))
(`((,var ,exp) . ,tl)
`(macroexp-let2 ,test ,var ,exp
(macroexp-let2* ,test ,tl ,@body)))))
TYPE can be one of the following symbols: list or hash-table.
MAP can be a list, hash-table or array."
(pcase type
- (`list (map-pairs map))
- (`hash-table (map--into-hash-table map))
+ ('list (map-pairs map))
+ ('hash-table (map--into-hash-table map))
(_ (error "Not a map type name: %S" type))))
(defun map--put (map key v)
(split-version (package-desc-version pkg-desc))
(commentary
(pcase file-type
- (`single (lm-commentary))
- (`tar nil))) ;; FIXME: Get it from the README file.
+ ('single (lm-commentary))
+ ('tar nil))) ;; FIXME: Get it from the README file.
(extras (package-desc-extras pkg-desc))
(pkg-version (package-version-join split-version))
(pkg-buffer (current-buffer)))
(defun package-desc-suffix (pkg-desc)
(pcase (package-desc-kind pkg-desc)
- (`single ".el")
- (`tar ".tar")
- (`dir "")
+ ('single ".el")
+ ('tar ".tar")
+ ('dir "")
(kind (error "Unknown package kind: %s" kind))))
(defun package-desc--keywords (pkg-desc)
(dirname (package-desc-full-name pkg-desc))
(pkg-dir (expand-file-name dirname package-user-dir)))
(pcase (package-desc-kind pkg-desc)
- (`dir
+ ('dir
(make-directory pkg-dir t)
(let ((file-list
(directory-files
;; things simple by ensuring we're one of them.
(setf (package-desc-kind pkg-desc)
(if (> (length file-list) 1) 'tar 'single))))
- (`tar
+ ('tar
(make-directory package-user-dir t)
;; FIXME: should we delete PKG-DIR if it exists?
(let* ((default-directory (file-name-as-directory package-user-dir)))
(package-untar-buffer dirname)))
- (`single
+ ('single
(let ((el-file (expand-file-name (format "%s.el" name) pkg-dir)))
(make-directory pkg-dir t)
(package--write-file-no-coding el-file)))
(easy-menu-define package-menu-mode-menu package-menu-mode-map
"Menu for `package-menu-mode'."
- `("Package"
+ '("Package"
["Describe Package" package-menu-describe-package :help "Display information about this package"]
["Help" package-menu-quick-help :help "Show short key binding help for package-menu-mode"]
"--"
(cmp (compare-strings prefix nil nil key i ni)))
(if (eq t cmp)
(pcase (radix-tree--remove ptree key ni)
- (`nil rtree)
+ ('nil rtree)
(`((,pprefix . ,pptree))
`((,(concat prefix pprefix) . ,pptree) . ,rtree))
(nptree `((,prefix . ,nptree) . ,rtree)))
(setq y (cons nil (cons nil nil)))
(push (cons (cdr k) y) table))
(pcase v
- (`= (push (cons x y) eqs))
- (`< (push (cons x y) csts))
- (`> (push (cons y x) csts))
+ ('= (push (cons x y) eqs))
+ ('< (push (cons x y) csts))
+ ('> (push (cons y x) csts))
(_ (error "SMIE error: prec2 has %S↦%S which ∉ {<,+,>}"
k v))))))
prec2)
(dolist (x (gethash :smie-open/close-alist prec2))
(let* ((token (car x))
(cons (pcase (cdr x)
- (`closer (cddr (assoc token table)))
- (`opener (cdr (assoc token table))))))
+ ('closer (cddr (assoc token table)))
+ ('opener (cdr (assoc token table))))))
;; `cons' can be nil for openers/closers which only contain
;; "atomic" elements.
(when cons
(erase-buffer)
(insert (format
(pcase (epg-context-operation context)
- (`decrypt "Error while decrypting with \"%s\":")
- (`verify "Error while verifying with \"%s\":")
- (`sign "Error while signing with \"%s\":")
- (`encrypt "Error while encrypting with \"%s\":")
- (`import-keys "Error while importing keys with \"%s\":")
- (`export-keys "Error while exporting keys with \"%s\":")
+ ('decrypt "Error while decrypting with \"%s\":")
+ ('verify "Error while verifying with \"%s\":")
+ ('sign "Error while signing with \"%s\":")
+ ('encrypt "Error while encrypting with \"%s\":")
+ ('import-keys "Error while importing keys with \"%s\":")
+ ('export-keys "Error while exporting keys with \"%s\":")
(_ "Error while executing \"%s\":\n\n"))
(epg-context-program context))
"\n\n"
(when (fboundp 'make-network-process) '("send"))))
(pcomplete-here
(pcase (intern (downcase (pcomplete-arg 1)))
- (`chat (mapcar (lambda (elt) (plist-get elt :nick))
+ ('chat (mapcar (lambda (elt) (plist-get elt :nick))
(erc-remove-if-not
#'(lambda (elt)
(eq (plist-get elt :type) 'CHAT))
erc-dcc-list)))
- (`close (erc-delete-dups
+ ('close (erc-delete-dups
(mapcar (lambda (elt) (symbol-name (plist-get elt :type)))
erc-dcc-list)))
- (`get (mapcar #'erc-dcc-nick
+ ('get (mapcar #'erc-dcc-nick
(erc-remove-if-not
#'(lambda (elt)
(eq (plist-get elt :type) 'GET))
erc-dcc-list)))
- (`send (pcomplete-erc-all-nicks))))
+ ('send (pcomplete-erc-all-nicks))))
(pcomplete-here
(pcase (intern (downcase (pcomplete-arg 2)))
- (`get (mapcar (lambda (elt) (plist-get elt :file))
+ ('get (mapcar (lambda (elt) (plist-get elt :file))
(erc-remove-if-not
#'(lambda (elt)
(and (eq (plist-get elt :type) 'GET)
(plist-get elt :nick))
(pcomplete-arg 1))))
erc-dcc-list)))
- (`close (mapcar #'erc-dcc-nick
+ ('close (mapcar #'erc-dcc-nick
(erc-remove-if-not
#'(lambda (elt)
(eq (plist-get elt :type)
(intern (upcase (pcomplete-arg 1)))))
erc-dcc-list)))
- (`send (pcomplete-entries)))))
+ ('send (pcomplete-entries)))))
(defun erc-dcc-do-CHAT-command (proc &optional nick)
(when nick
offset)
(when (< arg 0)
(setq dir (pcase dir
- (`oldest 'newest)
- (`newest 'oldest)
- (`mostactive 'leastactive)
- (`leastactive 'mostactive)
- (`importance 'oldest)))
+ ('oldest 'newest)
+ ('newest 'oldest)
+ ('mostactive 'leastactive)
+ ('leastactive 'mostactive)
+ ('importance 'oldest)))
(setq arg (- arg)))
(setq offset (pcase dir
- ((or `oldest `leastactive)
+ ((or 'oldest 'leastactive)
(- (length erc-modified-channels-alist) arg))
(_ (1- arg))))
;; normalize out of range user input
(defun erc-setup-buffer (buffer)
"Consults `erc-join-buffer' to find out how to display `BUFFER'."
(pcase erc-join-buffer
- (`window
+ ('window
(if (active-minibuffer-window)
(display-buffer buffer)
(switch-to-buffer-other-window buffer)))
- (`window-noselect
+ ('window-noselect
(display-buffer buffer))
- (`bury
+ ('bury
nil)
- (`frame
+ ('frame
(when (or (not erc-reuse-frames)
(not (get-buffer-window buffer t)))
(let ((frame (make-frame (or erc-frame-alist
"ls" (if eshell-ls-initial-args
(list eshell-ls-initial-args args)
args)
- `((?a "all" nil show-all
+ '((?a "all" nil show-all
"do not ignore entries starting with .")
(?A "almost-all" nil show-almost-all
"do not list implied . and ..")
;; The last process in the pipe should get its handles
;; redirected as we found them before running the pipe.
,(if (null (cdr pipeline))
- `(progn
+ '(progn
(setq eshell-current-handles tail-handles)
(setq eshell-in-pipeline-p nil)))
(let ((result ,(car pipeline)))
(file-attributes (file-chase-links file)))))))"
:group 'files
:version "24.1"
- :type `(choice
+ :type '(choice
(const :tag "Do not inhibit file name cache" nil)
(const :tag "Do not use file name cache" t)
(integer :tag "Do not use file name cache"
If VAR is `mode', call `VAL-mode' as a function unless it's
already the major mode."
(pcase var
- (`mode
+ ('mode
(let ((mode (intern (concat (downcase (symbol-name val))
"-mode"))))
(unless (eq (indirect-function mode)
(indirect-function major-mode))
(funcall mode))))
- (`eval
+ ('eval
(pcase val
(`(add-hook ',hook . ,_) (hack-one-local-variable--obsolete hook)))
(save-excursion (eval val)))
(setcar pair (file-name-unquote (car pair) t))))
(setq file-arg-indices (cdr file-arg-indices))))
(pcase method
- (`identity (car arguments))
- (`add (file-name-quote (apply operation arguments) t))
- (`buffer-file-name
+ ('identity (car arguments))
+ ('add (file-name-quote (apply operation arguments) t))
+ ('buffer-file-name
(let ((buffer-file-name (file-name-unquote buffer-file-name t)))
(apply operation arguments)))
- (`insert-file-contents
+ ('insert-file-contents
(let ((visit (nth 1 arguments)))
(unwind-protect
(apply operation arguments)
(when (and visit buffer-file-name)
(setq buffer-file-name (file-name-quote buffer-file-name t))))))
- (`unquote-then-quote
+ ('unquote-then-quote
;; We can't use `cl-letf' with `(buffer-local-value)' here
;; because it wouldn't work during bootstrapping.
(let ((buffer (current-buffer)))
;; underlying operation.
(with-current-buffer buffer
(apply operation arguments))))))
- (`local-copy
+ ('local-copy
(let* ((file-name-handler-alist saved-file-name-handler-alist)
(source (car arguments))
(target (car (cdr arguments)))
:group 'filesets)
(defcustom filesets-commands
- `(("Isearch"
+ '(("Isearch"
multi-isearch-files
(filesets-cmd-isearch-getargs))
("Isearch (regexp)"
(filesets-get-external-viewer filename)))))
(filesets-alist-get def
(pcase event
- (`on-open-all ':ignore-on-open-all)
- (`on-grep ':ignore-on-read-text)
- (`on-cmd nil)
- (`on-close-all nil))
+ ('on-open-all ':ignore-on-open-all)
+ ('on-grep ':ignore-on-read-text)
+ ('on-cmd nil)
+ ('on-close-all nil))
nil t)))
(defun filesets-filetype-get-prop (property filename &optional entry)
(defun font-lock-turn-on-thing-lock ()
(pcase (font-lock-value-in-major-mode font-lock-support-mode)
- (`fast-lock-mode (fast-lock-mode t))
- (`lazy-lock-mode (lazy-lock-mode t))
- (`jit-lock-mode
+ ('fast-lock-mode (fast-lock-mode t))
+ ('lazy-lock-mode (lazy-lock-mode t))
+ ('jit-lock-mode
;; Prepare for jit-lock
(remove-hook 'after-change-functions
#'font-lock-after-change-function t)
;; of a frameset, so we must copy parameters to avoid inadvertent
;; modifications.
(pcase (cdr (assq (car current) filter-alist))
- (`nil
+ ('nil
(push (if saving current (copy-tree current)) filtered))
(:never
nil)
(< fr-right left) (> fr-right right)
(< fr-top top) (> fr-top bottom)))
;; Displaced to the left, right, above or below the screen.
- (`t (or (> fr-left right)
+ ('t (or (> fr-left right)
(< fr-right left)
(> fr-top bottom)
(< fr-bottom top)))
;; will decide which ones can be reused, and how to deal with any leftover.
(frameset--reuse-list
(pcase reuse-frames
- (`t
+ ('t
frames)
- (`nil
+ ('nil
nil)
- (`match
+ ('match
(cl-loop for (state) in (frameset-states frameset)
when (frameset-frame-with-id (frameset-cfg-id state) frames)
collect it))
;; iconify frames
(lambda (frame action)
(pcase action
- (`rejected (iconify-frame frame))
+ ('rejected (iconify-frame frame))
;; In the unexpected case that a frame was a candidate
;; (matching frame id) and yet not restored, remove it
;; because it is in fact a duplicate.
- (`ignored (delete-frame frame))))))
+ ('ignored (delete-frame frame))))))
;; Restore selected frame, buffer and point.
(let ((frame (frameset-frame-with-id (aref data 1)))
(defvar gnus-tmp-groups)
(defvar gnus-category-line-format-alist
- `((?c gnus-tmp-name ?s)
+ '((?c gnus-tmp-name ?s)
(?g gnus-tmp-groups ?d)))
(defvar gnus-category-mode-line-format-alist
- `((?u user-defined ?s)))
+ '((?u user-defined ?s)))
(defvar gnus-category-line-format-spec nil)
(defvar gnus-category-mode-line-format-spec nil)
"String or function to be executed to display an X-Face header.
If it is a string, the command will be executed in a sub-shell
asynchronously. The compressed face will be piped to this command."
- :type `(choice string
+ :type '(choice string
(function-item gnus-display-x-face-in-from)
function)
:version "21.1"
"`----\n"))
(setcdr data
(cdr (mm-make-handle
- nil `("text/plain" (charset . gnus-decoded)) nil nil
+ nil '("text/plain" (charset . gnus-decoded)) nil nil
(list "attachment")
(format "Deleted attachment (%s bytes)" bsize))))))
;; (set-buffer gnus-summary-buffer)
;; TAG: Is a Supercite tag, if any.
(defvar gnus-cited-opened-text-button-line-format-alist
- `((?b (marker-position beg) ?d)
+ '((?b (marker-position beg) ?d)
(?e (marker-position end) ?d)
(?n (count-lines beg end) ?d)
(?l (- end beg) ?d)))
(point)
(progn (eval gnus-cited-closed-text-button-line-format-spec)
(point))
- `gnus-article-toggle-cited-text
+ 'gnus-article-toggle-cited-text
(list (cons beg end) start))
(point))
'article-type 'annotation)
gnus-cited-opened-text-button-line-format-spec
gnus-cited-closed-text-button-line-format-spec))
(point))
- `gnus-article-toggle-cited-text
+ 'gnus-article-toggle-cited-text
args)
(point))
'article-type 'annotation)))))
(defvar gnus-tmp-number-of-unread)
(defvar gnus-group-line-format-alist
- `((?M gnus-tmp-marked-mark ?c)
+ '((?M gnus-tmp-marked-mark ?c)
(?S gnus-tmp-subscribed ?c)
(?L gnus-tmp-level ?d)
(?N (cond ((eq number t) "*" )
))
(defvar gnus-group-mode-line-format-alist
- `((?S gnus-tmp-news-server ?s)
+ '((?S gnus-tmp-news-server ?s)
(?M gnus-tmp-news-method ?s)
(?u gnus-tmp-user-defined ?s)
(?: gnus-tmp-colon ?s)))
(easy-menu-define
gnus-group-reading-menu gnus-group-mode-map ""
- `("Group"
+ '("Group"
["Read" gnus-group-read-group
:included (not (gnus-topic-mode-p))
:active (gnus-group-group-name)]
(easy-menu-define
gnus-group-misc-menu gnus-group-mode-map ""
- `("Gnus"
+ '("Gnus"
["Send a mail" gnus-group-mail t]
["Send a message (mail or news)" gnus-group-post-news t]
["Create a local message" gnus-group-news t]
(X-Debbugs-Version
. ,(format "%s" (gnus-continuum-version))))))
(when gnus-bug-create-help-buffer
- (push `(gnus-bug-kill-buffer) message-send-actions))
+ (push '(gnus-bug-kill-buffer) message-send-actions))
(goto-char (point-min))
(message-goto-body)
(insert "\n\n\n\n\n")
(defvar gnus-tmp-subject)
(defvar gnus-tree-line-format-alist
- `((?n gnus-tmp-name ?s)
+ '((?n gnus-tmp-name ?s)
(?f gnus-tmp-from ?s)
(?N gnus-tmp-number ?d)
(?\[ gnus-tmp-open-bracket ?c)
(defvar gnus-inserted-opened-servers nil)
(defvar gnus-server-line-format-alist
- `((?h gnus-tmp-how ?s)
+ '((?h gnus-tmp-how ?s)
(?n gnus-tmp-name ?s)
(?w gnus-tmp-where ?s)
(?s gnus-tmp-status ?s)
(?c gnus-tmp-cloud ?s)))
(defvar gnus-server-mode-line-format-alist
- `((?S gnus-tmp-news-server ?s)
+ '((?S gnus-tmp-news-server ?s)
(?M gnus-tmp-news-method ?s)
(?u gnus-tmp-user-defined ?s)))
(let ((info (gnus-server-to-method server)))
(gnus-edit-form
info "Showing the server."
- `(lambda (form)
- (gnus-server-position-point))
+ (lambda (form)
+ (gnus-server-position-point))
'edit-server)))
(defun gnus-server-scan-server (server)
the type of the variable (string, integer, character, etc).")
(defvar gnus-summary-dummy-line-format-alist
- `((?S gnus-tmp-subject ?s)
+ '((?S gnus-tmp-subject ?s)
(?N gnus-tmp-number ?d)
(?u gnus-tmp-user-defined ?s)))
(defvar gnus-summary-mode-line-format-alist
- `((?G gnus-tmp-group-name ?s)
+ '((?G gnus-tmp-group-name ?s)
(?g (gnus-short-group-name gnus-tmp-group-name) ?s)
(?p (gnus-group-real-name gnus-tmp-group-name) ?s)
(?A gnus-tmp-article-number ?d)
(easy-menu-define
gnus-summary-post-menu gnus-summary-mode-map ""
- `("Post"
+ '("Post"
["Send a message (mail or news)" gnus-summary-post-news
:help "Compose a new message (mail or news)"]
["Followup" gnus-summary-followup
(easy-menu-define
gnus-summary-misc-menu gnus-summary-mode-map ""
- `("Gnus"
+ '("Gnus"
("Mark Read"
["Mark as read" gnus-summary-mark-as-read-forward t]
["Mark same subject and select"
(defvar gnus-topic-inhibit-change-level nil)
(defconst gnus-topic-line-format-alist
- `((?n name ?s)
+ '((?n name ?s)
(?v visible ?s)
(?i indentation ?s)
(?g number-of-groups ?d)
"Function use to do completing read."
:version "24.1"
:group 'gnus-meta
- :type `(radio (function-item
+ :type '(radio (function-item
:doc "Use Emacs standard `completing-read' function."
gnus-emacs-completing-read)
(function-item
(defun gnus-suppress-keymap (keymap)
(suppress-keymap keymap)
- (let ((keys `([delete] "\177" "\M-u"))) ;[mouse-2]
+ (let ((keys '([delete] "\177" "\M-u"))) ;[mouse-2]
(while keys
(define-key keymap (pop keys) 'undefined))))
"Alist of header names/filler functions.")
(defvar message-header-format-alist
- `((From)
+ '((From)
(Newsgroups)
(To)
(Cc)
(easy-menu-define
message-mode-menu message-mode-map "Message Menu."
- `("Message"
+ '("Message"
["Yank Original" message-yank-original message-reply-buffer]
["Fill Yanked Message" message-fill-yanked-message t]
["Insert Signature" message-insert-signature t]
(easy-menu-define
message-mode-field-menu message-mode-map ""
- `("Field"
+ '("Field"
["To" message-goto-to t]
["From" message-goto-from t]
["Subject" message-goto-subject t]
;; Consider there is no illegible text.
(add-text-properties
b (point)
- `(no-illegible-text t rear-nonsticky t start-open t))))
+ '(no-illegible-text t rear-nonsticky t start-open t))))
(defun message-forward-make-body-mml (forward-buffer)
(insert "\n\n<#mml type=message/rfc822 disposition=inline>\n")
(widget-convert
'list
`(set :inline t :format "%v" ,@(nreverse rest))
- `(repeat :inline t :tag "Other options"
+ '(repeat :inline t :tag "Other options"
(cons :format "%v"
(symbol :size 3 :format "(%v")
(symbol :size 3 :format " . %v)\n")))))))
(easy-menu-define
mml-menu mml-mode-map ""
- `("Attachments"
+ '("Attachments"
["Attach File..." mml-attach-file :help "Attach a file at point"]
["Attach Buffer..." mml-attach-buffer
:help "Attach a buffer to the outgoing message"]
`(let ((id (nnheader-nov-field)))
(if (string-match "^<[^>]+>$" id)
,(if nnheader-uniquify-message-id
- `(if (string-match "__[^@]+@" id)
+ '(if (string-match "__[^@]+@" id)
(concat (substring id 0 (match-beginning 0))
(substring id (1- (match-end 0))))
id)
;; We don't really care about the article number, because
;; that's determined by the IMAP server later. So just
;; return the group name.
- `(lambda (group)
- (list (list group)))))))
+ (lambda (group)
+ (list (list group)))))))
(setq group (nnimap-decode-gnus-group group))
(when (nnimap-change-group nil server)
(nnmail-check-syntax)
(setq versionstring
(let* ((commandsplit (split-string nnmairix-mairix-command))
(args (append (list (car commandsplit))
- `(nil t nil) (cdr commandsplit) '("-V"))))
+ '(nil t nil) (cdr commandsplit) '("-V"))))
(apply 'call-process args)
(goto-char (point-min))
(re-search-forward "mairix.*")
(apply 'call-process-region
(point-min) (point-max) spam-ifile-program
nil temp-buffer-name nil "-c"
- (if db-param `(,db-param "-q") `("-q"))))
+ (if db-param `(,db-param "-q") '("-q"))))
;; check the return now (we're back in the temp buffer)
(goto-char (point-min))
(if (not (eobp))
(point-min) (point-max) spam-ifile-program
nil nil nil
add-or-delete-option category
- (if db `(,db "-h") `("-h"))))))
+ (if db `(,db "-h") '("-h"))))))
(defun spam-ifile-register-spam-routine (articles &optional unregister)
(spam-ifile-register-with-ifile articles spam-ifile-spam-category unregister))
(point-min) (point-max)
spam-bogofilter-program
nil temp-buffer-name nil
- (if db `("-d" ,db "-v") `("-v"))))
+ (if db `("-d" ,db "-v") '("-v"))))
(setq return (spam-check-bogofilter-headers score))))
return)
(gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions")))
(point-min) (point-max)
spam-bogofilter-program
nil nil nil switch
- (if db `("-d" ,db "-v") `("-v")))))))
+ (if db `("-d" ,db "-v") '("-v")))))))
(gnus-error 5 "`spam.el' doesn't support obsolete bogofilter versions")))
(defun spam-bogofilter-register-spam-routine (articles &optional unregister)
;; startup stuff.
(easy-menu-define hexl-menu hexl-mode-map "Hexl Mode menu"
- `("Hexl"
+ '("Hexl"
:help "Hexl-specific Features"
["Backward short" hexl-backward-short
(x-popup-menu
t
(cons
- `keymap
+ 'keymap
(cons "Select Pattern to Unhighlight"
(mapcar (lambda (pattern)
(list (car pattern)
(not
(not
(pcase (car filter)
- (`or
+ ('or
;;; ATTN: Short-circuiting alternative with parallel structure w/`and
;;(catch 'has-match
;; (dolist (filter-spec (cdr filter) nil)
(memq t (mapcar #'(lambda (x)
(ibuffer-included-in-filter-p buf x))
(cdr filter))))
- (`and
+ ('and
(catch 'no-match
(dolist (filter-spec (cdr filter) t)
(unless (ibuffer-included-in-filter-p buf filter-spec)
(throw 'no-match nil)))))
- (`saved
+ ('saved
(let ((data (assoc (cdr filter) ibuffer-saved-filters)))
(unless data
(ibuffer-filter-disable t)
(tail (cdr filters))
(value
(pcase (caar filters)
- ((or `or 'and) (nconc head tail))
- (`saved
+ ((or 'or 'and) (nconc head tail))
+ ('saved
(let ((data (assoc head ibuffer-saved-filters)))
(unless data
(ibuffer-filter-disable)
(error "Unknown saved filter %s" head))
(append (cdr data) tail)))
- (`not (cons (ibuffer-unary-operand (car filters)) tail))
+ ('not (cons (ibuffer-unary-operand (car filters)) tail))
(_
(error "Filter type %s is not compound" (caar filters))))))
(setq ibuffer-filtering-qualifiers value))
(defun ibuffer-format-qualifier-1 (qualifier)
(pcase (car qualifier)
- (`saved
+ ('saved
(concat " [filter: " (cdr qualifier) "]"))
- (`or
+ ('or
(concat " [OR" (mapconcat #'ibuffer-format-qualifier
(cdr qualifier) "") "]"))
- (`and
+ ('and
(concat " [AND" (mapconcat #'ibuffer-format-qualifier
(cdr qualifier) "") "]"))
(_
:group 'ibuffer)
(defcustom ibuffer-fontification-alist
- `((10 buffer-read-only font-lock-constant-face)
+ '((10 buffer-read-only font-lock-constant-face)
(15 (and buffer-file-name
(string-match ibuffer-compressed-file-name-regexp
buffer-file-name))
`(truncate-string-to-width ,strvar ,maxvar nil ?\s)))
(defun ibuffer-compile-make-format-form (strvar widthform alignment)
- (let* ((left `(make-string tmp2 ?\s))
- (right `(make-string (- tmp1 tmp2) ?\s)))
+ (let* ((left '(make-string tmp2 ?\s))
+ (right '(make-string (- tmp1 tmp2) ?\s)))
`(progn
(setq tmp1 ,widthform
tmp2 (/ tmp1 2))
outforms)
(push `(setq str ,callform
,@(when strlen-used
- `(strlen (string-width str))))
+ '(strlen (string-width str))))
outforms)
(setq outforms
(append outforms
strname
(propertize strname 'mouse-face 'highlight 'keymap hmap)))
strname)))))
- (add-text-properties opos (point) `(ibuffer-title-header t))
+ (add-text-properties opos (point) '(ibuffer-title-header t))
(insert "\n")
;; Add the underlines
(let ((str (save-excursion
align)
summary))))))
(point))
- `(ibuffer-summary t)))))
+ '(ibuffer-summary t)))))
(defun ibuffer-redisplay (&optional silent)
(when viper-p
(define-key map [remap viper-intercept-ESC-key] 'ignore))
(pcase ido-cur-item
- ((or `file `dir)
- (when ido-context-switch-command
- (define-key map "\C-x\C-b" ido-context-switch-command)
- (define-key map "\C-x\C-d" 'ignore))
- (when viper-p
- (define-key map [remap viper-backward-char]
- 'ido-delete-backward-updir)
- (define-key map [remap viper-del-backward-char-in-insert]
- 'ido-delete-backward-updir)
- (define-key map [remap viper-delete-backward-word]
- 'ido-delete-backward-word-updir))
- (set-keymap-parent map
- (if (eq ido-cur-item 'file)
- ido-file-completion-map
- ido-file-dir-completion-map)))
- (`buffer
- (when ido-context-switch-command
- (define-key map "\C-x\C-f" ido-context-switch-command))
- (set-keymap-parent map ido-buffer-completion-map))
- (_
- (set-keymap-parent map ido-common-completion-map)))
+ ((or 'file 'dir)
+ (when ido-context-switch-command
+ (define-key map "\C-x\C-b" ido-context-switch-command)
+ (define-key map "\C-x\C-d" 'ignore))
+ (when viper-p
+ (define-key map [remap viper-backward-char]
+ 'ido-delete-backward-updir)
+ (define-key map [remap viper-del-backward-char-in-insert]
+ 'ido-delete-backward-updir)
+ (define-key map [remap viper-delete-backward-word]
+ 'ido-delete-backward-word-updir))
+ (set-keymap-parent map
+ (if (eq ido-cur-item 'file)
+ ido-file-completion-map
+ ido-file-dir-completion-map)))
+ ('buffer
+ (when ido-context-switch-command
+ (define-key map "\C-x\C-f" ido-context-switch-command))
+ (set-keymap-parent map ido-buffer-completion-map))
+ (_
+ (set-keymap-parent map ido-common-completion-map)))
(setq ido-completion-map map)))
(defun ido-final-slash (dir &optional fix-it)
(user-error "No menu in this node"))
(cond
((eq (car-safe action) 'boundaries) nil)
- ((eq action 'metadata) `(metadata (category . info-menu)))
+ ((eq action 'metadata) '(metadata (category . info-menu)))
((eq action 'lambda)
(re-search-forward
(concat "\n\\* +" (regexp-quote string) ":") nil t))
`toggle-input-method' (\\[toggle-input-method])."
:link '(custom-manual "(emacs)Input Methods")
:group 'mule
- :type `(choice (const nil)
+ :type '(choice (const nil)
mule-input-method-string)
:set-after '(current-language-environment))
(set-language-info-alist (car elt) (cdr elt)))
;; re-set the environment in case its parameters changed
(set-language-environment current-language-environment)))
- :type `(alist
+ :type '(alist
:key-type (string :tag "Language environment"
:completions
(lambda (string pred action)
japanese-cp932 korean-cp949)))
(setq type 'single-byte))
(pcase type
- (`utf-8
+ ('utf-8
(when (coding-system-get coding-system :bom)
(setq byte (max 0 (- byte 3))))
(if (= eol 1)
(filepos-to-bufferpos--dos (+ pm byte) #'byte-to-position)
(byte-to-position (+ pm byte))))
- (`single-byte
+ ('single-byte
(if (= eol 1)
(filepos-to-bufferpos--dos (+ pm byte) #'identity)
(+ pm byte)))
- ((and `utf-16
+ ((and 'utf-16
;; FIXME: For utf-16, we could use the same approach as used for
;; dos EOLs (counting the number of non-BMP chars instead of the
;; number of lines).
(+ pm byte)))
(_
(pcase quality
- (`approximate (byte-to-position (+ pm byte)))
- (`exact
+ ('approximate (byte-to-position (+ pm byte)))
+ ('exact
;; Rather than assume that the file exists and still holds the right
;; data, we reconstruct it based on the buffer's content.
(let ((buf (current-buffer)))
japanese-cp932 korean-cp949)))
(setq type 'single-byte))
(pcase type
- (`utf-8
+ ('utf-8
(setq byte (position-bytes position))
(when (null byte)
(if (<= position 0)
(if (coding-system-get coding-system :bom) 3 0)
;; Account for CR in CRLF pairs.
lineno))
- (`single-byte
+ ('single-byte
(+ position -1 lineno))
- ((and `utf-16
+ ((and 'utf-16
;; FIXME: For utf-16, we could use the same approach as used for
;; dos EOLs (counting the number of non-BMP chars instead of the
;; number of lines).
lineno))
(_
(pcase quality
- (`approximate (+ (position-bytes position) -1 lineno))
- (`exact
+ ('approximate (+ (position-bytes position) -1 lineno))
+ ('exact
;; Rather than assume that the file exists and still holds the right
;; data, we reconstruct its relevant portion.
(let ((buf (current-buffer)))
;; Skip over the "}"
(json-advance)
(pcase json-object-type
- (`alist (nreverse elements))
- (`plist (json--plist-reverse elements))
+ ('alist (nreverse elements))
+ ('plist (json--plist-reverse elements))
(_ elements))))
;; Hash table encoding
;; Skip over the "]"
(json-advance)
(pcase json-array-type
- (`vector (nreverse (vconcat elements)))
- (`list (nreverse elements)))))
+ ('vector (nreverse (vconcat elements)))
+ ('list (nreverse elements)))))
;; Array encoding
(cdr oops))
"Internal error")))))
(error
- `(:error (:code -32603 :message "Internal error"))))))
+ '(:error (:code -32603 :message "Internal error"))))))
(apply #'jsonrpc--reply connection id reply)))
(;; A remote notification
method
;; Call all outstanding error handlers
(maphash (lambda (_id triplet)
(pcase-let ((`(,_success ,error ,_timeout) triplet))
- (funcall error `(:code -1 :message "Server died"))))
+ (funcall error '(:code -1 :message "Server died"))))
(jsonrpc--request-continuations connection))
(jsonrpc--message "Server exited with status %s" (process-exit-status proc))
(process-put proc 'jsonrpc-sentinel-done t)
(define-coding-system-alias 'cp878 'cyrillic-koi8)
(set-language-info-alist
- "Cyrillic-KOI8" `((charset koi8)
+ "Cyrillic-KOI8" '((charset koi8)
(coding-system cyrillic-koi8)
(coding-priority cyrillic-koi8 cyrillic-iso-8bit)
(ctext-non-standard-encodings "koi8-r")
:mime-charset 'koi8-u)
(set-language-info-alist
- "Ukrainian" `((charset koi8-u)
+ "Ukrainian" '((charset koi8-u)
(coding-system koi8-u)
(coding-priority koi8-u)
(nonascii-translation . koi8-u)
(define-coding-system-alias 'alternativnyj 'cyrillic-alternativnyj)
(set-language-info-alist
- "Cyrillic-ALT" `((charset alternativnyj)
+ "Cyrillic-ALT" '((charset alternativnyj)
(coding-system cyrillic-alternativnyj)
(coding-priority cyrillic-alternativnyj)
(nonascii-translation . alternativnyj)
;; '("Cyrillic"))
(set-language-info-alist
- "Tajik" `((coding-system koi8-t)
+ "Tajik" '((coding-system koi8-t)
(coding-priority koi8-t)
(nonascii-translation . cyrillic-koi8-t)
(charset koi8-t)
'("Cyrillic"))
(set-language-info-alist
- "Bulgarian" `((coding-system windows-1251)
+ "Bulgarian" '((coding-system windows-1251)
(coding-priority windows-1251)
(nonascii-translation . windows-1251)
(charset windows-1251)
'("Cyrillic"))
(set-language-info-alist
- "Belarusian" `((coding-system windows-1251)
+ "Belarusian" '((coding-system windows-1251)
(coding-priority windows-1251)
(nonascii-translation . windows-1251)
(charset windows-1251)
'("Cyrillic"))
(set-language-info-alist
- "Ukrainian" `((coding-system koi8-u)
+ "Ukrainian" '((coding-system koi8-u)
(coding-priority koi8-u)
(input-method . "ukrainian-computer")
(documentation
'("European"))
(set-language-info-alist
- "Welsh" `((coding-system utf-8 latin-8) ; the input method is Unicode-based
+ "Welsh" '((coding-system utf-8 latin-8) ; the input method is Unicode-based
(coding-priority utf-8 latin-8)
(nonascii-translation . iso-8859-14)
(input-method . "welsh")
'("European"))
(set-language-info-alist
- "Latin-7" `((coding-system latin-7)
+ "Latin-7" '((coding-system latin-7)
(coding-priority latin-7)
(nonascii-translation . iso-8859-13)
(input-method . "latin-prefix")
'("European"))
(set-language-info-alist
- "Lithuanian" `((coding-system latin-7 windows-1257)
+ "Lithuanian" '((coding-system latin-7 windows-1257)
(coding-priority latin-7)
(nonascii-translation . iso-8859-13)
(input-method . "lithuanian-keyboard")
'("European"))
(set-language-info-alist
- "Latvian" `((coding-system latin-7 windows-1257)
+ "Latvian" '((coding-system latin-7 windows-1257)
(coding-priority latin-7)
(nonascii-translation . iso-8859-13)
(input-method . "latvian-keyboard")
:charset-list '(georgian-academy))
(set-language-info-alist
- "Georgian" `((coding-system georgian-ps)
+ "Georgian" '((coding-system georgian-ps)
(coding-priority georgian-ps)
(input-method . "georgian")
(nonascii-translation . georgian-ps)
;;; (includes some punctuation conversion rules)
;;;
(defconst tibetan-precomposition-rule-alist
- `(("ཕྱà¾" . "ö…€")
+ '(("ཕྱà¾" . "ö…€")
("གྲà¾" . "ö…˜")
("ཚà¾" . "ö„¢")
("རྩà¾" . "ö†…")
;;; Code:
(set-language-info-alist
- "UTF-8" `((coding-system utf-8)
+ "UTF-8" '((coding-system utf-8)
(coding-priority utf-8)
(charset unicode-bmp unicode)
-;; Presumably not relevant now.
-;; (setup-function
-;; . (lambda ()
-;; ;; Use Unicode font under Windows. Jason Rumney fecit.
-;; (if (and (fboundp 'w32-add-charset-info)
-;; (not (boundp 'w32-unicode-charset-defined)))
-;; (w32-add-charset-info "iso10646-1" 'w32-charset-ansi t))))
-;; Is this appropriate?
-;; (exit-function
-;; . (lambda ()
-;; (if (and (fboundp 'w32-add-charset-info)
-;; (not (boundp 'w32-unicode-charset-defined)))
-;; (setq w32-charset-info-alist
-;; (delete (assoc "iso10646-1")
-;; w32-charset-info-alist)))))
+ ;; Presumably not relevant now.
+ ;; (setup-function
+ ;; . (lambda ()
+ ;; ;; Use Unicode font under Windows. Jason Rumney fecit.
+ ;; (if (and (fboundp 'w32-add-charset-info)
+ ;; (not (boundp 'w32-unicode-charset-defined)))
+ ;; (w32-add-charset-info "iso10646-1" 'w32-charset-ansi t))))
+ ;; Is this appropriate?
+ ;; (exit-function
+ ;; . (lambda ()
+ ;; (if (and (fboundp 'w32-add-charset-info)
+ ;; (not (boundp 'w32-unicode-charset-defined)))
+ ;; (setq w32-charset-info-alist
+ ;; (delete (assoc "iso10646-1")
+ ;; w32-charset-info-alist)))))
(input-method . "rfc1345") ; maybe not the best choice
(documentation . "\
This language environment is a generic one for the Unicode character set
(define-coding-system-alias 'viqr 'vietnamese-viqr)
(set-language-info-alist
- "Vietnamese" `((charset viscii)
+ "Vietnamese" '((charset viscii)
(coding-system vietnamese-viscii vietnamese-vscii
- vietnamese-tcvn vietnamese-viqr windows-1258)
+ vietnamese-tcvn vietnamese-viqr windows-1258)
(nonascii-translation . viscii)
(coding-priority vietnamese-viscii)
(input-method . "vietnamese-viqr")
It must be supported by libarchive(3).")
(defmacro tramp-archive-autoload-file-name-regexp nil "\
-Regular expression matching archive file names." `(concat "\\`" "\\(" ".+" "\\." (regexp-opt tramp-archive-suffixes) "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*" "\\)" "\\(" "/" ".*" "\\)" "\\'"))
+Regular expression matching archive file names." '(concat "\\`" "\\(" ".+" "\\." (regexp-opt tramp-archive-suffixes) "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*" "\\)" "\\(" "/" ".*" "\\)" "\\'"))
(defalias 'tramp-archive-autoload-file-name-handler 'tramp-autoload-file-name-handler)
(< ch ,beg-symbol))
,@(if no-replace
nil
- `((mail-extr-nuke-char-at ch)))
+ '((mail-extr-nuke-char-at ch)))
(setcar temp nil))
(setq temp (cdr temp)))
(setq ,list-symbol (delq nil ,list-symbol))))
(let ((saved-frame (with-current-buffer man-buffer
Man-original-frame)))
(pcase Man-notify-method
- (`newframe
+ ('newframe
;; Since we run asynchronously, perhaps while Emacs is waiting
;; for input, we must not leave a different buffer current. We
;; can't rely on the editor command loop to reselect the
(set-window-dedicated-p (frame-selected-window frame) t)
(or (display-multi-frame-p frame)
(select-frame frame)))))
- (`pushy
+ ('pushy
(switch-to-buffer man-buffer))
- (`bully
+ ('bully
(and (frame-live-p saved-frame)
(select-frame saved-frame))
(pop-to-buffer man-buffer)
(delete-other-windows))
- (`aggressive
+ ('aggressive
(and (frame-live-p saved-frame)
(select-frame saved-frame))
(pop-to-buffer man-buffer))
- (`friendly
+ ('friendly
(and (frame-live-p saved-frame)
(select-frame saved-frame))
(display-buffer man-buffer 'not-this-window))
- (`polite
+ ('polite
(beep)
(message "Manual buffer %s is ready" (buffer-name man-buffer)))
- (`quiet
+ ('quiet
(message "Manual buffer %s is ready" (buffer-name man-buffer)))
(_ ;; meek
(message ""))
(let ((menu (make-sparse-keymap "Edit")))
(bindings--define-key menu [props]
- `(menu-item "Text Properties" facemenu-menu))
+ '(menu-item "Text Properties" facemenu-menu))
;; ns-win.el said: Add spell for platform consistency.
(if (featurep 'ns)
(bindings--define-key menu [spell]
- `(menu-item "Spell" ispell-menu-map)))
+ '(menu-item "Spell" ispell-menu-map)))
(bindings--define-key menu [fill]
- `(menu-item "Fill" fill-region
+ '(menu-item "Fill" fill-region
:enable (and mark-active (not buffer-read-only))
:help
"Fill text in region to fit between left and right margin"))
menu-bar-separator)
(bindings--define-key menu [bookmark]
- `(menu-item "Bookmarks" menu-bar-bookmark-map))
+ '(menu-item "Bookmarks" menu-bar-bookmark-map))
(bindings--define-key menu [goto]
`(menu-item "Go To" ,menu-bar-goto-menu))
If nil, the current mouse position is used, or nil if there is no mouse."
(pcase position
;; nil -> mouse cursor position
- (`nil
+ ('nil
(let ((mp (mouse-pixel-position)))
(list (list (cadr mp) (cddr mp)) (car mp))))
;; Value returned from `event-end' or `posn-at-point'.
functions in \"cl\" at run time. This macro recognizes that and
loads \"cl\" appropriately."
(if (eq (car (macroexpand '(setf (gethash foo bar) baz))) 'cl-puthash)
- `(require 'cl)
- `(eval-when-compile (require 'cl))))
+ '(require 'cl)
+ '(eval-when-compile (require 'cl))))
;;;###mh-autoload
(defmacro mh-do-in-gnu-emacs (&rest body)
In GNU Emacs if CHECK-TRANSIENT-MARK-MODE-FLAG is non-nil then
check if variable `transient-mark-mode' is active."
(cond ((featurep 'xemacs) ;XEmacs
- `(and (boundp 'zmacs-regions) zmacs-regions (region-active-p)))
+ '(and (boundp 'zmacs-regions) zmacs-regions (region-active-p)))
((not check-transient-mark-mode-flag) ;GNU Emacs
- `(and (boundp 'mark-active) mark-active))
+ '(and (boundp 'mark-active) mark-active))
(t ;GNU Emacs
- `(and (boundp 'transient-mark-mode) transient-mark-mode
+ '(and (boundp 'transient-mark-mode) transient-mark-mode
(boundp 'mark-active) mark-active))))
;; Shush compiler.
(defmacro mh-remove-xemacs-horizontal-scrollbar ()
"Get rid of the horizontal scrollbar that XEmacs insists on putting in."
(when (featurep 'xemacs)
- `(if (and (featurep 'scrollbar)
+ '(if (and (featurep 'scrollbar)
(fboundp 'set-specifier))
(set-specifier horizontal-scrollbar-visible-p nil
(cons (current-buffer) nil)))))
;;;###mh-autoload
(defmacro mh-buffer-data ()
"Convenience macro to get the MIME data structures of the current buffer."
- `(gethash (current-buffer) mh-globals-hash))
+ '(gethash (current-buffer) mh-globals-hash))
;; Structure to keep track of MIME handles on a per buffer basis.
(mh-defstruct (mh-buffer-data (:conc-name mh-mime-)
(cond ((not normal-exit)
(set-window-configuration config))
,(if dont-return
- `(t (setq mh-previous-window-config config))
- `((and (get-buffer cur-buffer-name)
+ '(t (setq mh-previous-window-config config))
+ '((and (get-buffer cur-buffer-name)
(window-live-p (get-buffer-window
(get-buffer cur-buffer-name))))
(pop-to-buffer (get-buffer cur-buffer-name) nil)))))))))
(speedbar-change-expand-button-char ?-)
(add-text-properties
(mh-line-beginning-position) (1+ (line-beginning-position))
- `(mh-expanded t)))))))
+ '(mh-expanded t)))))))
(defun mh-speed-view (&rest ignored)
"Visits the selected folder just as if you had used \\<mh-folder-mode-map>\\[mh-visit-folder].
(1+ (mh-line-beginning-position))))
(add-text-properties
(mh-line-beginning-position) (1+ (line-beginning-position))
- `(mh-folder nil mh-expanded nil mh-children-p t mh-level 0))
+ '(mh-folder nil mh-expanded nil mh-children-p t mh-level 0))
(mh-speed-stealth-update t)
(when (> mh-speed-update-interval 0)
(mh-speed-flists nil))))
(mh-speedbar-change-expand-button-char ?+)
(add-text-properties
(mh-line-beginning-position) (1+ (mh-line-beginning-position))
- `(mh-children-p t)))
+ '(mh-children-p t)))
(when (get-text-property (mh-line-beginning-position) 'mh-expanded)
(mh-speed-toggle))
(setq mh-speed-refresh-flag t))))
;; Show the completion table, if requested.
((not exact)
(if (pcase completion-auto-help
- (`lazy (eq this-command last-command))
+ ('lazy (eq this-command last-command))
(_ completion-auto-help))
(minibuffer-completion-help beg end)
(completion--message "Next char not unique")))
;; like comint-completion-at-point or mh-letter-completion-at-point, which
;; could be sometimes safe and sometimes misbehaving (and sometimes neither).
(if (pcase which
- (`all t)
- (`safe (member fun completion--capf-safe-funs))
- (`optimist (not (member fun completion--capf-misbehave-funs))))
+ ('all t)
+ ('safe (member fun completion--capf-safe-funs))
+ ('optimist (not (member fun completion--capf-misbehave-funs))))
(let ((res (funcall fun)))
(cond
((and (consp res) (not (functionp res)))
(setq p (cdr p)))
(`(star ,(pred symbolp) . ,rest) (setq p `(star . ,rest)))
(`(,(pred symbolp) star . ,rest) (setq p `(star . ,rest)))
- (`(point ,(or `any `any-delim) . ,rest) (setq p `(point . ,rest)))
- (`(,(or `any `any-delim) point . ,rest) (setq p `(point . ,rest)))
- (`(any ,(or `any `any-delim) . ,rest) (setq p `(any . ,rest)))
+ (`(point ,(or 'any 'any-delim) . ,rest) (setq p `(point . ,rest)))
+ (`(,(or 'any 'any-delim) point . ,rest) (setq p `(point . ,rest)))
+ (`(any ,(or 'any 'any-delim) . ,rest) (setq p `(any . ,rest)))
(`(,(pred symbolp)) (setq p nil)) ;Implicit terminating `any'.
(_ (push (pop p) n))))
(nreverse n)))
(text
(if (eq info 'self) (symbol-name tag)
(pcase tag
- ((or `Time `Duration)
+ ((or 'Time 'Duration)
(let ((time (cdr (or (assq 'time info) (assq 'Time info)))))
(setq pred (list nil)) ;Just assume it's never eq.
(when time
(string-match ":" time))
(substring time (match-end 0))
time)))))
- (`Cover
+ ('Cover
(let ((dir (file-name-directory (cdr (assq 'file info)))))
;; (debug)
(push `(equal ',dir (file-name-directory (cdr (assq 'file info)))) pred)
(defmacro ange-ftp-parse-filename ()
;;Extract the filename from the current line of a dired-like listing.
- `(save-match-data
+ '(save-match-data
(let ((eol (progn (end-of-line) (point))))
(beginning-of-line)
(if (re-search-forward directory-listing-before-filename-regexp eol t)
(defmacro ange-ftp-dl-parser ()
;; Parse the current buffer, which is assumed to be a descriptive
;; listing, and return a hashtable.
- `(let ((tbl (make-hash-table :test 'equal)))
+ '(let ((tbl (make-hash-table :test 'equal)))
(while (not (eobp))
(puthash
(buffer-substring (point)
,(if (and bit (< (/ bit 8) L))
`(substring key-xor-opad 0 ,(/ bit 8))
;; return a copy of `key-xor-opad'.
- `(concat key-xor-opad)))
+ '(concat key-xor-opad)))
;; cleanup.
(fillarray key-xor-ipad 0)
(fillarray key-xor-opad 0)))))
http://subhonker6.userland.com/rcsPublic/rssHotlist.
You may add other entries in `newsticker-url-list'."
- :type `(set ,@(mapcar `newsticker--splicer
+ :type `(set ,@(mapcar #'newsticker--splicer
newsticker--raw-url-list-defaults))
:set 'newsticker--set-customvar-retrieval
:group 'newsticker-retrieval)
(with-current-buffer quickurl-list-last-buffer
(insert
(pcase type
- (`url (funcall quickurl-format-function url))
- (`naked-url (quickurl-url-url url))
- (`with-lookup (format "%s <URL:%s>"
+ ('url (funcall quickurl-format-function url))
+ ('naked-url (quickurl-url-url url))
+ ('with-lookup (format "%s <URL:%s>"
(quickurl-url-keyword url)
(quickurl-url-url url)))
- (`with-desc (format "%S <URL:%s>"
+ ('with-desc (format "%S <URL:%s>"
(quickurl-url-description url)
(quickurl-url-url url)))
- (`lookup (quickurl-url-keyword url)))))
+ ('lookup (quickurl-url-keyword url)))))
(error "No URL details on that line"))
url))
;;;###autoload
(progn (defmacro tramp-archive-autoload-file-name-regexp ()
"Regular expression matching archive file names."
- `(concat
+ '(concat
"\\`" "\\(" ".+" "\\."
- ;; Default suffixes ...
- (regexp-opt tramp-archive-suffixes)
- ;; ... with compression.
- "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*"
+ ;; Default suffixes ...
+ (regexp-opt tramp-archive-suffixes)
+ ;; ... with compression.
+ "\\(?:" "\\." (regexp-opt tramp-archive-compression-suffixes) "\\)*"
"\\)" ;; \1
"\\(" "/" ".*" "\\)" "\\'"))) ;; \2
;; `cl-struct-slot-info' has been introduced with Emacs 25.
(defmacro tramp-compat-tramp-file-name-slots ()
(if (fboundp 'cl-struct-slot-info)
- `(cdr (mapcar 'car (cl-struct-slot-info 'tramp-file-name)))
- `(cdr (mapcar 'car (get 'tramp-file-name 'cl-struct-slots)))))
+ '(cdr (mapcar 'car (cl-struct-slot-info 'tramp-file-name)))
+ '(cdr (mapcar 'car (get 'tramp-file-name 'cl-struct-slots)))))
;; The signature of `tramp-make-tramp-file-name' has been changed.
;; Therefore, we cannot us `url-tramp-convert-url-to-tramp' prior
(add-to-list 'hints `(:dict-entry
"urgency"
(:variant :byte ,(pcase urgency
- (`low 0)
- (`critical 2)
+ ('low 0)
+ ('critical 2)
(_ 1)))) t))
(when category
(add-to-list 'hints `(:dict-entry
0))
(defmacro pgg-byte-after (&optional pos)
- `(pgg-char-int (char-after ,(or pos `(point)))))
+ `(pgg-char-int (char-after ,(or pos '(point)))))
(defmacro pgg-read-byte ()
- `(pgg-char-int (char-after (prog1 (point) (forward-char)))))
+ '(pgg-char-int (char-after (prog1 (point) (forward-char)))))
(defmacro pgg-read-bytes-string (nbytes)
`(buffer-substring
(setq rev (replace-match (cdr rule) t nil rev))))
(format "Arch%c%s"
(pcase (vc-state file)
- ((or `up-to-date `needs-update) ?-)
- (`added ?@)
+ ((or 'up-to-date 'needs-update) ?-)
+ ('added ?@)
(_ ?:))
rev)))
;; Hopefully, this will change later.
(setq hit-fields
(pcase (intern vendor-id)
- (`Beagle
+ ('Beagle
'("xesam:mimeType" "xesam:url"))
- (`Strigi
+ ('Strigi
'("xesam:author" "xesam:cc" "xesam:charset"
"xesam:contentType" "xesam:fileExtension"
"xesam:id" "xesam:lineCount" "xesam:links"
"xesam:mimeType" "xesam:name" "xesam:size"
"xesam:sourceModified" "xesam:subject" "xesam:to"
"xesam:url"))
- (`TrackerXesamSession
+ ('TrackerXesamSession
'("xesam:relevancyRating" "xesam:url"))
- (`Debbugs
+ ('Debbugs
'("xesam:keyword" "xesam:owner" "xesam:title"
"xesam:url" "xesam:sourceModified" "xesam:mimeType"
"debbugs:key"))
(let* ((tmp-src-file (org-babel-temp-file
"C-src-"
(pcase org-babel-c-variant
- (`c ".c") (`cpp ".cpp") (`d ".d"))))
+ ('c ".c") ('cpp ".cpp") ('d ".d"))))
(tmp-bin-file ;not used for D
(org-babel-process-file-name
(org-babel-temp-file "C-bin-" org-babel-exeext)))
" "))
(full-body
(pcase org-babel-c-variant
- (`c (org-babel-C-expand-C body params))
- (`cpp (org-babel-C-expand-C++ body params))
- (`d (org-babel-C-expand-D body params)))))
+ ('c (org-babel-C-expand-C body params))
+ ('cpp (org-babel-C-expand-C++ body params))
+ ('d (org-babel-C-expand-D body params)))))
(with-temp-file tmp-src-file (insert full-body))
(pcase org-babel-c-variant
- ((or `c `cpp)
+ ((or 'c 'cpp)
(org-babel-eval
(format "%s -o %s %s %s %s"
(pcase org-babel-c-variant
- (`c org-babel-C-compiler)
- (`cpp org-babel-C++-compiler))
+ ('c org-babel-C-compiler)
+ ('cpp org-babel-C++-compiler))
tmp-bin-file
flags
(org-babel-process-file-name tmp-src-file)
libs)
""))
- (`d nil)) ;; no separate compilation for D
+ ('d nil)) ;; no separate compilation for D
(let ((results
(org-babel-eval
(pcase org-babel-c-variant
- ((or `c `cpp)
+ ((or 'c 'cpp)
(concat tmp-bin-file cmdline))
- (`d
+ ('d
(format "%s %s %s %s"
org-babel-D-compiler
flags
(let* ((basetype (org-babel-C-val-to-base-type val))
(type
(pcase basetype
- (`integerp '("int" "%d"))
- (`floatp '("double" "%f"))
- (`stringp
+ ('integerp '("int" "%d"))
+ ('floatp '("double" "%f"))
+ ('stringp
(list
(if (eq org-babel-c-variant 'd) "string" "const char*")
"\"%s\""))
(let ((type nil))
(mapc (lambda (v)
(pcase (org-babel-C-val-to-base-type v)
- (`stringp (setq type 'stringp))
- (`floatp
+ ('stringp (setq type 'stringp))
+ ('floatp
(if (or (not type) (eq type 'integerp))
(setq type 'floatp)))
- (`integerp
+ ('integerp
(unless type (setq type 'integerp)))))
val)
type))
"Generate a utility function to convert a column name
into a column number."
(pcase org-babel-c-variant
- ((or `c `cpp)
+ ((or 'c 'cpp)
"int get_column_num (int nbcols, const char** header, const char* column)
{
int c;
return -1;
}
")
- (`d
+ ('d
"int get_column_num (string[] header, string column)
{
foreach (c, h; header)
(concat
(format
(pcase org-babel-c-variant
- ((or `c `cpp) "const char* %s_header[%d] = {%s};")
- (`d "string %s_header[%d] = [%s];"))
+ ((or 'c 'cpp) "const char* %s_header[%d] = {%s};")
+ ('d "string %s_header[%d] = [%s];"))
table
(length headers)
(mapconcat (lambda (h) (format "%S" h)) headers ","))
"\n"
(pcase org-babel-c-variant
- ((or `c `cpp)
+ ((or 'c 'cpp)
(format
"const char* %s_h (int row, const char* col) { return %s[row][get_column_num(%d,%s_header,col)]; }"
table table (length headers) table))
- (`d
+ ('d
(format
"string %s_h (size_t row, string col) { return %s[row][get_column_num(%s_header,col)]; }"
table table table))))))
(name (nth 4 info))
(name-string (if name (format " (%s) " name) " ")))
(pcase evalp
- (`nil nil)
- (`t t)
- (`query (or
+ ('nil nil)
+ ('t t)
+ ('query (or
(and (not (bound-and-true-p
org-babel-confirm-evaluate-answer-no))
(yes-or-no-p
(catch :found
(org-with-wide-buffer
(pcase (org-element-type context)
- ((or `inline-babel-call `inline-src-block)
+ ((or 'inline-babel-call 'inline-src-block)
;; Results for inline objects are located right after them.
;; There is no RESULTS line to insert either.
(let ((limit (org-element-property
(skip-chars-backward " \t")
(point)))
(point))))))))
- ((or `babel-call `src-block)
+ ((or 'babel-call 'src-block)
(let* ((name (org-element-property :name context))
(named-results (and name (org-babel-find-named-result name))))
(goto-char (or named-results (org-element-property :end context)))
(org-with-wide-buffer
(goto-char (org-element-property :post-affiliated element))
(pcase (org-element-type element)
- (`fixed-width
+ ('fixed-width
(let ((v (org-trim (org-element-property :value element))))
(or (org-babel--string-to-number v) v)))
- (`table (org-babel-read-table))
- (`plain-list (org-babel-read-list))
- (`example-block
+ ('table (org-babel-read-table))
+ ('plain-list (org-babel-read-list))
+ ('example-block
(let ((v (org-element-property :value element)))
(if (or org-src-preserve-indentation
(org-element-property :preserve-indent element))
v
(org-remove-indentation v))))
- (`export-block
+ ('export-block
(org-remove-indentation (org-element-property :value element)))
- (`paragraph
+ ('paragraph
;; Treat paragraphs containing a single link specially.
(skip-chars-forward " \t")
(if (and (looking-at org-bracket-link-regexp)
(buffer-substring-no-properties
(org-element-property :contents-begin element)
(org-element-property :contents-end element))))
- ((or `center-block `quote-block `verse-block `special-block)
+ ((or 'center-block 'quote-block 'verse-block 'special-block)
(org-remove-indentation
(buffer-substring-no-properties
(org-element-property :contents-begin element)
;;
;; #+name: call_src
;; #+begin_src ...
- ((and (or `babel-call `src-block) (guard object?))
+ ((and (or 'babel-call 'src-block) (guard object?))
nil)
(type type)))
(begin
(skip-chars-backward " \r\t\n")
(point)))))
(pcase type
- (`inline-src-block
+ ('inline-src-block
(let* ((info
(org-babel-get-src-block-info nil element))
(params (nth 2 info)))
;; insert value.
(delete-region begin end)
(insert replacement)))))
- ((or `babel-call `inline-babel-call)
+ ((or 'babel-call 'inline-babel-call)
(org-babel-exp-do-export (org-babel-lob-get-info element)
'lob)
(let ((rep
(goto-char begin)
(delete-region begin end)
(insert rep))))
- (`src-block
+ ('src-block
(let ((match-start (copy-marker (match-beginning 0)))
(ind (org-get-indentation)))
;; Take care of matched block: compute
(nth 2 info)
`((:results . ,(if silent "silent" "replace")))))))
(pcase type
- (`block (org-babel-execute-src-block nil info))
- (`inline
+ ('block (org-babel-execute-src-block nil info))
+ ('inline
;; Position the point on the inline source block
;; allowing `org-babel-insert-result' to check that the
;; block is inline.
(goto-char (nth 5 info))
(org-babel-execute-src-block nil info))
- (`lob
+ ('lob
(save-excursion
(goto-char (nth 5 info))
(let (org-confirm-babel-evaluate)
in BODY as elisp."
(when session (error "Sessions are not (yet) supported for Groovy"))
(pcase result-type
- (`output
+ ('output
(let ((src-file (org-babel-temp-file "groovy_")))
(progn (with-temp-file src-file (insert body))
(org-babel-eval
(concat org-babel-groovy-command " " src-file) ""))))
- (`value
+ ('value
(let* ((src-file (org-babel-temp-file "groovy_"))
(wrapper (format org-babel-groovy-wrapper-method body)))
(with-temp-file src-file (insert wrapper))
(org-babel-reassemble-table
(let ((result
(pcase result-type
- (`output (mapconcat #'identity (reverse (cdr results)) "\n"))
- (`value (car results)))))
+ ('output (mapconcat #'identity (reverse (cdr results)) "\n"))
+ ('value (car results)))))
(org-babel-result-cond (cdr (assq :result-params params))
result (org-babel-script-escape result)))
(org-babel-pick-name (cdr (assq :colname-names params))
in BODY as elisp."
(when session (error "Sessions are not (yet) supported for Io"))
(pcase result-type
- (`output
+ ('output
(if (member "repl" result-params)
(org-babel-eval org-babel-io-command body)
(let ((src-file (org-babel-temp-file "io-")))
(progn (with-temp-file src-file (insert body))
(org-babel-eval
(concat org-babel-io-command " " src-file) "")))))
- (`value (let* ((src-file (org-babel-temp-file "io-"))
+ ('value (let* ((src-file (org-babel-temp-file "io-"))
(wrapper (format org-babel-io-wrapper-method body)))
(with-temp-file src-file (insert wrapper))
(let ((raw (org-babel-eval
BODY is the contents of the block, as a string. PARAMS is
a property list containing the parameters of the block."
(require (pcase org-babel-lisp-eval-fn
- (`slime-eval 'slime)
- (`sly-eval 'sly)))
+ ('slime-eval 'slime)
+ ('sly-eval 'sly)))
(org-babel-reassemble-table
(let ((result
(funcall (if (member "output" (cdr (assq :result-params params)))
(when (equal name (org-element-property :name element))
(throw :found
(pcase (org-element-type element)
- (`src-block (org-babel-get-src-block-info t element))
- (`babel-call (org-babel-lob-get-info element))
+ ('src-block (org-babel-get-src-block-info t element))
+ ('babel-call (org-babel-lob-get-info element))
;; Non-executable data found. Since names
;; are supposed to be unique throughout
;; a document, bail out.
last statement in BODY, as elisp."
(let ((raw
(pcase result-type
- (`output (org-babel-eval org-babel-lua-command
+ ('output (org-babel-eval org-babel-lua-command
(concat (if preamble (concat preamble "\n"))
body)))
- (`value (let ((tmp-file (org-babel-temp-file "lua-")))
+ ('value (let ((tmp-file (org-babel-temp-file "lua-")))
(org-babel-eval
org-babel-lua-command
(concat
(funcall send-wait)))
(results
(pcase result-type
- (`output
+ ('output
(mapconcat
#'org-trim
(butlast
(insert org-babel-lua-eoe-indicator)
(funcall send-wait))
2) "\n"))
- (`value
+ ('value
(let ((tmp-file (org-babel-temp-file "lua-")))
(org-babel-comint-with-output
(session org-babel-lua-eoe-indicator nil body)
org-babel-matlab-shell-command
org-babel-octave-shell-command)))
(pcase result-type
- (`output (org-babel-eval cmd body))
- (`value (let ((tmp-file (org-babel-temp-file "octave-")))
- (org-babel-eval
- cmd
- (format org-babel-octave-wrapper-method body
- (org-babel-process-file-name tmp-file 'noquote)
- (org-babel-process-file-name tmp-file 'noquote)))
- (org-babel-octave-import-elisp-from-file tmp-file))))))
+ ('output (org-babel-eval cmd body))
+ ('value (let ((tmp-file (org-babel-temp-file "octave-")))
+ (org-babel-eval
+ cmd
+ (format org-babel-octave-wrapper-method body
+ (org-babel-process-file-name tmp-file 'noquote)
+ (org-babel-process-file-name tmp-file 'noquote)))
+ (org-babel-octave-import-elisp-from-file tmp-file))))))
(defun org-babel-octave-evaluate-session
(session body result-type &optional matlabp)
(wait-file (org-babel-temp-file "matlab-emacs-link-wait-signal-"))
(full-body
(pcase result-type
- (`output
+ ('output
(mapconcat
#'org-babel-chomp
(list body org-babel-octave-eoe-indicator) "\n"))
- (`value
+ ('value
(if (and matlabp org-babel-matlab-with-emacs-link)
(concat
(format org-babel-matlab-emacs-link-wrapper-method
t full-body)
(insert full-body) (comint-send-input nil t)))) results)
(pcase result-type
- (`value
+ ('value
(org-babel-octave-import-elisp-from-file tmp-file))
- (`output
+ ('output
(setq results
(if matlabp
(cdr (reverse (delq "" (mapcar
tmp-file 'noquote)))
(let ((results
(pcase result-type
- (`output
+ ('output
(with-temp-file tmp-file
(insert
(org-babel-eval org-babel-perl-command body))
(buffer-string)))
- (`value
+ ('value
(org-babel-eval org-babel-perl-command
(format org-babel-perl-wrapper-method
body tmp-babel-file))))))
last statement in BODY, as elisp."
(let ((raw
(pcase result-type
- (`output (org-babel-eval org-babel-python-command
+ ('output (org-babel-eval org-babel-python-command
(concat (if preamble (concat preamble "\n"))
body)))
- (`value (let ((tmp-file (org-babel-temp-file "python-")))
+ ('value (let ((tmp-file (org-babel-temp-file "python-")))
(org-babel-eval
org-babel-python-command
(concat
(funcall send-wait)))
(results
(pcase result-type
- (`output
+ ('output
(let ((body (if (string-match-p ".\n+." body) ; Multiline
(let ((tmp-src-file (org-babel-temp-file
"python-")))
(insert org-babel-python-eoe-indicator)
(funcall send-wait))
2) "\n")))
- (`value
+ ('value
(let ((tmp-file (org-babel-temp-file "python-")))
(org-babel-comint-with-output
(session org-babel-python-eoe-indicator nil body)
(goto-char
(org-element-property :post-affiliated e))
(pcase (org-element-type e)
- (`babel-call
+ ('babel-call
(throw :found
(org-babel-execute-src-block
nil (org-babel-lob-get-info e) params)))
- (`src-block
+ ('src-block
(throw :found
(org-babel-execute-src-block
nil nil
(if (not buffer)
;; external process evaluation
(pcase result-type
- (`output (org-babel-eval org-babel-ruby-command body))
- (`value (let ((tmp-file (org-babel-temp-file "ruby-")))
+ ('output (org-babel-eval org-babel-ruby-command body))
+ ('value (let ((tmp-file (org-babel-temp-file "ruby-")))
(org-babel-eval
org-babel-ruby-command
(format (if (member "pp" result-params)
(org-babel-eval-read-file tmp-file))))
;; comint session evaluation
(pcase result-type
- (`output
+ ('output
(let ((eoe-string (format "puts \"%s\"" org-babel-ruby-eoe-indicator)))
;; Force the session to be ready before the actual session
;; code is run. There is some problem in comint that will
"conf.prompt_mode=_org_prompt_mode;conf.echo=true"
eoe-string)))
"\n") "[\r\n]") 4) "\n")))
- (`value
+ ('value
(let* ((tmp-file (org-babel-temp-file "ruby-"))
(ppp (or (member "code" result-params)
(member "pp" result-params))))
(org-babel-temp-file "sql-out-")))
(header-delim "")
(command (pcase (intern engine)
- (`dbi (format "dbish --batch %s < %s | sed '%s' > %s"
+ ('dbi (format "dbish --batch %s < %s | sed '%s' > %s"
(or cmdline "")
(org-babel-process-file-name in-file)
"/^+/d;s/^|//;s/(NULL)/ /g;$d"
(org-babel-process-file-name out-file)))
- (`monetdb (format "mclient -f tab %s < %s > %s"
+ ('monetdb (format "mclient -f tab %s < %s > %s"
(or cmdline "")
(org-babel-process-file-name in-file)
(org-babel-process-file-name out-file)))
- (`mssql (format "sqlcmd %s -s \"\t\" %s -i %s -o %s"
+ ('mssql (format "sqlcmd %s -s \"\t\" %s -i %s -o %s"
(or cmdline "")
(org-babel-sql-dbstring-mssql
dbhost dbuser dbpassword database)
(org-babel-process-file-name in-file))
(org-babel-sql-convert-standard-filename
(org-babel-process-file-name out-file))))
- (`mysql (format "mysql %s %s %s < %s > %s"
+ ('mysql (format "mysql %s %s %s < %s > %s"
(org-babel-sql-dbstring-mysql
dbhost dbport dbuser dbpassword database)
(if colnames-p "" "-N")
(or cmdline "")
(org-babel-process-file-name in-file)
(org-babel-process-file-name out-file)))
- (`postgresql (format
+ ('postgresql (format
"%spsql --set=\"ON_ERROR_STOP=1\" %s -A -P \
footer=off -F \"\t\" %s -f %s -o %s %s"
(if dbpassword
(org-babel-process-file-name in-file)
(org-babel-process-file-name out-file)
(or cmdline "")))
- (`sqsh (format "sqsh %s %s -i %s -o %s -m csv"
+ ('sqsh (format "sqsh %s %s -i %s -o %s -m csv"
(or cmdline "")
(org-babel-sql-dbstring-sqsh
dbhost dbuser dbpassword database)
(org-babel-process-file-name in-file))
(org-babel-sql-convert-standard-filename
(org-babel-process-file-name out-file))))
- (`vertica (format "vsql %s -f %s -o %s %s"
- (org-babel-sql-dbstring-vertica
- dbhost dbport dbuser dbpassword database)
- (org-babel-process-file-name in-file)
- (org-babel-process-file-name out-file)
- (or cmdline "")))
- (`oracle (format
+ ('vertica (format "vsql %s -f %s -o %s %s"
+ (org-babel-sql-dbstring-vertica
+ dbhost dbport dbuser dbpassword database)
+ (org-babel-process-file-name in-file)
+ (org-babel-process-file-name out-file)
+ (or cmdline "")))
+ ('oracle (format
"sqlplus -s %s < %s > %s"
(org-babel-sql-dbstring-oracle
dbhost dbport dbuser dbpassword database)
(with-temp-file in-file
(insert
(pcase (intern engine)
- (`dbi "/format partbox\n")
- (`oracle "SET PAGESIZE 50000
+ ('dbi "/format partbox\n")
+ ('oracle "SET PAGESIZE 50000
SET NEWPAGE 0
SET TAB OFF
SET SPACE 0
SET COLSEP '|'
")
- ((or `mssql `sqsh) "SET NOCOUNT ON
+ ((or 'mssql 'sqsh) "SET NOCOUNT ON
")
- (`vertica "\\a\n")
+ ('vertica "\\a\n")
(_ ""))
(org-babel-expand-body:sql body params)
;; "sqsh" requires "go" inserted at EOF.
(or (not (memq (line-beginning-position 0) deadline-pos))
habitp))
nil)
- (`repeated-after-deadline
+ ('repeated-after-deadline
(let ((deadline (time-to-days
(org-get-deadline-time (point)))))
(and (<= schedule deadline) (> current deadline))))
- (`not-today pastschedp)
- (`t t)
+ ('not-today pastschedp)
+ ('t t)
(_ nil))
(throw :skip nil))
;; Skip habits if `org-habit-show-habits' is nil, or if we
(org-capture-put :exact-position (point))
(setq target-entry-p
(and (derived-mode-p 'org-mode) (org-at-heading-p))))
- (`(clock)
+ ('(clock)
(if (and (markerp org-clock-hd-marker)
(marker-buffer org-clock-hd-marker))
(progn (set-buffer (marker-buffer org-clock-hd-marker))
(goto-char (org-capture-get :pos))
(setq-local outline-level 'org-outline-level)
(pcase (org-capture-get :type)
- ((or `nil `entry) (org-capture-place-entry))
- (`table-line (org-capture-place-table-line))
- (`plain (org-capture-place-plain-text))
- (`item (org-capture-place-item))
- (`checkitem (org-capture-place-item)))
+ ((or 'nil 'entry) (org-capture-place-entry))
+ ('table-line (org-capture-place-table-line))
+ ('plain (org-capture-place-plain-text))
+ ('item (org-capture-place-item))
+ ('checkitem (org-capture-place-item)))
(org-capture-mode 1)
(setq-local org-capture-current-plist org-capture-plist))
(let ((insert-fun (if (equal key "C") #'insert
(lambda (s) (org-insert-link 0 s)))))
(pcase org-capture--clipboards
- (`nil nil)
+ ('nil nil)
(`(,value) (funcall insert-fun value))
(`(,first-value . ,_)
(funcall insert-fun
time (or org-time-was-given upcase?)
(member key '("u" "U"))
nil nil (list org-end-time-was-given))))
- (`nil
+ ('nil
;; Load history list for current prompt.
(setq org-capture--prompt-history
(gethash prompt org-capture--prompt-history-table))
(org-timestamp-change
(round (/ (float-time tdiff)
(pcase timestamp?
- (`minute 60)
- (`hour 3600)
- (`day (* 24 3600))
- (`month (* 24 3600 31))
- (`year (* 24 3600 365.2)))))
+ ('minute 60)
+ ('hour 3600)
+ ('day (* 24 3600))
+ ('month (* 24 3600 31))
+ ('year (* 24 3600 365.2)))))
timestamp? 'updown)))))))
;;;###autoload
(org-find-dblock "clocktable")
(org-show-entry))
(pcase (org-in-clocktable-p)
- (`nil
+ ('nil
(org-create-dblock
(org-combine-plists
(list :scope (if (org-before-first-heading-p) 'file 'subtree))
(error "Looking forward with quarters isn't implemented"))))
(when (= shift 0)
(pcase key
- (`yesterday (setq key 'today shift -1))
- (`lastweek (setq key 'week shift -1))
- (`lastmonth (setq key 'month shift -1))
- (`lastyear (setq key 'year shift -1))
- (`lastq (setq key 'quarter shift -1))))
+ ('yesterday (setq key 'today shift -1))
+ ('lastweek (setq key 'week shift -1))
+ ('lastmonth (setq key 'month shift -1))
+ ('lastyear (setq key 'year shift -1))
+ ('lastq (setq key 'quarter shift -1))))
;; Prepare start and end times depending on KEY's type.
(pcase key
- ((or `day `today) (setq m 0 h 0 h1 24 d (+ d shift)))
- ((or `week `thisweek)
+ ((or 'day 'today) (setq m 0 h 0 h1 24 d (+ d shift)))
+ ((or 'week 'thisweek)
(let* ((ws (or wstart 1))
(diff (+ (* -7 shift) (if (= dow 0) (- 7 ws) (- dow ws)))))
(setq m 0 h 0 d (- d diff) d1 (+ 7 d))))
- ((or `month `thismonth)
+ ((or 'month 'thismonth)
(setq h 0 m 0 d (or mstart 1) month (+ month shift) month1 (1+ month)))
- ((or `quarter `thisq)
+ ((or 'quarter 'thisq)
;; Compute if this shift remains in this year. If not, compute
;; how many years and quarters we have to shift (via floor*) and
;; compute the shifted years, months and quarters.
(setq shiftedy y)
(let ((qshift (* 3 (1- (+ q shift)))))
(setq m 0 h 0 d 1 month (+ 1 qshift) month1 (+ 4 qshift))))))
- ((or `year `thisyear)
+ ((or 'year 'thisyear)
(setq m 0 h 0 d 1 month 1 y (+ y shift) y1 (1+ y)))
- ((or `interactive `untilnow)) ; Special cases, ignore them.
+ ((or 'interactive 'untilnow)) ; Special cases, ignore them.
(_ (user-error "No such time block %s" key)))
;; Format start and end times according to AS-STRINGS.
(let* ((start (pcase key
- (`interactive (org-read-date nil t nil "Range start? "))
+ ('interactive (org-read-date nil t nil "Range start? "))
;; In theory, all clocks started after the dawn of
;; humanity. However, the platform's clock
;; support might not go back that far. Choose the
;; that works, otherwise 0 (1970). Going back
;; billions of years would loop forever on Mac OS
;; X 10.6 with Emacs 26 and earlier (Bug#27736).
- (`untilnow
+ ('untilnow
(let ((old 0))
(dolist (older '((-32768 0) (-33554432 0)) old)
(when (ignore-errors (decode-time older))
(setq old older)))))
(_ (encode-time 0 m h d month y))))
(end (pcase key
- (`interactive (org-read-date nil t nil "Range end? "))
- (`untilnow (current-time))
+ ('interactive (org-read-date nil t nil "Range end? "))
+ ('untilnow (current-time))
(_ (encode-time 0
(or m1 m)
(or h1 h)
(or y1 y)))))
(text
(pcase key
- ((or `day `today) (format-time-string "%A, %B %d, %Y" start))
- ((or `week `thisweek) (format-time-string "week %G-W%V" start))
- ((or `month `thismonth) (format-time-string "%B %Y" start))
- ((or `year `thisyear) (format-time-string "the year %Y" start))
- ((or `quarter `thisq)
+ ((or 'day 'today) (format-time-string "%A, %B %d, %Y" start))
+ ((or 'week 'thisweek) (format-time-string "week %G-W%V" start))
+ ((or 'month 'thismonth) (format-time-string "%B %Y" start))
+ ((or 'year 'thisyear) (format-time-string "the year %Y" start))
+ ((or 'quarter 'thisq)
(concat (org-count-quarter shiftedq)
" quarter of " (number-to-string shiftedy)))
- (`interactive "(Range interactively set)")
- (`untilnow "now"))))
+ ('interactive "(Range interactively set)")
+ ('untilnow "now"))))
(if (not as-strings) (list start end text)
(let ((f (cdr org-time-stamp-formats)))
(list (format-time-string f start)
(catch 'exit
(let* ((scope (plist-get params :scope))
(files (pcase scope
- (`agenda
+ ('agenda
(org-agenda-files t))
- (`agenda-with-archives
+ ('agenda-with-archives
(org-add-archive-files (org-agenda-files t)))
- (`file-with-archives
+ ('file-with-archives
(and buffer-file-name
(org-add-archive-files (list buffer-file-name))))
((pred functionp) (funcall scope))
(setq narrow (intern (format "%d!" narrow))))
(pcase narrow
- ((or `nil (pred integerp)) nil) ;nothing to do
+ ((or 'nil (pred integerp)) nil) ;nothing to do
((and (pred symbolp)
(guard (string-match-p "\\`[0-9]+!\\'" (symbol-name narrow))))
(setq narrow-cut-p t)
(let ((id (plist-get params :id))
view-file view-pos)
(pcase id
- (`global nil)
- ((or `local `nil) (setq view-pos (point)))
+ ('global nil)
+ ((or 'local 'nil) (setq view-pos (point)))
((and (let id-string (format "%s" id))
(guard (string-match "^file:\\(.*\\)" id-string)))
(setq view-file (match-string-no-properties 1 id-string))
Raise an error if expected format is unknown."
(pcase (or fmt org-duration-format)
- (`h:mm
+ ('h:mm
(let ((minutes (floor minutes)))
(format "%d:%02d" (/ minutes 60) (mod minutes 60))))
- (`h:mm:ss
+ ('h:mm:ss
(let* ((whole-minutes (floor minutes))
(seconds (floor (* 60 (- minutes whole-minutes)))))
(format "%s:%02d"
((pred atom) (error "Invalid duration format specification: %S" fmt))
;; Mixed format. Call recursively the function on both parts.
((and duration-format
- (let `(special . ,(and mode (or `h:mm:ss `h:mm)))
+ (let `(special . ,(and mode (or 'h:mm:ss 'h:mm)))
(assq 'special duration-format)))
(let* ((truncated-format
;; Remove "special" mode from duration format in order to
(when datum
(let ((type (org-element-type datum)))
(pcase type
- (`org-data (list 'org-data nil))
- (`plain-text (substring-no-properties datum))
- (`nil (copy-sequence datum))
+ ('org-data (list 'org-data nil))
+ ('plain-text (substring-no-properties datum))
+ ('nil (copy-sequence datum))
(_
(list type (plist-put (copy-sequence (nth 1 datum)) :parent nil)))))))
bullet
(and counter (format "[@%d] " counter))
(pcase checkbox
- (`on "[X] ")
- (`off "[ ] ")
- (`trans "[-] ")
+ ('on "[X] ")
+ ('off "[ ] ")
+ ('trans "[-] ")
(_ nil))
(and tag (format "%s :: " tag))
(when contents
;; a format string, escape percent signs
;; in description.
(replace-regexp-in-string "%" "%%" contents)))
- ((or `bracket
- `nil
+ ((or 'bracket
+ 'nil
(guard (member type '("coderef" "custom-id" "fuzzy"))))
"[[%s]]")
;; Otherwise, just obey to `:format'.
- (`angle "<%s>")
- (`plain "%s")
+ ('angle "<%s>")
+ ('plain "%s")
(f (error "Wrong `:format' value: %s" f)))))
(format fmt
(pcase type
(let* ((repeat-string
(concat
(pcase (org-element-property :repeater-type timestamp)
- (`cumulate "+") (`catch-up "++") (`restart ".+"))
+ ('cumulate "+") ('catch-up "++") ('restart ".+"))
(let ((val (org-element-property :repeater-value timestamp)))
(and val (number-to-string val)))
(pcase (org-element-property :repeater-unit timestamp)
- (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y"))))
+ ('hour "h") ('day "d") ('week "w") ('month "m") ('year "y"))))
(warning-string
(concat
(pcase (org-element-property :warning-type timestamp)
- (`first "--") (`all "-"))
+ ('first "--") ('all "-"))
(let ((val (org-element-property :warning-value timestamp)))
(and val (number-to-string val)))
(pcase (org-element-property :warning-unit timestamp)
- (`hour "h") (`day "d") (`week "w") (`month "m") (`year "y"))))
+ ('hour "h") ('day "d") ('week "w") ('month "m") ('year "y"))))
(build-ts-string
;; Build an Org timestamp string from TIME. ACTIVEP is
;; non-nil when time stamp is active. If WITH-TIME-P is
ts)))
(type (org-element-property :type timestamp)))
(pcase type
- ((or `active `inactive)
+ ((or 'active 'inactive)
(let* ((minute-start (org-element-property :minute-start timestamp))
(minute-end (org-element-property :minute-end timestamp))
(hour-start (org-element-property :hour-start timestamp))
(and hour-start minute-start)
(and time-range-p hour-end)
(and time-range-p minute-end))))
- ((or `active-range `inactive-range)
+ ((or 'active-range 'inactive-range)
(let ((minute-start (org-element-property :minute-start timestamp))
(minute-end (org-element-property :minute-end timestamp))
(hour-start (org-element-property :hour-start timestamp))
`table-row' or nil."
(if parentp
(pcase type
- (`headline 'section)
- (`inlinetask 'planning)
- (`plain-list 'item)
- (`property-drawer 'node-property)
- (`section 'planning)
- (`table 'table-row))
+ ('headline 'section)
+ ('inlinetask 'planning)
+ ('plain-list 'item)
+ ('property-drawer 'node-property)
+ ('section 'planning)
+ ('table 'table-row))
(pcase type
- (`item 'item)
- (`node-property 'node-property)
- (`planning 'property-drawer)
- (`table-row 'table-row))))
+ ('item 'item)
+ ('node-property 'node-property)
+ ('planning 'property-drawer)
+ ('table-row 'table-row))))
(defun org-element--parse-elements
(beg end mode structure granularity visible-only acc)
lower element
upper element)))))
(pcase side
- (`both (cons lower upper))
- (`nil lower)
+ ('both (cons lower upper))
+ ('nil lower)
(_ upper))))
(defun org-element--cache-put (element)
;; case for headline editing: if a headline is modified but
;; not removed, do not extend.
(when (pcase org-element--cache-change-warning
- (`t t)
- (`headline
+ ('t t)
+ ('headline
(not (and (org-with-limited-levels (org-at-heading-p))
(= (line-end-position) bottom))))
(_
(defun org-entities--user-safe-p (v)
"Non-nil if V is a safe value for `org-entities-user'."
(pcase v
- (`nil t)
+ ('nil t)
(`(,(and (pred stringp)
(pred (string-match-p "\\`[a-zA-Z][a-zA-Z0-9]*\\'")))
,(pred stringp) ,(pred booleanp) ,(pred stringp)
(defun org-gnus-store-link ()
"Store a link to a Gnus folder or message."
(pcase major-mode
- (`gnus-group-mode
+ ('gnus-group-mode
(let ((group (gnus-group-group-name)))
(when group
(org-store-link-props :type "gnus" :group group)
(let ((description (org-gnus-group-link group)))
(org-add-link-props :link description :description description)
description))))
- ((or `gnus-summary-mode `gnus-article-mode)
+ ((or 'gnus-summary-mode 'gnus-article-mode)
(let* ((group
(pcase (gnus-find-method-for-group gnus-newsgroup-name)
(`(nnvirtual . ,_)
(description (org-email-link-description)))
(org-add-link-props :link link :description description)
link)))
- (`message-mode
+ ('message-mode
(setq org-store-link-plist nil) ;reset
(save-excursion
(save-restriction
a heading. Moreover, if is is `inlinetask', the first star will
have `org-warning' face."
(let* ((line (aref (pcase heading
- (`nil org-indent--text-line-prefixes)
- (`inlinetask org-indent--inlinetask-line-prefixes)
+ ('nil org-indent--text-line-prefixes)
+ ('inlinetask org-indent--inlinetask-line-prefixes)
(_ org-indent--heading-line-prefixes))
level))
(wrap
(manual (car parts))
(node (or (nth 1 parts) "Top")))
(pcase format
- (`html
+ ('html
(format "<a href=\"%s#%s\">%s</a>"
(org-info-map-html-url manual)
(org-info--expand-node-name node)
(or desc path)))
- (`texinfo
+ ('texinfo
(let ((title (or desc "")))
(format "@ref{%s,%s,,%s,}" node title manual)))
(_ nil))))
"Hide inline tasks in buffer when STATE is `contents' or `children'.
This function is meant to be used in `org-cycle-hook'."
(pcase state
- (`contents
+ ('contents
(let ((regexp (org-inlinetask-outline-regexp)))
(save-excursion
(goto-char (point-min))
(while (re-search-forward regexp nil t)
(org-inlinetask-toggle-visibility)
(org-inlinetask-goto-end)))))
- (`children
+ ('children
(save-excursion
(while
(or (org-inlinetask-at-task-p)
(lambda (datum)
(let ((key (org-element-property :key datum)))
(pcase (org-element-type datum)
- (`keyword
+ ('keyword
(let ((value (org-element-property :value datum)))
(and (string= key "PROPERTY")
(string-match deprecated-re value)
(format "Deprecated syntax for \"%s\". \
Use header-args instead"
(match-string-no-properties 1 value))))))
- (`node-property
+ ('node-property
(and (member-ignore-case key deprecated-babel-properties)
(list
(org-element-property :begin datum)
(let ((name (org-trim (match-string-no-properties 0)))
(element (org-element-at-point)))
(pcase (org-element-type element)
- ((or `drawer `property-drawer)
+ ((or 'drawer 'property-drawer)
(goto-char (org-element-property :end element))
nil)
- ((or `comment-block `example-block `export-block `src-block
- `verse-block)
+ ((or 'comment-block 'example-block 'export-block 'src-block
+ 'verse-block)
nil)
(_
(push (list (line-beginning-position)
node-property src-block)
(lambda (datum)
(pcase (org-element-type datum)
- ((or `babel-call `inline-babel-call)
+ ((or 'babel-call 'inline-babel-call)
(funcall verify
datum
nil
(list
(org-element-property :inside-header datum)
(org-element-property :end-header datum)))))
- (`inline-src-block
+ ('inline-src-block
(funcall verify
datum
(org-element-property :language datum)
(org-babel-parse-header-arguments
(org-element-property :parameters datum))))
- (`keyword
+ ('keyword
(when (string= (org-element-property :key datum) "PROPERTY")
(let ((value (org-element-property :value datum)))
(when (string-match "\\`header-args\\(?::\\(\\S-+\\)\\)?\\+? *"
(match-string 1 value)
(org-babel-parse-header-arguments
(substring value (match-end 0))))))))
- (`node-property
+ ('node-property
(let ((key (org-element-property :key datum)))
(when (let ((case-fold-search t))
(string-match "\\`HEADER-ARGS\\(?::\\(\\S-+\\)\\)?\\+?"
(match-string 1 key)
(org-babel-parse-header-arguments
(org-element-property :value datum))))))
- (`src-block
+ ('src-block
(funcall verify
datum
(org-element-property :language datum)
(org-babel-parse-header-arguments
(org-trim
(pcase type
- (`src-block
+ ('src-block
(mapconcat
#'identity
(cons (org-element-property :parameters datum)
(org-element-property :header datum))
" "))
- (`inline-src-block
+ ('inline-src-block
(or (org-element-property :parameters datum) ""))
(_
(concat
\\{org-lint--report-mode-map}"
(setf tabulated-list-format
`[("Line" 6
- (lambda (a b)
- (< (string-to-number (aref (cadr a) 0))
- (string-to-number (aref (cadr b) 0))))
+ ,(lambda (a b)
+ (< (string-to-number (aref (cadr a) 0))
+ (string-to-number (aref (cadr b) 0))))
:right-align t)
("Trust" 5 t)
("Warning" 0 t)])
(message "Org linting process starting..."))
(let ((checkers
(pcase arg
- (`nil org-lint--checkers)
- (`(4)
+ ('nil org-lint--checkers)
+ ('(4)
(let ((category
(completing-read
"Checker category: "
(lambda (c)
(assoc-string (org-lint-checker-categories c) category))
org-lint--checkers)))
- (`(16)
+ ('(16)
(list
(let ((name (completing-read
"Checker name: "
(start (and (not splice)
(org-list--generic-eval
(pcase type
- (`ordered ostart)
- (`unordered ustart)
+ ('ordered ostart)
+ ('unordered ustart)
(_ dstart))
depth)))
(end (and (not splice)
(org-list--generic-eval
(pcase type
- (`ordered oend)
- (`unordered uend)
+ ('ordered oend)
+ ('unordered uend)
(_ dend))
depth))))
;; Make sure trailing newlines in END appear in the output by
(separator (and (org-export-get-next-element item info)
(org-list--generic-eval isep type depth)))
(closing (pcase (org-list--generic-eval iend type depth)
- ((or `nil "") "\n")
+ ((or 'nil "") "\n")
((and (guard separator) s)
(if (equal (substring s -1) "\n") s (concat s "\n")))
(s s))))
(or dtstart dtend ddstart ddend)))
(concat
(pcase (org-element-property :checkbox item)
- (`on cbon)
- (`off cboff)
- (`trans cbtrans))
+ ('on cbon)
+ ('off cboff)
+ ('trans cbtrans))
(and tag
(concat dtstart
(if backend
LIST is as returned by `org-list-to-lisp'. PARAMS is a property
list with overruling parameters for `org-list-to-generic'."
(let* ((blank (pcase (cdr (assq 'heading org-blank-before-new-entry))
- (`t t)
- (`auto (save-excursion
+ ('t t)
+ ('auto (save-excursion
(org-with-limited-levels (outline-previous-heading))
(org-previous-line-empty-p)))))
(level (org-reduced-level (or (org-current-level) 0)))
(let ((kwds org-todo-keywords-1))
(org-mouse-keyword-menu
kwds
- `(lambda (kwd) (org-todo kwd))
+ (lambda (kwd) (org-todo kwd))
(lambda (kwd) (equal state kwd))))))
(defun org-mouse-tag-menu () ;todo
(defun org-mouse-agenda-type (type)
(pcase type
- (`tags "Tags: ")
- (`todo "TODO: ")
- (`tags-tree "Tags tree: ")
- (`todo-tree "TODO tree: ")
- (`occur-tree "Occur tree: ")
+ ('tags "Tags: ")
+ ('todo "TODO: ")
+ ('tags-tree "Tags tree: ")
+ ('todo-tree "TODO tree: ")
+ ('occur-tree "Occur tree: ")
(_ "Agenda command ???")))
(defun org-mouse-list-options-menu (alloptions &optional function)
(y-labels (plist-get params :ylabels))
(plot-str "'%s' using %s%d%s with %s title '%s'")
(plot-cmd (pcase type
- (`2d "plot")
- (`3d "splot")
- (`grid "splot")))
+ ('2d "plot")
+ ('3d "splot")
+ ('grid "splot")))
(script "reset")
;; ats = add-to-script
(ats (lambda (line) (setf script (concat script "\n" line))))
(funcall ats (format "set term %s" (file-name-extension file)))
(funcall ats (format "set output '%s'" file)))
(pcase type ; type
- (`2d ())
- (`3d (when map (funcall ats "set map")))
- (`grid (funcall ats (if map "set pm3d map" "set pm3d"))))
+ ('2d ())
+ ('3d (when map (funcall ats "set map")))
+ ('grid (funcall ats (if map "set pm3d map" "set pm3d"))))
(when title (funcall ats (format "set title '%s'" title))) ; title
(mapc ats lines) ; line
(dolist (el sets) (funcall ats (format "set %s" el))) ; set
"%Y-%m-%d-%H:%M:%S") "\"")))
(unless preface
(pcase type ; plot command
- (`2d (dotimes (col num-cols)
+ ('2d (dotimes (col num-cols)
(unless (and (eq type '2d)
(or (and ind (equal (1+ col) ind))
(and deps (not (member (1+ col) deps)))))
(or (nth col col-labels)
(format "%d" (1+ col))))
plot-lines)))))
- (`3d
+ ('3d
(setq plot-lines (list (format "'%s' matrix with %s title ''"
data-file with))))
- (`grid
+ ('grid
(setq plot-lines (list (format "'%s' with %s title ''"
data-file with)))))
(funcall ats
(setf params (org-plot/collect-options params))))
;; Dump table to datafile (very different for grid).
(pcase (plist-get params :plot-type)
- (`2d (org-plot/gnuplot-to-data table data-file params))
- (`3d (org-plot/gnuplot-to-data table data-file params))
- (`grid (let ((y-labels (org-plot/gnuplot-to-grid-data
+ ('2d (org-plot/gnuplot-to-data table data-file params))
+ ('3d (org-plot/gnuplot-to-data table data-file params))
+ ('grid (let ((y-labels (org-plot/gnuplot-to-grid-data
table data-file params)))
(when y-labels (plist-put params :ylabels y-labels)))))
;; Check for timestamp ind column.
(defun org-src-switch-to-buffer (buffer context)
(pcase org-src-window-setup
- (`current-window (pop-to-buffer-same-window buffer))
- (`other-window
+ ('current-window (pop-to-buffer-same-window buffer))
+ ('other-window
(switch-to-buffer-other-window buffer))
- (`other-frame
+ ('other-frame
(pcase context
- (`exit
+ ('exit
(let ((frame (selected-frame)))
(switch-to-buffer-other-frame buffer)
(delete-frame frame)))
- (`save
+ ('save
(kill-buffer (current-buffer))
(pop-to-buffer-same-window buffer))
(_ (switch-to-buffer-other-frame buffer))))
- (`reorganize-frame
+ ('reorganize-frame
(when (eq context 'edit) (delete-other-windows))
(org-switch-to-buffer-other-window buffer)
(when (eq context 'exit) (delete-other-windows)))
- (`switch-invisibly (set-buffer buffer))
+ ('switch-invisibly (set-buffer buffer))
(_
(message "Invalid value %s for `org-src-window-setup'"
org-src-window-setup)
;; Make sure that contents are exported as Org data when :raw
;; parameter is non-nil.
,(when (and backend (plist-get params :raw))
- `(setq contents
+ '(setq contents
;; Since we don't know what are the pseudo object
;; types defined in backend, we cannot pass them to
;; `org-element-interpret-data'. As a consequence,
next to tags."
(mapconcat (lambda (token)
(pcase token
- (`(:startgroup) "{")
- (`(:endgroup) "}")
- (`(:startgrouptag) "[")
- (`(:endgrouptag) "]")
- (`(:grouptags) ":")
- (`(:newline) "\\n")
+ ('(:startgroup) "{")
+ ('(:endgroup) "}")
+ ('(:startgrouptag) "[")
+ ('(:endgrouptag) "]")
+ ('(:grouptags) ":")
+ ('(:newline) "\\n")
((and
(guard (not skip-key))
`(,(and tag (pred stringp)) . ,(and key (pred characterp))))
(when (eq group-status 'append)
(push (nreverse current-group) groups))
(setq group-status nil current-group nil))
- (`(:grouptags) (setq group-status 'append))
+ ('(:grouptags) (setq group-status 'append))
((and `(,tag . ,_) (guard group-status))
(if (eq group-status 'append) (push tag current-group)
(setq current-group (list tag))))
When optional argument PARENT is non-nil, consider parent
headline instead of current one."
(pcase (assq 'heading org-blank-before-new-entry)
- (`(heading . auto)
+ ('(heading . auto)
(save-excursion
(org-with-limited-levels
(unless (and (org-before-first-heading-p)
(let ((todo (and (not no-todo) (match-string 2)))
(priority (and (not no-priority) (match-string 3)))
(headline (pcase (match-string 4)
- (`nil "")
+ ('nil "")
((and (guard no-comment) h)
(replace-regexp-in-string
(eval-when-compile
(template (buffer-substring beg end))
(shift-n (and doshift (string-to-number (match-string 1 shift))))
(shift-what (pcase (and doshift (match-string 2 shift))
- (`nil nil)
+ ('nil nil)
("d" 'day)
("w" (setq shift-n (* 7 shift-n)) 'day)
("m" 'month)
(push (cons f (copy-sequence org-store-link-plist))
results-alist)))
(pcase results-alist
- (`nil nil)
+ ('nil nil)
(`((,_ . ,_)) t) ;single choice: nothing to do
(`((,name . ,_) . ,_)
;; Reinstate link plist associated to the chosen
#'identity
(append
(pcase org-refile-use-outline-path
- (`file (list (file-name-nondirectory
+ ('file (list (file-name-nondirectory
(buffer-file-name
(buffer-base-buffer)))))
- (`full-file-path
+ ('full-file-path
(list (buffer-file-name
(buffer-base-buffer))))
- (`buffer-name
+ ('buffer-name
(list (buffer-name
(buffer-base-buffer))))
(_ nil))
old-date)
(match-string 1 old-date)))))
(pcase arg
- (`(4)
+ ('(4)
(when (and old-date log)
(org-add-log-setup (if deadline? 'deldeadline 'delschedule)
nil old-date log))
(org-remove-timestamp-with-keyword keyword)
(message (if deadline? "Item no longer has a deadline."
"Item is no longer scheduled.")))
- (`(16)
+ ('(16)
(save-excursion
(org-back-to-heading t)
(let ((regexp (if deadline? org-deadline-time-regexp
(nreverse (org-split-string tags ":")))))
res)
(pcase onoff
- (`off (setq current (delete tag current)))
- ((or `on (guard (not (member tag current))))
+ ('off (setq current (delete tag current)))
+ ((or 'on (guard (not (member tag current))))
(setq res t)
(cl-pushnew tag current :test #'equal))
(_ (setq current (delete tag current))))
(interactive "sTags: ")
(let ((data
(pcase (if (stringp data) (org-trim data) data)
- ((or `nil "") nil)
+ ((or 'nil "") nil)
((pred listp) (format ":%s:" (mapconcat #'identity data ":")))
((pred stringp)
(format ":%s:"
This is a wrapper to handle the brain-dead convention in calendar that
user function argument order change dependent on argument order."
(pcase calendar-date-style
- (`american (list arg1 arg2 arg3))
- (`european (list arg2 arg1 arg3))
- (`iso (list arg2 arg3 arg1))))
+ ('american (list arg1 arg2 arg3))
+ ('european (list arg2 arg1 arg3))
+ ('iso (list arg2 arg3 arg1))))
(defun org-eval-in-calendar (form &optional keepdate)
"Eval FORM in the calendar window and return to current window.
(pcase origin-cat
;; `day' category ends before `hour' if any, or at the end
;; of the day name.
- (`day (min (or (match-beginning 7) (1- (match-end 5))) origin))
- (`hour (min (match-end 7) origin))
- (`minute (min (1- (match-end 8)) origin))
+ ('day (min (or (match-beginning 7) (1- (match-end 5))) origin))
+ ('hour (min (match-end 7) origin))
+ ('minute (min (1- (match-end 8)) origin))
((pred integerp) (min (1- (match-end 0)) origin))
;; Point was right after the time-stamp. However, the
;; time-stamp length might have changed, so refer to
;; (match-end 0) instead.
- (`after (match-end 0))
+ ('after (match-end 0))
;; `year' and `month' have both fixed size: point couldn't
;; have moved into another part.
(_ origin))))
(let ((element (org-element-at-point)))
(barf-if-buffer-read-only)
(pcase (org-element-type element)
- (`src-block
+ ('src-block
(if (not arg) (org-edit-src-code)
(let* ((info (org-babel-get-src-block-info))
(lang (nth 0 info))
(switch-to-buffer
(funcall (intern (concat "org-babel-prep-session:" lang))
session params))))))
- (`keyword
+ ('keyword
(if (member (org-element-property :key element) '("INCLUDE" "SETUPFILE"))
(org-open-link-from-string
(format "[[%s]]"
(match-string 0 value))
(t (user-error "No valid file specified")))))))
(user-error "No special environment to edit here")))
- (`table
+ ('table
(if (eq (org-element-property :type element) 'table.el)
(org-edit-table.el)
(call-interactively 'org-table-edit-formulas)))
;; Only Org tables contain `table-row' type elements.
- (`table-row (call-interactively 'org-table-edit-formulas))
- (`example-block (org-edit-src-code))
- (`export-block (org-edit-export-block))
- (`fixed-width (org-edit-fixed-width-region))
- (`latex-environment (org-edit-latex-environment))
+ ('table-row (call-interactively 'org-table-edit-formulas))
+ ('example-block (org-edit-src-code))
+ ('export-block (org-edit-export-block))
+ ('fixed-width (org-edit-fixed-width-region))
+ ('latex-environment (org-edit-latex-environment))
(_
;; No notable element at point. Though, we may be at a link or
;; a footnote reference, which are objects. Thus, scan deeper.
(let ((context (org-element-context element)))
(pcase (org-element-type context)
- (`footnote-reference (org-edit-footnote-reference))
- (`inline-src-block (org-edit-inline-src-code))
- (`link (call-interactively #'ffap))
+ ('footnote-reference (org-edit-footnote-reference))
+ ('inline-src-block (org-edit-inline-src-code))
+ ('link (call-interactively #'ffap))
(_ (user-error "No special environment to edit here"))))))))
(defvar org-table-coordinate-overlays) ; defined in org-table.el
;; a src block. Hence, we first check if point is in such
;; a block and then if it is at a blank line.
(pcase type
- ((or `inline-src-block `src-block)
+ ((or 'inline-src-block 'src-block)
(unless org-babel-no-eval-on-ctrl-c-ctrl-c
(org-babel-eval-wipe-error-buffer)
(org-babel-execute-src-block
(user-error
(substitute-command-keys
"`\\[org-ctrl-c-ctrl-c]' can do nothing useful here"))))
- ((or `babel-call `inline-babel-call)
+ ((or 'babel-call 'inline-babel-call)
(let ((info (org-babel-lob-get-info context)))
(when info (org-babel-execute-src-block nil info))))
- (`clock (org-clock-update-time-maybe))
- (`dynamic-block
+ ('clock (org-clock-update-time-maybe))
+ ('dynamic-block
(save-excursion
(goto-char (org-element-property :post-affiliated context))
(org-update-dblock)))
- (`footnote-definition
+ ('footnote-definition
(goto-char (org-element-property :post-affiliated context))
(call-interactively 'org-footnote-action))
- (`footnote-reference (call-interactively #'org-footnote-action))
- ((or `headline `inlinetask)
+ ('footnote-reference (call-interactively #'org-footnote-action))
+ ((or 'headline 'inlinetask)
(save-excursion (goto-char (org-element-property :begin context))
(call-interactively #'org-set-tags)))
- (`item
+ ('item
;; At an item: `C-u C-u' sets checkbox to "[-]"
;; unconditionally, whereas `C-u' will toggle its presence.
;; Without a universal argument, if the item has a checkbox,
(when block-item
(message "Checkboxes were removed due to empty box at line %d"
(org-current-line block-item))))))
- (`keyword
+ ('keyword
(let ((org-inhibit-startup-visibility-stuff t)
(org-startup-align-all-tables nil))
(when (boundp 'org-table-coordinate-overlays)
(setq org-table-coordinate-overlays nil))
(org-save-outline-visibility 'use-markers (org-mode-restart)))
(message "Local setup has been refreshed"))
- (`plain-list
+ ('plain-list
;; At a plain list, with a double C-u argument, set
;; checkboxes of each item to "[-]", whereas a single one
;; will toggle their presence according to the state of the
struct (org-list-parents-alist struct) old-struct)
(org-update-checkbox-count-maybe)
(save-excursion (goto-char beginm) (org-list-send-list 'maybe))))
- ((or `property-drawer `node-property)
+ ((or 'property-drawer 'node-property)
(call-interactively #'org-property-action))
- (`radio-target
+ ('radio-target
(call-interactively #'org-update-radio-target-regexp))
- (`statistics-cookie
+ ('statistics-cookie
(call-interactively #'org-update-statistics-cookies))
- ((or `table `table-cell `table-row)
+ ((or 'table 'table-cell 'table-row)
;; At a table, recalculate every field and align it. Also
;; send the table if necessary. If the table has
;; a `table.el' type, just give up. At a table row or cell,
(cond (arg (call-interactively #'org-table-recalculate))
((org-table-maybe-recalculate-line))
(t (org-table-align))))))
- ((or `timestamp (and `planning (guard (org-at-timestamp-p 'lax))))
+ ((or 'timestamp (and 'planning (guard (org-at-timestamp-p 'lax))))
(org-timestamp-change 0 'day))
- ((and `nil (guard (org-at-heading-p)))
+ ((and 'nil (guard (org-at-heading-p)))
;; When point is on an unsupported object type, we can miss
;; the fact that it also is at a heading. Handle it here.
(call-interactively #'org-set-tags))
INFO is a plist used as a communication channel."
(pcase (org-element-type element)
;; Elements with an absolute width: `headline' and `inlinetask'.
- (`inlinetask (plist-get info :ascii-inlinetask-width))
- (`headline
+ ('inlinetask (plist-get info :ascii-inlinetask-width))
+ ('headline
(- (plist-get info :ascii-text-width)
(let ((low-level-rank (org-export-low-level-p element info)))
(if low-level-rank (* low-level-rank 2)
(while (and (not justification)
(setq element (org-element-property :parent element)))
(pcase (org-element-type element)
- (`center-block (setq justification 'center))
- (`special-block
+ ('center-block (setq justification 'center))
+ ('special-block
(let ((name (org-element-property :type element)))
(cond ((string= name "JUSTIFYRIGHT") (setq justification 'right))
((string= name "JUSTIFYLEFT") (setq justification 'left)))))))
element info nil 'org-ascii--has-caption-p))
(title-fmt (org-ascii--translate
(pcase (org-element-type element)
- (`table "Table %d:")
- (`src-block "Listing %d:"))
+ ('table "Table %d:")
+ ('src-block "Listing %d:"))
info)))
(org-ascii--fill-string
(concat (format title-fmt reference)
`org-export-resolve-id-link'. INFO is the communication channel,
as a plist."
(pcase (org-element-type datum)
- (`plain-text (format "See file %s" datum)) ;External file
- (`headline
+ ('plain-text (format "See file %s" datum)) ;External file
+ ('headline
(format (org-ascii--translate "See section %s" info)
(if (org-export-numbered-headline-p datum info)
(mapconcat #'number-to-string
(org-element-lineage datum
'(headline paragraph src-block table) t)))
(pcase (org-element-type enumerable)
- (`headline
+ ('headline
(format (org-ascii--translate "See section %s" info)
(if (org-export-numbered-headline-p enumerable info)
(mapconcat #'number-to-string number ".")
(org-element-property :title enumerable) info))))
((guard (not number))
(org-ascii--translate "Unknown reference" info))
- (`paragraph
+ ('paragraph
(format (org-ascii--translate "See figure %s" info) number))
- (`src-block
+ ('src-block
(format (org-ascii--translate "See listing %s" info) number))
- (`table
+ ('table
(format (org-ascii--translate "See table %s" info) number))
(_ (org-ascii--translate "Unknown reference" info)))))))
INFO is a plist used as a communication channel."
(let ((utf8p (eq (plist-get info :ascii-charset) 'utf-8)))
(pcase (org-element-property :checkbox item)
- (`on (if utf8p "☑ " "[X] "))
- (`off (if utf8p "☠" "[ ] "))
- (`trans (if utf8p "☒ " "[-] ")))))
+ ('on (if utf8p "☑ " "[X] "))
+ ('off (if utf8p "☠" "[ ] "))
+ ('trans (if utf8p "☒ " "[-] ")))))
\f
;; First parent of ITEM is always the plain-list. Get
;; `:type' property from it.
(pcase list-type
- (`descriptive
+ ('descriptive
(concat checkbox
(org-export-data (org-element-property :tag item)
info)))
- (`ordered
+ ('ordered
;; Return correct number for ITEM, paying attention to
;; counters.
(let* ((struct (org-element-property :structure item))
(format " (%s)"
(org-ascii--describe-datum destination info)))))
;; External file.
- (`plain-text destination)
- (`headline
+ ('plain-text destination)
+ ('headline
(if (org-export-numbered-headline-p destination info)
(mapconcat #'number-to-string
(org-export-get-headline-number destination info)
(match-string 1 options)
default)))
(pcase opt
- (`path (setq template
+ ('path (setq template
(replace-regexp-in-string
"%SCRIPT_PATH" val template t t)))
- (`sdepth (when (integerp (read val))
+ ('sdepth (when (integerp (read val))
(setq sdepth (min (read val) sdepth))))
- (`tdepth (when (integerp (read val))
+ ('tdepth (when (integerp (read val))
(setq tdepth (min (read val) tdepth))))
(_ (setq val
(cond
(extra-newline (if (and (org-string-nw-p contents) headline) "\n" "")))
(concat
(pcase type
- (`ordered
+ ('ordered
(let* ((counter term-counter-id)
(extra (if counter (format " value=\"%s\"" counter) "")))
(concat
(format "<li%s%s>" class extra)
(when headline (concat headline br)))))
- (`unordered
+ ('unordered
(let* ((id term-counter-id)
(extra (if id (format " id=\"%s\"" id) "")))
(concat
(format "<li%s%s>" class extra)
(when headline (concat headline br)))))
- (`descriptive
+ ('descriptive
(let* ((term term-counter-id))
(setq term (or term "(no term)"))
;; Check-boxes in descriptive lists are associated to tag.
(and (org-string-nw-p contents) (org-trim contents))
extra-newline
(pcase type
- (`ordered "</li>")
- (`unordered "</li>")
- (`descriptive "</dd>")))))
+ ('ordered "</li>")
+ ('unordered "</li>")
+ ('descriptive "</dd>")))))
(defun org-html-item (item contents info)
"Transcode an ITEM element from Org to HTML.
(cons 'plain-text org-element-all-objects)
(lambda (obj)
(pcase (org-element-type obj)
- (`plain-text (org-string-nw-p obj))
- (`link (if (= link-count 1) t
+ ('plain-text (org-string-nw-p obj))
+ ('link (if (= link-count 1) t
(cl-incf link-count)
(not (org-export-inline-image-p
obj (plist-get info :html-inline-image-rules)))))
(lambda (paragraph) (org-element-property :caption paragraph))"
(let ((paragraph (pcase (org-element-type element)
- (`paragraph element)
- (`link (org-export-get-parent element)))))
+ ('paragraph element)
+ ('link (org-export-get-parent element)))))
(and (eq (org-element-type paragraph) 'paragraph)
(or (not (fboundp 'org-html-standalone-image-predicate))
(funcall org-html-standalone-image-predicate paragraph))
(cons 'plain-text org-element-all-objects)
(lambda (obj)
(when (pcase (org-element-type obj)
- (`plain-text (org-string-nw-p obj))
- (`link (or (> (cl-incf link-count) 1)
+ ('plain-text (org-string-nw-p obj))
+ ('link (or (> (cl-incf link-count) 1)
(not (org-html-inline-image-p obj info))))
(_ t))
(throw 'exit nil)))
(org-export-resolve-id-link link info))))
(pcase (org-element-type destination)
;; ID link points to an external file.
- (`plain-text
+ ('plain-text
(let ((fragment (concat "ID-" path))
;; Treat links to ".org" files as ".html", if needed.
(path (funcall link-org-files-as-html-maybe
(format "<a href=\"%s#%s\"%s>%s</a>"
path fragment attributes (or desc destination))))
;; Fuzzy link points nowhere.
- (`nil
+ ('nil
(format "<i>%s</i>"
(or desc
(org-export-data
(org-element-property :raw-link link) info))))
;; Link points to a headline.
- (`headline
+ ('headline
(let ((href (or (org-element-property :CUSTOM_ID destination)
(org-export-get-reference destination info)))
;; What description to use?
CONTENTS is the contents of the list. INFO is a plist holding
contextual information."
(let* ((type (pcase (org-element-property :type plain-list)
- (`ordered "ol")
- (`unordered "ul")
- (`descriptive "dl")
+ ('ordered "ol")
+ ('unordered "ul")
+ ('descriptive "dl")
(other (error "Unknown HTML list type: %s" other))))
(class (format "org-%s" type))
(attributes (org-export-read-attribute :attr_html plain-list)))
nil t))))
;; Return proper string, depending on FLOAT.
(pcase float
- (`wrap (format "\\begin{wrapfigure}%s
+ ('wrap (format "\\begin{wrapfigure}%s
%s%s
%s%s
%s\\end{wrapfigure}"
(if center "\\centering" "")
comment-include image-code
(if caption-above-p "" caption)))
- (`sideways (format "\\begin{sidewaysfigure}
+ ('sideways (format "\\begin{sidewaysfigure}
%s%s
%s%s
%s\\end{sidewaysfigure}"
(if center "\\centering" "")
comment-include image-code
(if caption-above-p "" caption)))
- (`multicolumn (format "\\begin{figure*}%s
+ ('multicolumn (format "\\begin{figure*}%s
%s%s
%s%s
%s\\end{figure*}"
(if center "\\centering" "")
comment-include image-code
(if caption-above-p "" caption)))
- (`figure (format "\\begin{figure}%s
+ ('figure (format "\\begin{figure}%s
%s%s
%s%s
%s\\end{figure}"
;; Non-nil when OBJ can be added to the latex math block B.
(lambda (obj b)
(pcase (org-element-type obj)
- (`entity (org-element-property :latex-math-p obj))
- (`latex-fragment
+ ('entity (org-element-property :latex-math-p obj))
+ ('latex-fragment
(let ((value (org-element-property :value obj)))
(or (string-prefix-p "\\(" value)
(string-match-p "\\`\\$[^$]" value))))
- ((and type (or `subscript `superscript))
+ ((and type (or 'subscript 'superscript))
(not (memq type (mapcar #'org-element-type
(org-element-contents b)))))))))
(org-element-map data '(entity latex-fragment subscript superscript)
(let* ((bullet (org-element-property :bullet item))
(type (org-element-property :type (org-element-property :parent item)))
(checkbox (pcase (org-element-property :checkbox item)
- (`on "\\o'\\(sq\\(mu'")
- (`off "\\(sq ")
- (`trans "\\o'\\(sq\\(mi'")))
+ ('on "\\o'\\(sq\\(mu'")
+ ('off "\\(sq ")
+ ('trans "\\o'\\(sq\\(mi'")))
(tag (let ((tag (org-element-property :tag item)))
;; Check-boxes must belong to the tag.
(push "|" alignment))
(push
(concat (pcase (org-export-table-cell-alignment cell info)
- (`left "l") (`right "r") (`center "c"))
+ ('left "l") ('right "r") ('center "c"))
width
divider)
alignment)
(concat bullet
(make-string (- 4 (length bullet)) ? )
(pcase (org-element-property :checkbox item)
- (`on "[X] ")
- (`trans "[-] ")
- (`off "[ ] "))
+ ('on "[X] ")
+ ('trans "[-] ")
+ ('off "[ ] "))
(let ((tag (org-element-property :tag item)))
(and tag (format "**%s:** "(org-export-data tag info))))
(and contents
(org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info))))
(pcase (org-element-type destination)
- (`plain-text ; External file.
+ ('plain-text ; External file.
(let ((path (funcall link-org-files-as-md destination)))
(if (not contents) (format "<%s>" path)
(format "[%s](%s)" contents path))))
- (`headline
+ ('headline
(format
"[%s](#%s)"
;; Description.
(let ((first-child (car (org-element-contents h)))
(new-section (org-element-create 'section)))
(pcase (org-element-type first-child)
- (`section nil)
- (`nil (org-element-adopt-elements h new-section))
+ ('section nil)
+ ('nil (org-element-adopt-elements h new-section))
(_ (org-element-insert-before new-section first-child))))))
tree)
(project-plist (cdr project))
(publishing-function
(pcase (org-publish-property :publishing-function project)
- (`nil (user-error "No publishing function chosen"))
+ ('nil (user-error "No publishing function chosen"))
((and f (pred listp)) f)
(f (list f))))
(base-dir
(file-name-as-directory
(org-publish-property :base-directory project)))))
(pcase style
- (`list
+ ('list
(cons 'unordered
(mapcar
(lambda (f)
style
project)))
files)))
- (`tree
+ ('tree
(letrec ((files-only (cl-remove-if #'directory-name-p files))
(directories (cl-remove-if-not #'directory-name-p files))
(subtree-to-list
(let ((retval t))
;; First we sort files:
(pcase sort-files
- (`alphabetically
+ ('alphabetically
(let ((A (if (funcall org-file-p a)
(concat (file-name-directory a)
(org-publish-find-title a project))
(if ignore-case
(not (string-lessp (upcase B) (upcase A)))
(not (string-lessp B A))))))
- ((or `anti-chronologically `chronologically)
+ ((or 'anti-chronologically 'chronologically)
(let* ((adate (org-publish-find-date a project))
(bdate (org-publish-find-date b project))
(A (+ (ash (car adate) 16) (cadr adate)))
(if (eq sort-files 'chronologically)
(<= A B)
(>= A B)))))
- (`nil nil)
+ ('nil nil)
(_ (user-error "Invalid sort value %s" sort-files)))
;; Directory-wise wins:
(when (memq sort-folders '(first last))
"[[%s][%s]]"
;; Destination.
(pcase (car target)
- (`nil (format "file:%s" file))
- (`id (format "id:%s" (cdr target)))
- (`custom-id (format "file:%s::#%s" file (cdr target)))
+ ('nil (format "file:%s" file))
+ ('id (format "id:%s" (cdr target)))
+ ('custom-id (format "file:%s::#%s" file (cdr target)))
(_ (format "file:%s::*%s" file (cdr target))))
;; Description.
(car (last entry)))))
INFO is a plist used as a communication channel. See
`org-texinfo-text-markup-alist' for details."
(pcase (cdr (assq markup org-texinfo-text-markup-alist))
- (`nil text) ;no markup: return raw text
- (`code (format "@code{%s}" (org-texinfo--sanitize-content text)))
- (`samp (format "@samp{%s}" (org-texinfo--sanitize-content text)))
- (`verb
+ ('nil text) ;no markup: return raw text
+ ('code (format "@code{%s}" (org-texinfo--sanitize-content text)))
+ ('samp (format "@samp{%s}" (org-texinfo--sanitize-content text)))
+ ('verb
(let ((separator (org-texinfo--find-verb-separator text)))
(format "@verb{%s%s%s}" separator text separator)))
;; Else use format string.
unnumbered)
((org-export-numbered-headline-p headline info) numbered)
(t unnumbered)))
- (`nil 'plain-list)
+ ('nil 'plain-list)
(_ (user-error "Invalid Texinfo class specification: %S" class))))
(_ (user-error "Invalid Texinfo class specification: %S" class)))))))
(list tag))))))
(format "%s\n%s"
(pcase items
- (`nil "@item")
+ ('nil "@item")
(`(,item) (concat "@item " item))
(`(,item . ,items)
(concat "@item " item "\n"
(org-export-resolve-fuzzy-link link info)
(org-export-resolve-id-link link info))))
(pcase (org-element-type destination)
- (`nil
+ ('nil
(format org-texinfo-link-with-unknown-path-format
(org-texinfo--sanitize-content path)))
;; Id link points to an external file.
- (`plain-text
+ ('plain-text
(if desc (format "@uref{file://%s,%s}" destination desc)
(format "@uref{file://%s}" destination)))
- ((or `headline
+ ((or 'headline
;; Targets within headlines cannot be turned into
;; @anchor{}, so we refer to the headline parent
;; directly.
- (and `target
+ (and 'target
(guard (eq 'headline
(org-element-type
(org-element-property :parent destination))))))
(let ((value (org-texinfo-plain-text
(org-timestamp-translate timestamp) info)))
(pcase (org-element-property :type timestamp)
- ((or `active `active-range)
+ ((or 'active 'active-range)
(format (plist-get info :texinfo-active-timestamp-format) value))
- ((or `inactive `inactive-range)
+ ((or 'inactive 'inactive-range)
(format (plist-get info :texinfo-inactive-timestamp-format) value))
(_ (format (plist-get info :texinfo-diary-timestamp-format) value)))))
(progn ,@body)
(org-link-broken
(pcase (plist-get info :with-broken-links)
- (`nil (user-error "Unable to resolve link: %S" (nth 1 err)))
- (`mark (org-export-data
+ ('nil (user-error "Unable to resolve link: %S" (nth 1 err)))
+ ('mark (org-export-data
(format "[BROKEN LINK: %s]" (nth 1 err)) info))
(_ nil))))))
(let* ((type (org-element-type data))
A search cell is the internal representation of a fuzzy link. It
ignores white spaces and statistics cookies, if applicable."
(pcase (org-element-type datum)
- (`headline
+ ('headline
(let ((title (split-string
(replace-regexp-in-string
"\\[[0-9]*\\(?:%\\|/[0-9]*\\)\\]" ""
(cons 'other title)
(let ((custom-id (org-element-property :custom-id datum)))
(and custom-id (cons 'custom-id custom-id)))))))
- (`target
+ ('target
(list (cons 'target (split-string (org-element-property :value datum)))))
((and (let name (org-element-property :name datum))
(guard name))
(defsubst bubbles--grid-width ()
"Return the grid width for the current game theme."
(car (pcase bubbles-game-theme
- (`easy
+ ('easy
bubbles--grid-small)
- (`medium
+ ('medium
bubbles--grid-medium)
- (`difficult
+ ('difficult
bubbles--grid-large)
- (`hard
+ ('hard
bubbles--grid-huge)
- (`user-defined
+ ('user-defined
bubbles-grid-size))))
(defsubst bubbles--grid-height ()
"Return the grid height for the current game theme."
(cdr (pcase bubbles-game-theme
- (`easy
+ ('easy
bubbles--grid-small)
- (`medium
+ ('medium
bubbles--grid-medium)
- (`difficult
+ ('difficult
bubbles--grid-large)
- (`hard
+ ('hard
bubbles--grid-huge)
- (`user-defined
+ ('user-defined
bubbles-grid-size))))
(defsubst bubbles--colors ()
"Return the color list for the current game theme."
(pcase bubbles-game-theme
- (`easy
+ ('easy
bubbles--colors-2)
- (`medium
+ ('medium
bubbles--colors-3)
- (`difficult
+ ('difficult
bubbles--colors-4)
- (`hard
+ ('hard
bubbles--colors-5)
- (`user-defined
+ ('user-defined
bubbles-colors)))
(defsubst bubbles--shift-mode ()
"Return the shift mode for the current game theme."
(pcase bubbles-game-theme
- (`easy
+ ('easy
'default)
- (`medium
+ ('medium
'default)
- (`difficult
+ ('difficult
'always)
- (`hard
+ ('hard
'always)
- (`user-defined
+ ('user-defined
bubbles-shift-mode)))
(defun bubbles-save-settings ()
(when (and (display-images-p)
(not (eq bubbles-graphics-theme 'ascii)))
(let ((template (pcase bubbles-graphics-theme
- (`circles bubbles--image-template-circle)
- (`balls bubbles--image-template-ball)
- (`squares bubbles--image-template-square)
- (`diamonds bubbles--image-template-diamond)
- (`emacs bubbles--image-template-emacs))))
+ ('circles bubbles--image-template-circle)
+ ('balls bubbles--image-template-ball)
+ ('squares bubbles--image-template-square)
+ ('diamonds bubbles--image-template-diamond)
+ ('emacs bubbles--image-template-emacs))))
(setq bubbles--empty-image
(create-image (replace-regexp-in-string
"^\"\\(.*\\)\t.*c .*\",$"
(let ((data (gamegrid-match-spec-list data-spec-list))
(color (gamegrid-match-spec-list color-spec-list)))
(pcase data
- (`color-x
+ ('color-x
(gamegrid-make-color-x-face color))
- (`grid-x
+ ('grid-x
(unless gamegrid-grid-x-face
(setq gamegrid-grid-x-face (gamegrid-make-grid-x-face)))
gamegrid-grid-x-face)
- (`mono-x
+ ('mono-x
(unless gamegrid-mono-x-face
(setq gamegrid-mono-x-face (gamegrid-make-mono-x-face)))
gamegrid-mono-x-face)
- (`color-tty
+ ('color-tty
(gamegrid-make-color-tty-face color))
- (`mono-tty
+ ('mono-tty
(unless gamegrid-mono-tty-face
(setq gamegrid-mono-tty-face (gamegrid-make-mono-tty-face)))
gamegrid-mono-tty-face))))
specified by the variable `temporary-file-directory'. If necessary,
FILE is created there."
(pcase system-type
- ((or `ms-dos `windows-nt)
+ ((or 'ms-dos 'windows-nt)
(gamegrid-add-score-insecure file score))
(_
(gamegrid-add-score-with-update-game-score file score))))
(setq-local syntax-propertize-function
(syntax-propertize-rules ("\\<dnl\\>" (0 "<"))))
(setq-local font-lock-defaults
- `(autoconf-font-lock-keywords nil nil))
+ '(autoconf-font-lock-keywords nil nil))
(setq-local imenu-generic-expression autoconf-imenu-generic-expression)
(setq-local indent-line-function #'indent-relative)
(setq-local add-log-current-defun-function
((eq position 'bol)
(if (and (cc-bytecomp-fboundp 'line-beginning-position) (not point))
- `(line-beginning-position)
+ '(line-beginning-position)
`(save-excursion
,@(if point `((goto-char ,point)))
(beginning-of-line)
((eq position 'eol)
(if (and (cc-bytecomp-fboundp 'line-end-position) (not point))
- `(line-end-position)
+ '(line-end-position)
`(save-excursion
,@(if point `((goto-char ,point)))
(end-of-line)
((eq position 'bopl)
(if (and (cc-bytecomp-fboundp 'line-beginning-position) (not point))
- `(line-beginning-position 0)
+ '(line-beginning-position 0)
`(save-excursion
,@(if point `((goto-char ,point)))
(forward-line -1)
((eq position 'bonl)
(if (and (cc-bytecomp-fboundp 'line-beginning-position) (not point))
- `(line-beginning-position 2)
+ '(line-beginning-position 2)
`(save-excursion
,@(if point `((goto-char ,point)))
(forward-line 1)
((eq position 'eopl)
(if (and (cc-bytecomp-fboundp 'line-end-position) (not point))
- `(line-end-position 0)
+ '(line-end-position 0)
`(save-excursion
,@(if point `((goto-char ,point)))
(beginning-of-line)
((eq position 'eonl)
(if (and (cc-bytecomp-fboundp 'line-end-position) (not point))
- `(line-end-position 2)
+ '(line-end-position 2)
`(save-excursion
,@(if point `((goto-char ,point)))
(forward-line 1)
;; Get the regular expression `sentence-end'.
(if (cc-bytecomp-fboundp 'sentence-end)
;; Emacs 22:
- `(sentence-end)
+ '(sentence-end)
;; Emacs <22 + XEmacs
- `sentence-end))
+ 'sentence-end))
(defmacro c-default-value-sentence-end ()
;; Get the default value of the variable sentence end.
(if (cc-bytecomp-fboundp 'sentence-end)
;; Emacs 22:
- `(let (sentence-end) (sentence-end))
+ '(let (sentence-end) (sentence-end))
;; Emacs <22 + XEmacs
- `(default-value 'sentence-end)))
+ '(default-value 'sentence-end)))
;; The following is essentially `save-buffer-state' from lazy-lock.el.
;; It ought to be a standard macro.
A LIMIT for the search may be given. The start position is assumed to be
before it."
- `(let ((dest (c-safe-scan-lists ,(or pos `(point)) 1 0 ,limit)))
+ `(let ((dest (c-safe-scan-lists ,(or pos '(point)) 1 0 ,limit)))
(when dest (goto-char dest) dest)))
(defmacro c-go-list-backward (&optional pos limit)
A LIMIT for the search may be given. The start position is assumed to be
after it."
- `(let ((dest (c-safe-scan-lists ,(or pos `(point)) -1 0 ,limit)))
+ `(let ((dest (c-safe-scan-lists ,(or pos '(point)) -1 0 ,limit)))
(when dest (goto-char dest) dest)))
(defmacro c-up-list-forward (&optional pos limit)
A limit for the search may be given. The start position is assumed to
be before it."
- `(c-safe-scan-lists ,(or pos `(point)) 1 1 ,limit))
+ `(c-safe-scan-lists ,(or pos '(point)) 1 1 ,limit))
(defmacro c-up-list-backward (&optional pos limit)
"Return the position of the start of the list sexp containing POS,
A limit for the search may be given. The start position is assumed to
be after it."
- `(c-safe-scan-lists ,(or pos `(point)) -1 1 ,limit))
+ `(c-safe-scan-lists ,(or pos '(point)) -1 1 ,limit))
(defmacro c-down-list-forward (&optional pos limit)
"Return the first position inside the first list sexp after POS,
A limit for the search may be given. The start position is assumed to
be before it."
- `(c-safe-scan-lists ,(or pos `(point)) 1 -1 ,limit))
+ `(c-safe-scan-lists ,(or pos '(point)) 1 -1 ,limit))
(defmacro c-down-list-backward (&optional pos limit)
"Return the last position inside the last list sexp before POS,
A limit for the search may be given. The start position is assumed to
be after it."
- `(c-safe-scan-lists ,(or pos `(point)) -1 -1 ,limit))
+ `(c-safe-scan-lists ,(or pos '(point)) -1 -1 ,limit))
(defmacro c-go-up-list-forward (&optional pos limit)
"Move the point to the first position after the list sexp containing POS,
;; c-beginning-of-statement-1.
;; Languages which don't have EOL terminated statements always return NIL
;; (they _know_ there's no vsemi ;-).
- `(if c-vsemi-status-unknown-p-fn (funcall c-vsemi-status-unknown-p-fn)))
+ '(if c-vsemi-status-unknown-p-fn (funcall c-vsemi-status-unknown-p-fn)))
\f
(defmacro c-benign-error (format &rest args)
(defmacro c-looking-at-non-alphnumspace ()
"Are we looking at a character which isn't alphanumeric or space?"
(if (memq 'gen-comment-delim c-emacs-features)
- `(looking-at
-"\\([;#]\\|\\'\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s$\\|\\s<\\|\\s>\\|\\s!\\)")
- `(or (looking-at
-"\\([;#]\\|\\'\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s$\\|\\s<\\|\\s>\\)"
- (let ((prop (c-get-char-property (point) 'syntax-table)))
- (eq prop '(14))))))) ; '(14) is generic comment delimiter.
+ '(looking-at
+ "\\([;#]\\|\\'\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s$\\|\\s<\\|\\s>\\|\\s!\\)")
+ '(or (looking-at
+ "\\([;#]\\|\\'\\|\\s(\\|\\s)\\|\\s\"\\|\\s\\\\|\\s$\\|\\s<\\|\\s>\\)"
+ (let ((prop (c-get-char-property (point) 'syntax-table)))
+ (eq prop '(14))))))) ; '(14) is generic comment delimiter.
\f
(defsubst c-intersect-lists (list alist)
non-nil, a caret is prepended to invert the set."
;; This function ought to be in the elisp core somewhere.
(let ((str (if inverted "^" "")) char char2)
- (setq chars (sort (append chars nil) `<))
+ (setq chars (sort (append chars nil) #'<))
(while chars
(setq char (pop chars))
(if (memq char '(?\\ ?^ ?-))
`(let ((beg ,beg) (end ,end))
(put-text-property beg end 'c-is-sws t)
,@(when (facep 'c-debug-is-sws-face)
- `((c-debug-add-face beg end 'c-debug-is-sws-face)))))
+ '((c-debug-add-face beg end 'c-debug-is-sws-face)))))
(defmacro c-put-in-sws (beg end)
;; This macro does a hidden buffer change.
`(let ((beg ,beg) (end ,end))
(put-text-property beg end 'c-in-sws t)
,@(when (facep 'c-debug-is-sws-face)
- `((c-debug-add-face beg end 'c-debug-in-sws-face)))))
+ '((c-debug-add-face beg end 'c-debug-in-sws-face)))))
(defmacro c-remove-is-sws (beg end)
;; This macro does a hidden buffer change.
`(let ((beg ,beg) (end ,end))
(remove-text-properties beg end '(c-is-sws nil))
,@(when (facep 'c-debug-is-sws-face)
- `((c-debug-remove-face beg end 'c-debug-is-sws-face)))))
+ '((c-debug-remove-face beg end 'c-debug-is-sws-face)))))
(defmacro c-remove-in-sws (beg end)
;; This macro does a hidden buffer change.
`(let ((beg ,beg) (end ,end))
(remove-text-properties beg end '(c-in-sws nil))
,@(when (facep 'c-debug-is-sws-face)
- `((c-debug-remove-face beg end 'c-debug-in-sws-face)))))
+ '((c-debug-remove-face beg end 'c-debug-in-sws-face)))))
(defmacro c-remove-is-and-in-sws (beg end)
;; This macro does a hidden buffer change.
`(let ((beg ,beg) (end ,end))
(remove-text-properties beg end '(c-is-sws nil c-in-sws nil))
,@(when (facep 'c-debug-is-sws-face)
- `((c-debug-remove-face beg end 'c-debug-is-sws-face)
+ '((c-debug-remove-face beg end 'c-debug-is-sws-face)
(c-debug-remove-face beg end 'c-debug-in-sws-face)))))
;; The type of literal position `end' is in a `before-change-functions'
`(let (res)
(setq c-last-identifier-range nil)
(while (if (setq res ,(if (eq type 'type)
- `(c-forward-type)
- `(c-forward-name)))
+ '(c-forward-type)
+ '(c-forward-name)))
nil
(cond ((looking-at c-keywords-regexp)
(c-forward-keyword-clause 1))
(when (memq res '(t known found prefix maybe))
(when c-record-type-identifiers
,(if (eq type 'type)
- `(c-record-type-id c-last-identifier-range)
- `(c-record-ref-id c-last-identifier-range)))
+ '(c-record-type-id c-last-identifier-range)
+ '(c-record-ref-id c-last-identifier-range)))
t)))
(defmacro c-forward-id-comma-list (type update-safe-pos)
;; This macro might do hidden buffer changes.
`(while (and (progn
,(when update-safe-pos
- `(setq safe-pos (point)))
+ '(setq safe-pos (point)))
(eq (char-after) ?,))
(progn
(forward-char)
;; a comma. If either of <symbol> or bracketed <expression> is missing,
;; throw nil to 'level. If the terminating } or ) is unmatched, throw nil
;; to 'done. This is not a general purpose macro!
- `(while (eq (char-before) ?,)
+ '(while (eq (char-before) ?,)
(backward-char)
(c-backward-syntactic-ws)
(when (not (memq (char-before) '(?\) ?})))
,@(when (c-major-mode-is 'pike-mode)
;; Recognize hashbangs in Pike.
- `((eval . (list "\\`#![^\n\r]*"
+ '((eval . (list "\\`#![^\n\r]*"
0 c-preprocessor-face-name))))
;; Make hard spaces visible through an inverted `font-lock-warning-face'.
;; Fontify generic colon labels in languages that support them.
,@(when (c-lang-const c-recognize-colon-labels)
- `(c-font-lock-labels))))
+ '(c-font-lock-labels))))
(c-lang-defconst c-complex-decl-matchers
"Complex font lock matchers for types and declarations. Used on level
;; Fontify angle bracket arglists like templates in C++.
,@(when (c-lang-const c-recognize-<>-arglists)
- `(c-font-lock-<>-arglists))
+ '(c-font-lock-<>-arglists))
,@(when (c-major-mode-is 'c++-mode)
- `(c-font-lock-c++-lambda-captures))
+ '(c-font-lock-c++-lambda-captures))
;; The first two rules here mostly find occurrences that
;; `c-font-lock-declarations' has found already, but not
,@(when (c-major-mode-is 'c++-mode)
;; This pattern is a probably a "(MATCHER . ANCHORED-HIGHLIGHTER)"
;; (see Elisp page "Search-based Fontification").
- `(("\\<new\\>"
+ '(("\\<new\\>"
(c-font-lock-c++-new))))
))
t `(,@(when (c-lang-const c-brace-list-decl-kwds)
;; Fontify the remaining identifiers inside an enum list when we start
;; inside it.
- `(c-font-lock-enum-tail
- ;; Fontify the identifiers inside enum lists. (The enum type
- ;; name is handled by `c-simple-decl-matchers' or
- ;; `c-complex-decl-matchers' below.
+ '(c-font-lock-enum-tail
+ ;; Fontify the identifiers inside enum lists. (The enum type
+ ;; name is handled by `c-simple-decl-matchers' or
+ ;; `c-complex-decl-matchers' below.
c-font-lock-enum-body))
;; Fontify labels after goto etc.
(if (> (point) limit) (goto-char limit))))))))
,@(when (c-major-mode-is 'java-mode)
- `((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face))))
+ '((eval . (list "\\<\\(@[a-zA-Z0-9]+\\)\\>" 1 c-annotation-face))))
))
(c-lang-defconst c-matchers-1
["Forward Statement" c-end-of-statement t]
,@(when (c-lang-const c-opt-cpp-prefix)
;; Only applicable if there's a cpp preprocessor.
- `(["Up Conditional" c-up-conditional t]
+ '(["Up Conditional" c-up-conditional t]
["Backward Conditional" c-backward-conditional t]
["Forward Conditional" c-forward-conditional t]
"----"
;; its compiler directives as single keyword tokens.
;; This is then necessary since it's assumed that
;; every keyword is a single symbol.
- `(modify-syntax-entry ?@ "_" table))
+ '(modify-syntax-entry ?@ "_" table))
((c-major-mode-is 'pike-mode)
- `(modify-syntax-entry ?@ "." table)))
+ '(modify-syntax-entry ?@ "." table)))
table)))
(c-lang-defconst c-mode-syntax-table
;; Primary.
,@(c-lang-const c-identifier-ops)
,@(cond ((or (c-major-mode-is 'c++-mode) (c-major-mode-is 'java-mode))
- `((postfix-if-paren "<" ">"))) ; Templates.
+ '((postfix-if-paren "<" ">"))) ; Templates.
((c-major-mode-is 'pike-mode)
- `((prefix "global" "predef")))
+ '((prefix "global" "predef")))
((c-major-mode-is 'java-mode)
- `((prefix "super"))))
+ '((prefix "super"))))
;; Postfix.
,@(when (c-major-mode-is 'c++-mode)
;; The following need special treatment.
- `((prefix "dynamic_cast" "static_cast"
+ '((prefix "dynamic_cast" "static_cast"
"reinterpret_cast" "const_cast" "typeid"
"alignof")))
(left-assoc "."
;; Member selection.
,@(when (c-major-mode-is 'c++-mode)
- `((left-assoc ".*" "->*")))
+ '((left-assoc ".*" "->*")))
;; Multiplicative.
(left-assoc "*" "/" "%")
(beginning-of-line 2)
(list ,file ,line)))
(defmacro cperl-etags-snarf-tag (_file _line)
- `(etags-snarf-tag)))
+ '(etags-snarf-tag)))
(if (featurep 'xemacs)
(defmacro cperl-etags-goto-tag-location (elt)
;;(progn
(ebrowse-redraw-tree)
(set-buffer-modified-p nil)
(pcase pop
- (`switch (switch-to-buffer name))
- (`pop (pop-to-buffer name)))
+ ('switch (switch-to-buffer name))
+ ('pop (pop-to-buffer name)))
(current-buffer)))
(setq view-mode-hook nil))
(push 'ebrowse-find-pattern view-mode-hook)
(pcase where
- (`other-window (view-file-other-window file))
- (`other-frame (ebrowse-view-file-other-frame file))
+ ('other-window (view-file-other-window file))
+ ('other-frame (ebrowse-view-file-other-frame file))
(_ (view-file file))))
(t
(pcase where
- (`other-window (find-file-other-window file))
- (`other-frame (find-file-other-frame file))
+ ('other-window (find-file-other-window file))
+ ('other-frame (find-file-other-frame file))
(_ (find-file file)))
(ebrowse-find-pattern struc info))))
(ebrowse-ms
(setf pattern
(pcase member-list
- ((or `ebrowse-ts-member-variables
- `ebrowse-ts-static-variables
- `ebrowse-ts-types)
+ ((or 'ebrowse-ts-member-variables
+ 'ebrowse-ts-static-variables
+ 'ebrowse-ts-types)
(ebrowse-variable-declaration-regexp
(ebrowse-bs-name position)))
(_
(2 (ebrowse-find-member-definition))
(1 (pcase (get-text-property (posn-point (event-start event))
'ebrowse-what)
- (`member-name
+ ('member-name
(ebrowse-popup-menu ebrowse-member-name-object-menu event))
- (`class-name
+ ('class-name
(ebrowse-popup-menu ebrowse-member-class-name-object-menu event))
(_
(ebrowse-popup-menu ebrowse-member-buffer-object-menu event))))))
(2 (ebrowse-find-member-definition))
(1 (pcase (get-text-property (posn-point (event-start event))
'ebrowse-what)
- (`member-name
+ ('member-name
(ebrowse-view-member-definition 0))))))
(insert kind)
(indent-to 50)
(insert (pcase (cl-second info)
- (`ebrowse-ts-member-functions "member function")
- (`ebrowse-ts-member-variables "member variable")
- (`ebrowse-ts-static-functions "static function")
- (`ebrowse-ts-static-variables "static variable")
- (`ebrowse-ts-friends (if globals-p "define" "friend"))
- (`ebrowse-ts-types "type")
+ ('ebrowse-ts-member-functions "member function")
+ ('ebrowse-ts-member-variables "member variable")
+ ('ebrowse-ts-static-functions "static function")
+ ('ebrowse-ts-static-variables "static variable")
+ ('ebrowse-ts-friends (if globals-p "define" "friend"))
+ ('ebrowse-ts-types "type")
(_ "unknown"))
"\n")))
(pcase (event-click-count event)
(1
(pcase property
- (`class-name
+ ('class-name
(ebrowse-popup-menu ebrowse-tree-buffer-class-object-menu event))
(_
(ebrowse-popup-menu ebrowse-tree-buffer-object-menu event)))))))
(property (get-text-property where 'ebrowse-what)))
(pcase (event-click-count event)
(1 (pcase property
- (`class-name
+ ('class-name
(ebrowse-tree-command:show-member-functions)))))))
(property (get-text-property where 'ebrowse-what)))
(pcase (event-click-count event)
(2 (pcase property
- (`class-name
+ ('class-name
(let ((collapsed (save-excursion (skip-chars-forward "^\r\n")
(looking-at "\r"))))
(ebrowse-collapse-fn (not collapsed))))
- (`mark
+ ('mark
(ebrowse-toggle-mark-at-point 1)))))))
(unless
(setq res
(pcase sexp
- (`(,(or `let `let*) ,bindings)
+ (`(,(or 'let 'let*) ,bindings)
(let ((vars vars))
(when (eq 'let* (car sexp))
(dolist (binding (cdr (reverse bindings)))
(push (or (car-safe binding) binding) vars)))
(elisp--local-variables-1
vars (car (cdr-safe (car (last bindings)))))))
- (`(,(or `let `let*) ,bindings . ,body)
+ (`(,(or 'let 'let*) ,bindings . ,body)
(let ((vars vars))
(dolist (binding bindings)
(push (or (car-safe binding) binding) vars))
;; FIXME: Handle `cond'.
(`(,_ . ,_)
(elisp--local-variables-1 vars (car (last sexp))))
- (`elisp--witness--lisp (or vars '(nil)))
+ ('elisp--witness--lisp (or vars '(nil)))
(_ nil)))
;; We didn't find the witness in the last element so we try to
;; backtrack to the last-but-one.
(pcase parent
;; FIXME: Rather than hardcode special cases here,
;; we should use something like a symbol-property.
- (`declare
+ ('declare
(list t (mapcar (lambda (x) (symbol-name (car x)))
(delete-dups
;; FIXME: We should include some
(append macro-declarations-alist
defun-declarations-alist
nil))))) ; Copy both alists.
- ((and (or `condition-case `condition-case-unless-debug)
+ ((and (or 'condition-case 'condition-case-unless-debug)
(guard (save-excursion
(ignore-errors
(forward-sexp 2)
(< (point) beg)))))
(list t obarray
:predicate (lambda (sym) (get sym 'error-conditions))))
- ((and (or ?\( `let `let*)
+ ((and (or ?\( 'let 'let*)
(guard (save-excursion
(goto-char (1- beg))
(when (eq parent ?\()
(defun flymake-cc-use-special-make-target ()
"Command for checking a file via a CHK_SOURCES Make target."
(unless (executable-find "make") (error "Make not found"))
- `("make" "check-syntax" "CHK_SOURCES=-x c -"))
+ '("make" "check-syntax" "CHK_SOURCES=-x c -"))
(defvar-local flymake-cc--proc nil "Internal variable for `flymake-gcc'")
(put :warning 'flymake-category 'flymake-warning)
(put :note 'flymake-category 'flymake-note)
-(defvar flymake-diagnostic-types-alist `() "")
+(defvar flymake-diagnostic-types-alist '() "")
(make-obsolete-variable
'flymake-diagnostic-types-alist
"Set properties on the diagnostic symbols instead. See Info
;;; Mode-line and menu
;;;
(easy-menu-define flymake-menu flymake-mode-map "Flymake"
- `("Flymake"
+ '("Flymake"
[ "Go to next problem" flymake-goto-next-error t ]
[ "Go to previous problem" flymake-goto-prev-error t ]
[ "Check now" flymake-start t ]
[ "Go to log buffer" flymake-switch-to-log-buffer t ]
[ "Turn off Flymake" flymake-mode t ]))
-(defvar flymake--mode-line-format `(:eval (flymake--mode-line-format)))
+(defvar flymake--mode-line-format '(:eval (flymake--mode-line-format)))
(put 'flymake--mode-line-format 'risky-local-variable t)
map))
,@(pcase-let ((`(,ind ,face ,explain)
(cond ((null known)
- `("?" mode-line "No known backends"))
+ '("?" mode-line "No known backends"))
(some-waiting
`("Wait" compilation-mode-line-run
,(format "Waiting for %s running backend(s)"
(length some-waiting))))
(all-disabled
- `("!" compilation-mode-line-run
+ '("!" compilation-mode-line-run
"All backends disabled"))
(t
- `(nil nil nil)))))
+ '(nil nil nil)))))
(when ind
`((":"
(:propertize ,ind
"Flymake diagnostics"
"A mode for listing Flymake diagnostics."
(setq tabulated-list-format
- `[("Line" 5 (lambda (l1 l2)
- (< (plist-get (car l1) :line)
- (plist-get (car l2) :line)))
+ `[("Line" 5 ,(lambda (l1 l2)
+ (< (plist-get (car l1) :line)
+ (plist-get (car l2) :line)))
:right-align t)
("Col" 3 nil :right-align t)
- ("Type" 8 (lambda (l1 l2)
- (< (plist-get (car l1) :severity)
- (plist-get (car l2) :severity))))
+ ("Type" 8 ,(lambda (l1 l2)
+ (< (plist-get (car l1) :severity)
+ (plist-get (car l2) :severity))))
("Message" 0 t)])
(setq tabulated-list-entries
'flymake--diagnostics-buffer-entries)
;; `byte-compile', but simple benchmarks indicate that it's probably not
;; worth the trouble (about 0.5% of slow down).
(eval ;I hate `eval', but it's hard to avoid it here.
- `(syntax-propertize-rules
+ '(syntax-propertize-rules
("^[CcDd\\*]" (0 "<"))
;; We mark all chars after line-length as "comment-start", rather than
;; just the first one. This is so that a closing ' that's past the
'exec-plus)
((and
(grep-probe find-program `(nil nil nil ,null-device "-print0"))
- (grep-probe xargs-program `(nil nil nil "-0" "echo")))
+ (grep-probe xargs-program '(nil nil nil "-0" "echo")))
'gnu)
(t
'exec))))
nil
(if gdb-show-changed-values
(or parent (pcase status
- (`changed 'font-lock-warning-face)
- (`out-of-scope 'shadow)
+ ('changed 'font-lock-warning-face)
+ ('out-of-scope 'shadow)
(_ t)))
t)
depth)
nil
(if gdb-show-changed-values
(or parent (pcase status
- (`changed 'font-lock-warning-face)
- (`out-of-scope 'shadow)
+ ('changed 'font-lock-warning-face)
+ ('out-of-scope 'shadow)
(_ t)))
t)
depth)
(defun gud-tooltip-print-command (expr)
"Return a suitable command to print the expression EXPR."
(pcase gud-minor-mode
- (`gdbmi (concat "-data-evaluate-expression \"" expr "\""))
- (`guiler expr)
- (`dbx (concat "print " expr))
- ((or `xdb `pdb) (concat "p " expr))
- (`sdb (concat expr "/"))))
+ ('gdbmi (concat "-data-evaluate-expression \"" expr "\""))
+ ('guiler expr)
+ ('dbx (concat "print " expr))
+ ((or 'xdb 'pdb) (concat "p " expr))
+ ('sdb (concat expr "/"))))
(declare-function gdb-input "gdb-mi" (command handler &optional trigger))
(declare-function tooltip-expr-to-print "tooltip" (event))
;; Menus - using easymenu.el
(defvar idlwave-mode-menu-def
- `("IDLWAVE"
+ '("IDLWAVE"
["PRO/FUNC menu" idlwave-function-menu t]
("Motion"
["Subprogram Start" idlwave-beginning-of-subprogram t]
["Kill auto-created buffers" idlwave-kill-autoloaded-buffers t]
"--"
["Insert TAB character" idlwave-hard-tab t])
- "--"
+ "--"
("External"
["Start IDL shell" idlwave-shell t]
["Edit file in IDLDE" idlwave-edit-in-idlde t]
Update parsing information up to point, referring to parse,
prev-parse-point, goal-point, and open-items bound lexically in
the body of `js--ensure-cache'."
- `(progn
+ '(progn
(setq goal-point (point))
(goto-char prev-parse-point)
(while (progn
;; the given depth -- i.e., make sure we're deeper than the target
;; depth.
(cl-assert (> (nth 0 parse)
- (js--pitem-paren-depth (car open-items))))
+ (js--pitem-paren-depth (car open-items))))
(setq parse (parse-partial-sexp
prev-parse-point goal-point
(js--pitem-paren-depth (car open-items))
(defun js--js-decode-retval (result)
(pcase (intern (cl-first result))
- (`atom (cl-second result))
- (`special (intern (cl-second result)))
- (`array
+ ('atom (cl-second result))
+ ('special (intern (cl-second result)))
+ ('array
(mapcar #'js--js-decode-retval (cl-second result)))
- (`objid
+ ('objid
(or (gethash (cl-second result)
js--js-references)
(puthash (cl-second result)
:process (inferior-moz-process))
js--js-references)))
- (`error (signal 'js-js-error (list (cl-second result))))
+ ('error (signal 'js-js-error (list (cl-second result))))
(x (error "Unmatched case in js--js-decode-retval: %S" x))))
(defvar comint-last-input-end)
(when (or (null js--js-context)
(js--js-handle-expired-p (cdr js--js-context))
(pcase (car js--js-context)
- (`window (js? (js< (cdr js--js-context) "closed")))
- (`browser (not (js? (js< (cdr js--js-context)
+ ('window (js? (js< (cdr js--js-context) "closed")))
+ ('browser (not (js? (js< (cdr js--js-context)
"contentDocument"))))
(x (error "Unmatched case in js--get-js-context: %S" x))))
(setq js--js-context (js--read-tab "JavaScript Context: ")))
(defun js--js-content-window (context)
(with-js
(pcase (car context)
- (`window (cdr context))
- (`browser (js< (cdr context)
+ ('window (cdr context))
+ ('browser (js< (cdr context)
"contentWindow" "wrappedJSObject"))
(x (error "Unmatched case in js--js-content-window: %S" x)))))
;;(defconst m4-program-options '("--prefix-builtins"))
(defvar m4-font-lock-keywords
- `(
- ("\\(\\_<\\(m4_\\)?dnl\\_>\\).*$" . font-lock-comment-face)
+ '(("\\(\\_<\\(m4_\\)?dnl\\_>\\).*$" . font-lock-comment-face)
("\\$[*#@0-9]" . font-lock-variable-name-face)
("\\$\\@" . font-lock-variable-name-face)
("\\$\\*" . font-lock-variable-name-face)
"List of keywords understood by gmake.")
(defconst makefile-bsdmake-statements
- `(".elif" ".elifdef" ".elifmake" ".elifndef" ".elifnmake" ".else" ".endfor"
+ '(".elif" ".elifdef" ".elifmake" ".elifndef" ".elifnmake" ".else" ".endfor"
".endif" ".for" ".if" ".ifdef" ".ifmake" ".ifndef" ".ifnmake" ".undef")
"List of keywords understood by BSD make.")
(set (make-local-variable 'comment-start) "*")
(set (make-local-variable 'comment-start-skip) "^\\*[ \t]*")
(set (make-local-variable 'font-lock-defaults)
- `(mixal-font-lock-keywords))
+ '(mixal-font-lock-keywords))
(set (make-local-variable 'syntax-propertize-function)
mixal-syntax-propertize-function)
;; might add an indent function in the future
;; - The inner VAR/TYPE are indented just like the outer VAR/TYPE.
;; - The inner PROCEDURE is not aligned with its VAR/TYPE siblings.
(pcase (cons kind token)
- (`(:elem . basic) m2-indent)
- (`(:after . ":=") (or m2-indent smie-indent-basic))
+ ('(:elem . basic) m2-indent)
+ ('(:after . ":=") (or m2-indent smie-indent-basic))
(`(:after . ,(or "CONST" "VAR" "TYPE"))
(or m2-indent smie-indent-basic))
;; (`(:before . ,(or `"VAR" `"TYPE" `"CONST"))
;; (if (smie-rule-parent-p "PROCEDURE") 0))
- (`(:after . ";-block")
+ ('(:after . ";-block")
(if (smie-rule-parent-p "PROCEDURE")
(smie-rule-parent (or m2-indent smie-indent-basic))))
- (`(:before . "|") (smie-rule-separator kind))
+ ('(:before . "|") (smie-rule-separator kind))
))
;;;###autoload
;; disadvantages:
;; - changes to octave-block-offset wouldn't take effect immediately.
;; - edebug wouldn't show the use of this variable.
- (`(:elem . basic) octave-block-offset)
+ ('(:elem . basic) octave-block-offset)
(`(:list-intro . ,(or "global" "persistent")) t)
;; Since "case" is in the same BNF rules as switch..end, SMIE by default
;; aligns it with "switch".
- (`(:before . "case") (if (not (smie-rule-sibling-p)) octave-block-offset))
- (`(:after . ";")
+ ('(:before . "case") (if (not (smie-rule-sibling-p)) octave-block-offset))
+ ('(:after . ";")
(if (apply #'smie-rule-parent-p octave--block-offset-keywords)
(smie-rule-parent octave-block-offset)
;; For (invalid) code between switch and case.
;;
;; Return the value according to style.
(pcase octave-eldoc-message-style
- (`auto (if (< (length oneline) (window-width (minibuffer-window)))
+ ('auto (if (< (length oneline) (window-width (minibuffer-window)))
oneline
multiline))
- (`oneline oneline)
- (`multiline multiline)))))
+ ('oneline oneline)
+ ('multiline multiline)))))
(defcustom octave-help-buffer "*Octave Help*"
"Buffer name for `octave-help'."
opascal-directives)
"OPascal4 keywords.")
-(defconst opascal-previous-terminators `(semicolon comma)
+(defconst opascal-previous-terminators '(semicolon comma)
"Expression/statement terminators that denote a previous expression.")
(defconst opascal-comments
`(except finally ,@opascal-visibilities)
"Statements that mark mid sections of the enclosing block.")
-(defconst opascal-end-block-statements `(end until)
+(defconst opascal-end-block-statements '(end until)
"Statements that end block sections.")
(defconst opascal-match-block-statements
'(interface implementation program library package)
"Unit sections within which the indent is 0.")
-(defconst opascal-use-clauses `(uses requires exports contains)
+(defconst opascal-use-clauses '(uses requires exports contains)
"Statements that refer to foreign symbols.")
(defconst opascal-unit-statements
(defun prolog-smie-rules (kind token)
(pcase (cons kind token)
- (`(:elem . basic) prolog-indent-width)
+ ('(:elem . basic) prolog-indent-width)
;; The list of arguments can never be on a separate line!
(`(:list-intro . ,_) t)
;; When we don't know how to indent an empty line, assume the most
;; likely token will be ";".
- (`(:elem . empty-line-token) ";")
- (`(:after . ".") '(column . 0)) ;; To work around smie-closer-alist.
+ ('(:elem . empty-line-token) ";")
+ ('(:after . ".") '(column . 0)) ;; To work around smie-closer-alist.
;; Allow indentation of if-then-else as:
;; ( test
;; -> thenrule
(smie-indent-backward-token)
(smie-rule-bolp))))
prolog-indent-width))
- (`(:after . ";")
+ ('(:after . ";")
;; Align with same-line comment as in:
;; ; %% Toto
;; foo
;; Only do it for small offsets, since the comment may actually be
;; an "end-of-line" comment at comment-column!
(if (<= offset prolog-indent-width) offset))))
- (`(:after . ",")
+ ('(:after . ",")
;; Special indent for:
;; foopredicate(x) :- !,
;; toto.
(smie-indent-backward-token) ;Skip !
(equal ":-" (car (smie-indent-backward-token))))
(smie-rule-parent prolog-indent-width)))
- (`(:after . ":-")
+ ('(:after . ":-")
(if (bolp)
(save-excursion
(smie-indent-forward-token)
prolog-indent-width
(min prolog-indent-width (current-column))))
prolog-indent-width))
- (`(:after . "-->") prolog-indent-width)))
+ ('(:after . "-->") prolog-indent-width)))
\f
;;-------------------------------------------------------------------
(defun ps-mode-smie-rules (kind token)
(pcase (cons kind token)
- (`(:after . "<") (when (smie-rule-next-p "<") 0))
- (`(:elem . basic) ps-mode-tab)
- (`(:close-all . ">") t)
+ ('(:after . "<") (when (smie-rule-next-p "<") 0))
+ ('(:elem . basic) ps-mode-tab)
+ ('(:close-all . ">") t)
(`(:list-intro . ,_) t)))
;;;###autoload
(substitute-key-definition 'complete-symbol 'completion-at-point
map global-map)
(easy-menu-define python-menu map "Python Mode menu"
- `("Python"
+ '("Python"
:help "Python-specific Features"
["Shift region left" python-indent-shift-left :active mark-active
:help "Shift region left by a single indentation step"]
(eval-and-compile
(defun python-syntax--context-compiler-macro (form type &optional syntax-ppss)
(pcase type
- (`'comment
+ (''comment
`(let ((ppss (or ,syntax-ppss (syntax-ppss))))
(and (nth 4 ppss) (nth 8 ppss))))
- (`'string
+ (''string
`(let ((ppss (or ,syntax-ppss (syntax-ppss))))
(and (nth 3 ppss) (nth 8 ppss))))
- (`'paren
+ (''paren
`(nth 1 (or ,syntax-ppss (syntax-ppss))))
(_ form))))
(declare (compiler-macro python-syntax--context-compiler-macro))
(let ((ppss (or syntax-ppss (syntax-ppss))))
(pcase type
- (`comment (and (nth 4 ppss) (nth 8 ppss)))
- (`string (and (nth 3 ppss) (nth 8 ppss)))
- (`paren (nth 1 ppss))
+ ('comment (and (nth 4 ppss) (nth 8 ppss)))
+ ('string (and (nth 3 ppss) (nth 8 ppss)))
+ ('paren (nth 1 ppss))
(_ nil))))
(defun python-syntax-context-type (&optional syntax-ppss)
;; is NIL means to not add any newlines for start or end
;; of docstring. See `python-fill-docstring-style' for a
;; graphic idea of each style.
- (`django (cons 1 1))
- (`onetwo (and multi-line-p (cons 1 2)))
- (`pep-257 (and multi-line-p (cons nil 2)))
- (`pep-257-nn (and multi-line-p (cons nil 1)))
- (`symmetric (and multi-line-p (cons 1 1)))))
+ ('django (cons 1 1))
+ ('onetwo (and multi-line-p (cons 1 2)))
+ ('pep-257 (and multi-line-p (cons nil 2)))
+ ('pep-257-nn (and multi-line-p (cons nil 1)))
+ ('symmetric (and multi-line-p (cons 1 1)))))
(fill-paragraph-function))
(save-restriction
(narrow-to-region str-start-pos str-end-pos)
By default messages are considered errors."
:version "26.1"
:group 'python-flymake
- :type `(alist :key-type (regexp)
+ :type '(alist :key-type (regexp)
:value-type (symbol)))
(defvar-local python--flymake-proc nil)
(add-to-list
'hs-special-modes-alist
- `(python-mode
+ '(python-mode
"\\s-*\\_<\\(?:def\\|class\\)\\_>"
;; Use the empty string as end regexp so it doesn't default to
;; "\\s)". This way parens at end of defun are properly hidden.
(defun ruby-smie-rules (kind token)
(pcase (cons kind token)
- (`(:elem . basic) ruby-indent-level)
+ ('(:elem . basic) ruby-indent-level)
;; "foo" "bar" is the concatenation of the two strings, so the second
;; should be aligned with the first.
- (`(:elem . args) (if (looking-at "\\s\"") 0))
+ ('(:elem . args) (if (looking-at "\\s\"") 0))
;; (`(:after . ",") (smie-rule-separator kind))
- (`(:before . ";")
+ ('(:before . ";")
(cond
((smie-rule-parent-p "def" "begin" "do" "class" "module" "for"
"while" "until" "unless"
;; because we want to reject hanging tokens at bol, too.
(unless (or (eolp) (forward-comment 1))
(cons 'column (current-column)))))
- (`(:before . " @ ")
+ ('(:before . " @ ")
(save-excursion
(skip-chars-forward " \t")
(cons 'column (current-column))))
- (`(:before . "do") (ruby-smie--indent-to-stmt))
- (`(:before . ".")
+ ('(:before . "do") (ruby-smie--indent-to-stmt))
+ ('(:before . ".")
(if (smie-rule-sibling-p)
(and ruby-align-chained-calls 0)
(smie-backward-sexp ".")
ruby-indent-level))))
(`(:before . ,(or "else" "then" "elsif" "rescue" "ensure"))
(smie-rule-parent))
- (`(:before . "when")
+ ('(:before . "when")
;; Align to the previous `when', but look up the virtual
;; indentation of `case'.
(if (smie-rule-sibling-p) 0 (smie-rule-parent)))
(if (ruby-smie--indent-to-stmt-p token)
(ruby-smie--indent-to-stmt)
(cons 'column (current-column)))))
- (`(:before . "iuwu-mod")
+ ('(:before . "iuwu-mod")
(smie-rule-parent ruby-indent-level))
))
The style of the comment is controlled by `ruby-encoding-magic-comment-style'."
(let ((encoding-magic-comment-template
(pcase ruby-encoding-magic-comment-style
- (`ruby "# coding: %s")
- (`emacs "# -*- coding: %s -*-")
- (`custom
+ ('ruby "# coding: %s")
+ ('emacs "# -*- coding: %s -*-")
+ ('custom
ruby-custom-encoding-magic-comment-template))))
(insert
(format encoding-magic-comment-template encoding)
:group 'sh-script)
(defcustom sh-imenu-generic-expression
- `((sh
+ '((sh
. ((nil
;; function FOO
;; function FOO()
;; unescape " inside a $( ... ) construct.
(pcase (char-after)
(?\' (pcase state
- (`double-quote nil)
+ ('double-quote nil)
(_ (forward-char 1)
;; FIXME: mark skipped double quotes as punctuation syntax.
(let ((spos (point)))
'syntax-table '(1)))))))))
(?\\ (forward-char 1))
(?\" (pcase state
- (`double-quote (setq state (pop states)))
+ ('double-quote (setq state (pop states)))
(_ (push state states) (setq state 'double-quote)))
(if state (put-text-property (point) (1+ (point))
'syntax-table '(1))))
(?\` (pcase state
- (`backquote (setq state (pop states)))
+ ('backquote (setq state (pop states)))
(_ (push state states) (setq state 'backquote))))
(?\$ (if (not (eq (char-after (1+ (point))) ?\())
nil
(pcase state
(_ (push state states) (setq state 'code)))))
(?\( (pcase state
- (`double-quote nil)
+ ('double-quote nil)
(_ (push state states) (setq state 'code))))
(?\) (pcase state
- (`double-quote nil)
+ ('double-quote nil)
(_ (setq state (pop states)))))
(_ (error "Internal error in sh-font-lock-quoted-subshell")))
(forward-char 1))
(setq-local comint-prompt-regexp "^[ \t]*")
(setq-local imenu-case-fold-search nil)
(setq font-lock-defaults
- `((sh-font-lock-keywords
+ '((sh-font-lock-keywords
sh-font-lock-keywords-1 sh-font-lock-keywords-2)
nil nil
((?/ . "w") (?~ . "w") (?. . "w") (?- . "w") (?_ . "w")) nil
(defun sh-smie-sh-rules (kind token)
(pcase (cons kind token)
- (`(:elem . basic) sh-basic-offset)
- (`(:after . "case-)") (- (sh-var-value 'sh-indent-for-case-alt)
+ ('(: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"))
(if (not (smie-rule-prev-p "&&" "||" "|"))
(smie-indent-virtual)))))
;; Attempt at backward compatibility with the old config variables.
- (`(:before . "fi") (sh-var-value 'sh-indent-for-fi))
- (`(:before . "done") (sh-var-value 'sh-indent-for-done))
- (`(:after . "else") (sh-var-value 'sh-indent-after-else))
- (`(:after . "if") (sh-var-value 'sh-indent-after-if))
- (`(:before . "then") (sh-var-value 'sh-indent-for-then))
- (`(:before . "do") (sh-var-value 'sh-indent-for-do))
- (`(:after . "do")
+ ('(:before . "fi") (sh-var-value 'sh-indent-for-fi))
+ ('(:before . "done") (sh-var-value 'sh-indent-for-done))
+ ('(:after . "else") (sh-var-value 'sh-indent-after-else))
+ ('(:after . "if") (sh-var-value 'sh-indent-after-if))
+ ('(:before . "then") (sh-var-value 'sh-indent-for-then))
+ ('(:before . "do") (sh-var-value 'sh-indent-for-do))
+ ('(:after . "do")
(sh-var-value (if (smie-rule-hanging-p)
'sh-indent-after-loop-construct 'sh-indent-after-do)))
;; sh-indent-after-done: aligned completely differently.
- (`(:after . "in") (sh-var-value 'sh-indent-for-case-label))
+ ('(:after . "in") (sh-var-value 'sh-indent-for-case-label))
;; sh-indent-for-continuation: Line continuations are handled differently.
(`(:after . ,(or "(" "{" "["))
(if (not (looking-at ".[ \t]*[^\n \t#]"))
(defun sh-smie-rc-rules (kind token)
(pcase (cons kind token)
- (`(:elem . basic) sh-basic-offset)
+ ('(:elem . basic) sh-basic-offset)
;; (`(:after . "case") (or sh-basic-offset smie-indent-basic))
- (`(:after . ";")
+ ('(:after . ";")
(if (smie-rule-parent-p "case")
(smie-rule-parent (sh-var-value 'sh-indent-after-case))))
- (`(:before . "{")
+ ('(:before . "{")
(save-excursion
(when (sh-smie--rc-after-special-arg-p)
`(column . ,(current-column)))))
(dolist (w what)
(let ((plist (cdr-safe w)))
(pcase (or (car-safe w) w)
- (`user
+ ('user
(sql-get-login-ext 'sql-user "User: " 'sql-user-history plist))
- (`password
+ ('password
(setq-default sql-password
(read-passwd "Password: " nil (sql-default-value 'sql-password))))
- (`server
+ ('server
(sql-get-login-ext 'sql-server "Server: " 'sql-server-history plist))
- (`database
+ ('database
(sql-get-login-ext 'sql-database "Database: "
'sql-database-history plist))
- (`port
+ ('port
(sql-get-login-ext 'sql-port "Port: "
nil (append '(:number t) plist)))))))
(sql-get-product-feature (or product sql-product) :sqli-login)
(lambda (token plist)
(pcase token
- (`user
+ ('user
(unless (string= "" sql-user)
(list "/" sql-user)))
- (`port
+ ('port
(unless (or (not (numberp sql-port))
(= 0 sql-port))
(list ":" (number-to-string sql-port))))
- (`server
+ ('server
(unless (string= "" sql-server)
(list "."
(if (plist-member plist :file)
(file-name-nondirectory sql-server)
sql-server))))
- (`database
+ ('database
(unless (string= "" sql-database)
(list "@"
(if (plist-member plist :file)
(mapcar
(lambda (v)
(pcase (car v)
- (`sql-user 'user)
- (`sql-password 'password)
- (`sql-server 'server)
- (`sql-database 'database)
- (`sql-port 'port)
+ ('sql-user 'user)
+ ('sql-password 'password)
+ ('sql-server 'server)
+ ('sql-database 'database)
+ ('sql-port 'port)
(s s)))
connect-set))
`(product ,@login)
(lambda (token _plist)
(pcase token
- (`product `(sql-product ',product))
- (`user `(sql-user ,user))
- (`database `(sql-database ,database))
- (`server `(sql-server ,server))
- (`port `(sql-port ,port)))))))
+ ('product `(sql-product ',product))
+ ('user `(sql-user ,user))
+ ('database `(sql-database ,database))
+ ('server `(sql-server ,server))
+ ('port `(sql-port ,port)))))))
(setq alist (append alist (list connect)))
(unless (featurep 'xemacs)
(unless (fboundp 'region-active-p)
(defmacro region-active-p ()
- `(and transient-mark-mode mark-active))))
+ '(and transient-mark-mode mark-active))))
)
;; Provide a regular expression optimization routine, using regexp-opt
(if (fboundp 'regexp-opt)
;; regexp-opt is defined, does it take 3 or 2 arguments?
(if (fboundp 'function-max-args)
- (let ((args (function-max-args `regexp-opt)))
+ (let ((args (function-max-args 'regexp-opt)))
(cond
((eq args 3) ; It takes 3
(condition-case nil ; Hide this defun from emacses
((vectorp menu)
(let ((i 0) (out []))
(while (< i (length menu))
- (if (equal `:help (aref menu i))
+ (if (equal :help (aref menu i))
(setq i (+ 2 i))
(setq out (vconcat out (vector (aref menu i)))
i (1+ i))))
(define-key map [(meta delete)] 'kill-word))
(define-key map "\M-\C-b" 'electric-verilog-backward-sexp)
(define-key map "\M-\C-f" 'electric-verilog-forward-sexp)
- (define-key map "\M-\r" `electric-verilog-terminate-and-indent)
+ (define-key map "\M-\r" 'electric-verilog-terminate-and-indent)
(define-key map "\M-\t" (if (fboundp 'completion-at-point)
'completion-at-point 'verilog-complete-word))
(define-key map "\M-?" (if (fboundp 'completion-help-at-point)
(setq verilog-tool 'verilog-linter)
(verilog-set-compile-command))
:style radio
- :selected (equal verilog-tool `verilog-linter)
+ :selected (equal verilog-tool 'verilog-linter)
:help "When invoking compilation, use lint checker"]
["Coverage"
(progn
(setq verilog-tool 'verilog-coverage)
(verilog-set-compile-command))
:style radio
- :selected (equal verilog-tool `verilog-coverage)
+ :selected (equal verilog-tool 'verilog-coverage)
:help "When invoking compilation, annotate for coverage"]
["Simulator"
(progn
(setq verilog-tool 'verilog-simulator)
(verilog-set-compile-command))
:style radio
- :selected (equal verilog-tool `verilog-simulator)
+ :selected (equal verilog-tool 'verilog-simulator)
:help "When invoking compilation, interpret Verilog source"]
["Compiler"
(progn
(setq verilog-tool 'verilog-compiler)
(verilog-set-compile-command))
:style radio
- :selected (equal verilog-tool `verilog-compiler)
+ :selected (equal verilog-tool 'verilog-compiler)
:help "When invoking compilation, compile Verilog source"]
["Preprocessor"
(progn
(setq verilog-tool 'verilog-preprocessor)
(verilog-set-compile-command))
:style radio
- :selected (equal verilog-tool `verilog-preprocessor)
+ :selected (equal verilog-tool 'verilog-preprocessor)
:help "When invoking compilation, preprocess Verilog source, see also `verilog-preprocess'"]
)
("Move"
:enable-function (lambda () (not (verilog-in-comment-or-string-p))))
(verilog-define-abbrev verilog-mode-abbrev-table "class" "" 'verilog-sk-ovm-class)
(verilog-define-abbrev verilog-mode-abbrev-table "always" "" 'verilog-sk-always)
-(verilog-define-abbrev verilog-mode-abbrev-table "begin" nil `verilog-sk-begin)
-(verilog-define-abbrev verilog-mode-abbrev-table "case" "" `verilog-sk-case)
-(verilog-define-abbrev verilog-mode-abbrev-table "for" "" `verilog-sk-for)
-(verilog-define-abbrev verilog-mode-abbrev-table "generate" "" `verilog-sk-generate)
-(verilog-define-abbrev verilog-mode-abbrev-table "initial" "" `verilog-sk-initial)
-(verilog-define-abbrev verilog-mode-abbrev-table "fork" "" `verilog-sk-fork)
-(verilog-define-abbrev verilog-mode-abbrev-table "module" "" `verilog-sk-module)
-(verilog-define-abbrev verilog-mode-abbrev-table "primitive" "" `verilog-sk-primitive)
-(verilog-define-abbrev verilog-mode-abbrev-table "repeat" "" `verilog-sk-repeat)
-(verilog-define-abbrev verilog-mode-abbrev-table "specify" "" `verilog-sk-specify)
-(verilog-define-abbrev verilog-mode-abbrev-table "task" "" `verilog-sk-task)
-(verilog-define-abbrev verilog-mode-abbrev-table "while" "" `verilog-sk-while)
-(verilog-define-abbrev verilog-mode-abbrev-table "casex" "" `verilog-sk-casex)
-(verilog-define-abbrev verilog-mode-abbrev-table "casez" "" `verilog-sk-casez)
-(verilog-define-abbrev verilog-mode-abbrev-table "if" "" `verilog-sk-if)
-(verilog-define-abbrev verilog-mode-abbrev-table "else if" "" `verilog-sk-else-if)
-(verilog-define-abbrev verilog-mode-abbrev-table "assign" "" `verilog-sk-assign)
-(verilog-define-abbrev verilog-mode-abbrev-table "function" "" `verilog-sk-function)
-(verilog-define-abbrev verilog-mode-abbrev-table "input" "" `verilog-sk-input)
-(verilog-define-abbrev verilog-mode-abbrev-table "output" "" `verilog-sk-output)
-(verilog-define-abbrev verilog-mode-abbrev-table "inout" "" `verilog-sk-inout)
-(verilog-define-abbrev verilog-mode-abbrev-table "wire" "" `verilog-sk-wire)
-(verilog-define-abbrev verilog-mode-abbrev-table "reg" "" `verilog-sk-reg)
+(verilog-define-abbrev verilog-mode-abbrev-table "begin" nil 'verilog-sk-begin)
+(verilog-define-abbrev verilog-mode-abbrev-table "case" "" 'verilog-sk-case)
+(verilog-define-abbrev verilog-mode-abbrev-table "for" "" 'verilog-sk-for)
+(verilog-define-abbrev verilog-mode-abbrev-table "generate" "" 'verilog-sk-generate)
+(verilog-define-abbrev verilog-mode-abbrev-table "initial" "" 'verilog-sk-initial)
+(verilog-define-abbrev verilog-mode-abbrev-table "fork" "" 'verilog-sk-fork)
+(verilog-define-abbrev verilog-mode-abbrev-table "module" "" 'verilog-sk-module)
+(verilog-define-abbrev verilog-mode-abbrev-table "primitive" "" 'verilog-sk-primitive)
+(verilog-define-abbrev verilog-mode-abbrev-table "repeat" "" 'verilog-sk-repeat)
+(verilog-define-abbrev verilog-mode-abbrev-table "specify" "" 'verilog-sk-specify)
+(verilog-define-abbrev verilog-mode-abbrev-table "task" "" 'verilog-sk-task)
+(verilog-define-abbrev verilog-mode-abbrev-table "while" "" 'verilog-sk-while)
+(verilog-define-abbrev verilog-mode-abbrev-table "casex" "" 'verilog-sk-casex)
+(verilog-define-abbrev verilog-mode-abbrev-table "casez" "" 'verilog-sk-casez)
+(verilog-define-abbrev verilog-mode-abbrev-table "if" "" 'verilog-sk-if)
+(verilog-define-abbrev verilog-mode-abbrev-table "else if" "" 'verilog-sk-else-if)
+(verilog-define-abbrev verilog-mode-abbrev-table "assign" "" 'verilog-sk-assign)
+(verilog-define-abbrev verilog-mode-abbrev-table "function" "" 'verilog-sk-function)
+(verilog-define-abbrev verilog-mode-abbrev-table "input" "" 'verilog-sk-input)
+(verilog-define-abbrev verilog-mode-abbrev-table "output" "" 'verilog-sk-output)
+(verilog-define-abbrev verilog-mode-abbrev-table "inout" "" 'verilog-sk-inout)
+(verilog-define-abbrev verilog-mode-abbrev-table "wire" "" 'verilog-sk-wire)
+(verilog-define-abbrev verilog-mode-abbrev-table "reg" "" 'verilog-sk-reg)
;;
;; Macros
(defconst verilog-assignment-operator-re
(eval-when-compile
(verilog-regexp-opt
- `(
+ '(
;; blocking assignment_operator
"=" "+=" "-=" "*=" "/=" "%=" "&=" "|=" "^=" "<<=" ">>=" "<<<=" ">>>="
;; non blocking assignment operator
verilog-directive-re "\\)\\|\\("
(eval-when-compile
(verilog-regexp-words
- `( "begin"
+ '( "begin"
"else"
"end"
"endcase"
(eval-when-compile
(verilog-regexp-words
- `("end" ; closes begin
+ '("end" ; closes begin
"endcase" ; closes any of case, casex casez or randcase
"join" "join_any" "join_none" ; closes fork
"endclass"
(defconst verilog-beg-block-re
(eval-when-compile
(verilog-regexp-words
- `("begin"
+ '("begin"
"case" "casex" "casez" "randcase"
"clocking"
"generate"
(defconst verilog-nameable-item-re
(eval-when-compile
(verilog-regexp-words
- `("begin"
+ '("begin"
"fork"
"join" "join_any" "join_none"
"end"
(defconst verilog-declaration-opener
(eval-when-compile
(verilog-regexp-words
- `("module" "begin" "task" "function"))))
+ '("module" "begin" "task" "function"))))
(defconst verilog-declaration-prefix-re
(eval-when-compile
(verilog-regexp-words
- `(
+ '(
;; port direction
"inout" "input" "output" "ref"
;; changeableness
(defconst verilog-declaration-core-re
(eval-when-compile
(verilog-regexp-words
- `(
+ '(
;; port direction (by themselves)
"inout" "input" "output"
;; integer_atom_type
(defconst verilog-declaration-re-1-no-macro (concat "^" verilog-declaration-re-2-no-macro))
(defconst verilog-defun-re
- (eval-when-compile (verilog-regexp-words `("macromodule" "module" "class" "program" "interface" "package" "primitive" "config"))))
+ (eval-when-compile (verilog-regexp-words '("macromodule" "module" "class" "program" "interface" "package" "primitive" "config"))))
(defconst verilog-end-defun-re
- (eval-when-compile (verilog-regexp-words `("endmodule" "endclass" "endprogram" "endinterface" "endpackage" "endprimitive" "endconfig"))))
+ (eval-when-compile (verilog-regexp-words '("endmodule" "endclass" "endprogram" "endinterface" "endpackage" "endprimitive" "endconfig"))))
(defconst verilog-zero-indent-re
(concat verilog-defun-re "\\|" verilog-end-defun-re))
(defconst verilog-inst-comment-re
- (eval-when-compile (verilog-regexp-words `("Outputs" "Inouts" "Inputs" "Interfaces" "Interfaced"))))
+ (eval-when-compile (verilog-regexp-words '("Outputs" "Inouts" "Inputs" "Interfaces" "Interfaced"))))
(defconst verilog-behavioral-block-beg-re
- (eval-when-compile (verilog-regexp-words `("initial" "final" "always" "always_comb" "always_latch" "always_ff"
- "function" "task"))))
+ (eval-when-compile (verilog-regexp-words '("initial" "final" "always" "always_comb" "always_latch" "always_ff"
+ "function" "task"))))
(defconst verilog-coverpoint-re "\\w+\\s*:\\s*\\(coverpoint\\|cross\\constraint\\)" )
(defconst verilog-in-constraint-re ; keywords legal in constraint blocks starting a statement/block
- (eval-when-compile (verilog-regexp-words `("if" "else" "solve" "foreach"))))
+ (eval-when-compile (verilog-regexp-words '("if" "else" "solve" "foreach"))))
(defconst verilog-indent-re
(eval-when-compile
(verilog-regexp-words
- `(
+ '(
"{"
"always" "always_latch" "always_ff" "always_comb"
"begin" "end"
(defconst verilog-defun-level-not-generate-re
(eval-when-compile
(verilog-regexp-words
- `( "module" "macromodule" "primitive" "class" "program"
- "interface" "package" "config"))))
+ '( "module" "macromodule" "primitive" "class" "program"
+ "interface" "package" "config"))))
(defconst verilog-defun-level-re
(eval-when-compile
(verilog-regexp-words
(append
- `( "module" "macromodule" "primitive" "class" "program"
- "interface" "package" "config")
- `( "initial" "final" "always" "always_comb" "always_ff"
- "always_latch" "endtask" "endfunction" )))))
+ '( "module" "macromodule" "primitive" "class" "program"
+ "interface" "package" "config")
+ '( "initial" "final" "always" "always_comb" "always_ff"
+ "always_latch" "endtask" "endfunction" )))))
(defconst verilog-defun-level-generate-only-re
(eval-when-compile
(verilog-regexp-words
- `( "initial" "final" "always" "always_comb" "always_ff"
- "always_latch" "endtask" "endfunction" ))))
+ '( "initial" "final" "always" "always_comb" "always_ff"
+ "always_latch" "endtask" "endfunction" ))))
(defconst verilog-cpp-level-re
(eval-when-compile
(verilog-regexp-words
- `(
+ '(
"endmodule" "endprimitive" "endinterface" "endpackage" "endprogram" "endclass"
))))
(defconst verilog-basic-complete-re
(eval-when-compile
(verilog-regexp-words
- `(
+ '(
"always" "assign" "always_latch" "always_ff" "always_comb" "constraint"
"import" "initial" "final" "module" "macromodule" "repeat" "randcase" "while"
"if" "for" "forever" "foreach" "else" "parameter" "do" "localparam" "assert"
;; single words
"\\(?:"
(verilog-regexp-words
- `("`__FILE__"
+ '("`__FILE__"
"`__LINE__"
"`celldefine"
"`else"
(remove-text-properties (point-min) (point-max) '(face nil))
(while (not (eobp))
(cond ((get-text-property (point) 'v-cmts)
- (put-text-property (point) (1+ (point)) `face 'underline)
+ (put-text-property (point) (1+ (point)) 'face 'underline)
;;(if dbg (setq dbg (concat dbg (format " v-cmts at %S\n" (point)))))
(forward-char 1))
(t
compile-command))
(lint-word1 (verilog-string-replace-matches "\\s .*$" "" nil nil
verilog-linter)))
- (cond ((equal compile-word1 "surelint") `surelint)
- ((equal compile-word1 "verilint") `verilint)
- ((equal lint-word1 "surelint") `surelint)
- ((equal lint-word1 "verilint") `verilint)
- (t `surelint)))) ; back compatibility
+ (cond ((equal compile-word1 "surelint") 'surelint)
+ ((equal compile-word1 "verilint") 'verilint)
+ ((equal lint-word1 "surelint") 'surelint)
+ ((equal lint-word1 "verilint") 'verilint)
+ (t 'surelint)))) ; back compatibility
(defun verilog-lint-off ()
"Convert a Verilog linter warning line into a disable statement.
See \\[verilog-surelint-off] and \\[verilog-verilint-off]."
(interactive)
(let ((linter (verilog-linter-name)))
- (cond ((equal linter `surelint)
+ (cond ((equal linter 'surelint)
(verilog-surelint-off))
- ((equal linter `verilint)
+ ((equal linter 'verilint)
(verilog-verilint-off))
(t (error "Linter name not set")))))
(interactive
(list
(let ((default (verilog-expand-command verilog-preprocessor)))
- (set (make-local-variable `verilog-preprocessor)
+ (set (make-local-variable 'verilog-preprocessor)
(read-from-minibuffer "Run Preprocessor (like this): "
default nil nil
'verilog-preprocess-history default)))))
line in bottom-up order."
(unless noninteractive
(error "Use verilog-batch-auto only with --batch")) ; Otherwise we'd mess up buffer modes
- (verilog-batch-execute-func `verilog-auto))
+ (verilog-batch-execute-func 'verilog-auto))
(defun verilog-batch-delete-auto ()
"For use with --batch, perform automatic deletion as a stand-alone tool.
with \\[verilog-delete-auto] on all command-line files, and saves the buffers."
(unless noninteractive
(error "Use verilog-batch-delete-auto only with --batch")) ; Otherwise we'd mess up buffer modes
- (verilog-batch-execute-func `verilog-delete-auto))
+ (verilog-batch-execute-func 'verilog-delete-auto))
(defun verilog-batch-delete-trailing-whitespace ()
"For use with --batch, perform whitespace deletion as a stand-alone tool.
command-line files, and saves the buffers."
(unless noninteractive
(error "Use verilog-batch-delete-trailing-whitespace only with --batch")) ; Otherwise we'd mess up buffer modes
- (verilog-batch-execute-func `verilog-delete-trailing-whitespace))
+ (verilog-batch-execute-func 'verilog-delete-trailing-whitespace))
(defun verilog-batch-diff-auto ()
"For use with --batch, perform automatic differences as a stand-alone tool.
to insure automatics are always properly maintained."
(unless noninteractive
(error "Use verilog-batch-diff-auto only with --batch")) ; Otherwise we'd mess up buffer modes
- (verilog-batch-execute-func `verilog-diff-auto t))
+ (verilog-batch-execute-func 'verilog-diff-auto t))
(defun verilog-batch-inject-auto ()
"For use with --batch, perform automatic injection as a stand-alone tool.
line in bottom-up order."
(unless noninteractive
(error "Use verilog-batch-inject-auto only with --batch")) ; Otherwise we'd mess up buffer modes
- (verilog-batch-execute-func `verilog-inject-auto))
+ (verilog-batch-execute-func 'verilog-inject-auto))
(defun verilog-batch-indent ()
"For use with --batch, reindent an entire file as a stand-alone tool.
\\[verilog-indent-buffer] on all command-line files, and saves the buffers."
(unless noninteractive
(error "Use verilog-batch-indent only with --batch")) ; Otherwise we'd mess up buffer modes
- (verilog-batch-execute-func `verilog-indent-buffer))
+ (verilog-batch-execute-func 'verilog-indent-buffer))
\f
;;; Indentation:
;;
("xor" "output"))
"Map of direction for each positional argument to each gate primitive.")
-(defvar verilog-gate-keywords (mapcar `car verilog-gate-ios)
+(defvar verilog-gate-keywords (mapcar #'car verilog-gate-ios)
"Keywords for gate primitives.")
(defun verilog-string-diff (str1 str2)
sv-modport
bus)
;; Shove signals so duplicated signals will be adjacent
- (setq in-list (sort in-list `verilog-signals-sort-compare))
+ (setq in-list (sort in-list #'verilog-signals-sort-compare))
(while in-list
(setq sig (car in-list))
;; No current signal; form from existing details
(setq port (verilog-symbol-detick-denumber port))
(setq sig (if dotname port (verilog-symbol-detick-denumber sig)))
(if vec (setq vec (verilog-symbol-detick-denumber vec)))
- (if multidim (setq multidim (mapcar `verilog-symbol-detick-denumber multidim)))
+ (if multidim (setq multidim (mapcar #'verilog-symbol-detick-denumber multidim)))
(if mem (setq mem (verilog-symbol-detick-denumber mem)))
(unless (or (not sig)
(equal sig "")) ; Ignore .foo(1'b1) assignments
submodi submoddecls)
(cond
(subprim
- (setq submodi `primitive
+ (setq submodi 'primitive
submoddecls (verilog-decls-new nil nil nil nil nil nil nil nil nil)
comment (concat inst " of " submod))
(verilog-backward-open-paren)
((string-match "^\\+libext\\+\\(.*\\)" arg)
(setq arg (match-string 1 arg))
(while (string-match "\\([^+]+\\)\\+?\\(.*\\)" arg)
- (verilog-add-list-unique `verilog-library-extensions
+ (verilog-add-list-unique 'verilog-library-extensions
(match-string 1 arg))
(setq arg (match-string 2 arg))))
;;
;;
((or (string-match "^\\+incdir\\+\\(.*\\)" arg) ; +incdir+dir
(string-match "^-I\\(.*\\)" arg)) ; -Idir
- (verilog-add-list-unique `verilog-library-directories
+ (verilog-add-list-unique 'verilog-library-directories
(substitute-in-file-name (match-string 1 arg))))
;; Ignore
((equal "+librescan" arg))
(verilog-getopt-file (verilog-substitute-file-name-path arg default-dir) nil))
((equal next-param "-v")
(setq next-param nil)
- (verilog-add-list-unique `verilog-library-files
+ (verilog-add-list-unique 'verilog-library-files
(verilog-substitute-file-name-path arg default-dir)))
((equal next-param "-y")
(setq next-param nil)
- (verilog-add-list-unique `verilog-library-directories
+ (verilog-add-list-unique 'verilog-library-directories
(verilog-substitute-file-name-path arg default-dir)))
;; Filename
((string-match "^[^-+]" arg)
- (verilog-add-list-unique `verilog-library-files
+ (verilog-add-list-unique 'verilog-library-files
(verilog-substitute-file-name-path arg default-dir)))
;; Default - ignore; no warning
))))
(defun verilog-getopt-flags ()
"Convert `verilog-library-flags' into standard library variables."
;; If the flags are local, then all the outputs should be local also
- (when (local-variable-p `verilog-library-flags (current-buffer))
+ (when (local-variable-p 'verilog-library-flags (current-buffer))
(mapc 'make-local-variable '(verilog-library-extensions
verilog-library-directories
verilog-library-files
(defun verilog-current-flags ()
"Convert `verilog-library-flags' and similar variables to command line.
Used for __FLAGS__ in `verilog-expand-command'."
- (let ((cmd (mapconcat `concat verilog-library-flags " ")))
+ (let ((cmd (mapconcat #'concat verilog-library-flags " ")))
(when (equal cmd "")
(setq cmd (concat
- "+libext+" (mapconcat `concat verilog-library-extensions "+")
+ "+libext+" (mapconcat #'concat verilog-library-extensions "+")
(mapconcat (lambda (i) (concat " -y " i " +incdir+" i))
verilog-library-directories "")
(mapconcat (lambda (i) (concat " -v " i))
(while chkdirs
(setq chkdir (expand-file-name (car chkdirs)
(file-name-directory current))
- chkexts (if check-ext verilog-library-extensions `("")))
+ chkexts (if check-ext verilog-library-extensions '("")))
(while chkexts
(setq fn (expand-file-name (concat filename (car chkexts))
chkdir))
(set-buffer (if (bufferp (verilog-modi-file-or-buffer modi))
(verilog-modi-file-or-buffer modi)
(find-file-noselect (verilog-modi-file-or-buffer modi))))
- (or (equal major-mode `verilog-mode) ; Put into Verilog mode to get syntax
+ (or (equal major-mode 'verilog-mode) ; Put into Verilog mode to get syntax
(verilog-mode))
(goto-char (verilog-modi-get-point modi)))
(t
(error "Unsupported verilog-insert-definition direction: `%s'" direction))))
(or dont-sort
- (setq sigs (sort (copy-alist sigs) `verilog-signals-sort-compare)))
+ (setq sigs (sort (copy-alist sigs) #'verilog-signals-sort-compare)))
(while sigs
(let ((sig (car sigs)))
(verilog-insert-one-definition
(concat "/\\*"
(eval-when-compile
(verilog-regexp-words
- `("AS" "AUTOARG" "AUTOCONCATWIDTH" "AUTOINST" "AUTOINSTPARAM"
+ '("AS" "AUTOARG" "AUTOCONCATWIDTH" "AUTOINST" "AUTOINSTPARAM"
"AUTOSENSE")))
"\\*/")
'verilog-delete-to-paren)
Takes SIGS list, adds MESSAGE to front and inserts each at INDENT-PT."
(when sigs
(when verilog-auto-arg-sort
- (setq sigs (sort (copy-alist sigs) `verilog-signals-sort-compare)))
+ (setq sigs (sort (copy-alist sigs) #'verilog-signals-sort-compare)))
(insert "\n")
(indent-to indent-pt)
(insert message)
(verilog-signals-matching-dir-re
(verilog-signals-matching-regexp sig-list-o regexp)
"output" direction-re)))
- (setq sig-list-i (sort (copy-alist sig-list-i) `verilog-signals-sort-compare))
- (setq sig-list-o (sort (copy-alist sig-list-o) `verilog-signals-sort-compare))
+ (setq sig-list-i (sort (copy-alist sig-list-i) #'verilog-signals-sort-compare))
+ (setq sig-list-o (sort (copy-alist sig-list-o) #'verilog-signals-sort-compare))
(when (or sig-list-i sig-list-o)
(verilog-insert-indent "// Beginning of automatic assignments from modport\n")
;; Don't sort them so an upper AUTOINST will match the main module
(indent-to (+ (if (< verilog-auto-inst-column 48) 24 16)
verilog-auto-inst-column))
;; verilog-insert requires the complete comment in one call - including the newline
- (cond ((equal verilog-auto-inst-template-numbers `lhs)
+ (cond ((equal verilog-auto-inst-template-numbers 'lhs)
(verilog-insert " // Templated"
" LHS: " (nth 0 tpl-ass)
"\n"))
(defun verilog-auto-inst-port-list (sig-list indent-pt moddecls tpl-list tpl-num for-star par-values)
"For `verilog-auto-inst' print a list of ports using `verilog-auto-inst-port'."
(when verilog-auto-inst-sort
- (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare)))
+ (setq sig-list (sort (copy-alist sig-list) #'verilog-signals-sort-compare)))
(mapc (lambda (port)
(verilog-auto-inst-port port indent-pt moddecls
tpl-list tpl-num for-star par-values))
(verilog-re-search-backward-quick "\\s-" start-pt t))
(not (looking-at "\\s-or\\b"))))
(setq not-first t))
- (setq sig-list (sort sig-list `verilog-signals-sort-compare))
+ (setq sig-list (sort sig-list #'verilog-signals-sort-compare))
(while sig-list
(cond ((> (+ 4 (current-column) (length (verilog-sig-name (car sig-list)))) fill-column) ;+4 for width of or
(insert "\n")
(append
(verilog-alw-get-temps sigss)
prereset-sigs)))
- (setq sig-list (sort sig-list `verilog-signals-sort-compare))
+ (setq sig-list (sort sig-list #'verilog-signals-sort-compare))
(when sig-list
(insert "\n");
(verilog-insert-indent "// Beginning of autoreset for uninitialized flops\n");
(when sig-list
(verilog-forward-or-insert-line)
(verilog-insert-indent "// Beginning of automatic tieoffs (for this module's unterminated outputs)\n")
- (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare))
+ (setq sig-list (sort (copy-alist sig-list) #'verilog-signals-sort-compare))
(verilog-modi-cache-add-vars modi sig-list) ; Before we trash list
(while sig-list
(let ((sig (car sig-list)))
(when sig-list
(verilog-forward-or-insert-line)
(verilog-insert-indent "// Beginning of automatic unused inputs\n")
- (setq sig-list (sort (copy-alist sig-list) `verilog-signals-sort-compare))
+ (setq sig-list (sort (copy-alist sig-list) #'verilog-signals-sort-compare))
(while sig-list
(let ((sig (car sig-list)))
(indent-to indent-pt)
;; Local state
(verilog-read-auto-template-init)
;; If we're not in verilog-mode, change syntax table so parsing works right
- (unless (eq major-mode `verilog-mode) (verilog-mode))
+ (unless (eq major-mode 'verilog-mode) (verilog-mode))
;; Allow user to customize
(verilog-run-hooks 'verilog-before-auto-hook)
;; Try to save the user from needing to revert-file to reread file local-variables
(setq ps-mule-prologue-generated nil
ps-mule-composition-prologue-generated nil
ps-mule-bitmap-prologue-generated nil)
- (mapcar `(lambda (x) (setcar (nthcdr 2 x) nil))
+ (mapcar (lambda (x) (setcar (nthcdr 2 x) nil))
ps-mule-external-libraries))
(defun ps-mule-encode-header-string (string fonttag)
;;; Code:
(defmacro rtree-make-node ()
- `(list (list nil) nil))
+ '(list (list nil) nil))
(defmacro rtree-set-left (node left)
`(setcar (cdr ,node) ,left))
\f
;; Add ruler-mode to the minor mode menu in the mode line
(define-key mode-line-mode-menu [ruler-mode]
- `(menu-item "Ruler" ruler-mode
+ '(menu-item "Ruler" ruler-mode
:button (:toggle . ruler-mode)))
(defconst ruler-mode-ruler-help-echo
,(let ((field (progn (cl-assert (eq (car field) 'quote))
(cadr field))))
(if (eq field 'value)
- `(ses-set-with-undo (ses-cell-symbol cell) val)
+ '(ses-set-with-undo (ses-cell-symbol cell) val)
;; (let* ((slots (get 'ses-cell 'cl-struct-slots))
;; (slot (or (assq field slots)
;; (error "Unknown field %S" field)))
(while rest
(let ((x (pop rest)))
(pcase x
- (`>v (setq transpose nil reorient-x nil reorient-y nil))
- (`>^ (setq transpose nil reorient-x nil reorient-y t))
- (`<^ (setq transpose nil reorient-x t reorient-y t))
- (`<v (setq transpose nil reorient-x t reorient-y nil))
- (`v> (setq transpose t reorient-x nil reorient-y t))
- (`^> (setq transpose t reorient-x nil reorient-y nil))
- (`^< (setq transpose t reorient-x t reorient-y nil))
- (`v< (setq transpose t reorient-x t reorient-y t))
- ((or `* `*2 `*1) (setq vectorize x))
- (`! (setq clean 'ses--clean-!))
- (`_ (setq clean `(lambda (&rest x)
+ ('>v (setq transpose nil reorient-x nil reorient-y nil))
+ ('>^ (setq transpose nil reorient-x nil reorient-y t))
+ ('<^ (setq transpose nil reorient-x t reorient-y t))
+ ('<v (setq transpose nil reorient-x t reorient-y nil))
+ ('v> (setq transpose t reorient-x nil reorient-y t))
+ ('^> (setq transpose t reorient-x nil reorient-y nil))
+ ('^< (setq transpose t reorient-x t reorient-y nil))
+ ('v< (setq transpose t reorient-x t reorient-y t))
+ ((or '* '*2 '*1) (setq vectorize x))
+ ('! (setq clean 'ses--clean-!))
+ ('_ (setq clean `(lambda (&rest x)
(ses--clean-_ x ,(if rest (pop rest) 0)))))
(_
(cond
(cons clean (cons (quote 'vec) x)))
result)))))
(pcase vectorize
- (`nil (cons clean (apply #'append result)))
- (`*1 (vectorize-*1 clean result))
- (`*2 (vectorize-*2 clean result))
- (`* (funcall (if (cdr result)
+ ('nil (cons clean (apply #'append result)))
+ ('*1 (vectorize-*1 clean result))
+ ('*2 (vectorize-*2 clean result))
+ ('* (funcall (if (cdr result)
#'vectorize-*2
#'vectorize-*1)
clean result))))))
(when prefix-arg
(concat "C-u"
(pcase prefix-arg
- (`(-) " -")
+ ('(-) " -")
(`(,(and (pred integerp) n))
(let ((str ""))
(while (and (> n 4) (= (mod n 4) 0))
(cond ((or (memq window-system '(x w32 ns pc))
(memq system-type '(ms-dos windows-nt)))
(let ((bindings
- `(([M-delete] [M-backspace])
+ '(([M-delete] [M-backspace])
([C-M-delete] [C-M-backspace])
([?\e C-delete] [?\e C-backspace]))))
:face 'variable-pitch "To quit a partially entered command, type "
:face 'default "Control-g"
:face 'variable-pitch ".\n")
- (fancy-splash-insert :face `(variable-pitch font-lock-builtin-face)
+ (fancy-splash-insert :face '(variable-pitch font-lock-builtin-face)
"\nThis is "
(emacs-version)
"\n"
'called-interactively-p-functions
i frame nextframe)))
(pcase skip
- (`nil nil)
+ ('nil nil)
(0 t)
(_ (setq i (+ i skip -1)) (funcall get-next-frame)))))))
;; Now `frame' should be "the function from which we were called".
(let ((last-nonmenu-event (if (listp last-nonmenu-event)
last-nonmenu-event
;; Fake it:
- `(mouse-1 POSITION 1))))
+ '(mouse-1 POSITION 1))))
(if (y-or-n-p (format "Print buffer %s? " (buffer-name)))
(print-buffer)
(error "Canceled")))
(list beg end
(lambda (s p a)
(cond
- ((eq a 'metadata) `(metadata (category . bibtex-key)))
+ ((eq a 'metadata) '(metadata (category . bibtex-key)))
(t (let ((completion-ignore-case nil))
(complete-with-action
a (bibtex-global-key-alist) s p)))))
(list beg end
(lambda (s p a)
(cond
- ((eq a 'metadata) `(metadata (category . bibtex-string)))
+ ((eq a 'metadata) '(metadata (category . bibtex-string)))
(t (let ((completion-ignore-case t))
(complete-with-action a compl s p)))))
:exit-function (bibtex-complete-string-cleanup compl))))))
(put 'conf-space-keywords 'safe-local-variable 'stringp)
(defvar conf-space-font-lock-keywords
- `(;; [section] (do this first because it may look like a parameter)
+ '(;; [section] (do this first because it may look like a parameter)
("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face)
;; section { ... } (do this first because it looks like a parameter)
("^[ \t]*\\(.+?\\)[ \t\n]*{[^{}]*?$" 1 'font-lock-type-face)
"Keywords to highlight in Conf Space mode.")
(defvar conf-colon-font-lock-keywords
- `(;; [section] (do this first because it may look like a parameter)
+ '(;; [section] (do this first because it may look like a parameter)
("^[ \t]*\\[\\(.+\\)\\]" 1 'font-lock-type-face)
;; var: val
("^[ \t]*\\(.+?\\)[ \t]*:"
(defun css-smie-rules (kind token)
(pcase (cons kind token)
- (`(:elem . basic) css-indent-offset)
- (`(:elem . arg) 0)
+ ('(:elem . basic) css-indent-offset)
+ ('(:elem . arg) 0)
;; "" stands for BOB (bug#15467).
(`(:list-intro . ,(or ";" "" ":-property")) t)
- (`(:before . "{")
+ ('(:before . "{")
(when (or (smie-rule-hanging-p) (smie-rule-bolp))
(smie-backward-sexp ";")
(unless (eq (char-after) ?\{)
(smie-indent-virtual))))
- (`(:before . "(")
+ ('(:before . "(")
(cond
((smie-rule-hanging-p) (smie-rule-parent 0))
((not (smie-rule-bolp)) 0)))
- (`(:after . ":-property")
+ ('(:after . ":-property")
(when (smie-rule-hanging-p)
css-indent-offset))))
(when refill-doit ; there was a change
;; There's probably scope for more special cases here...
(pcase this-command
- (`self-insert-command
+ ('self-insert-command
;; Treat self-insertion commands specially, since they don't
;; always reset `refill-doit' -- for self-insertion commands that
;; *don't* cause a refill, we want to leave it turned on so that
;; newline, covered below).
(refill-fill-paragraph-at refill-doit)
(setq refill-doit nil)))
- ((or `quoted-insert `fill-paragraph `fill-region) nil)
- ((or `newline `newline-and-indent `open-line `indent-new-comment-line
- `reindent-then-newline-and-indent)
+ ((or 'quoted-insert 'fill-paragraph 'fill-region) nil)
+ ((or 'newline 'newline-and-indent 'open-line 'indent-new-comment-line
+ 'reindent-then-newline-and-indent)
;; Don't zap what was just inserted.
(save-excursion
(beginning-of-line) ; for newline-and-indent
the current start-tag or the current comment or the current cdata, ..."
(interactive)
(pcase (car (sgml-lexical-context))
- (`comment (insert " -->"))
- (`cdata (insert "]]>"))
- (`pi (insert " ?>"))
- (`jsp (insert " %>"))
- (`tag (insert " />"))
- (`text
+ ('comment (insert " -->"))
+ ('cdata (insert "]]>"))
+ ('pi (insert " ?>"))
+ ('jsp (insert " %>"))
+ ('tag (insert " />"))
+ ('text
(let ((context (save-excursion (sgml-get-context))))
(if context
(progn
(pcase (car lcon)
- (`string
+ ('string
;; Go back to previous non-empty line.
(while (and (> (point) (cdr lcon))
(zerop (forward-line -1))
(goto-char (cdr lcon))
(1+ (current-column))))
- (`comment
+ ('comment
(let ((mark (looking-at "--")))
;; Go back to previous non-empty line.
(while (and (> (point) (cdr lcon))
(current-column)))
;; We don't know how to indent it. Let's be honest about it.
- (`cdata nil)
+ ('cdata nil)
;; We don't know how to indent it. Let's be honest about it.
- (`pi nil)
+ ('pi nil)
- (`tag
+ ('tag
(goto-char (+ (cdr lcon) sgml-attribute-offset))
(skip-chars-forward "^ \t\n") ;Skip tag name.
(skip-chars-forward " \t")
(goto-char (+ (cdr lcon) sgml-attribute-offset))
(+ (current-column) sgml-basic-offset)))
- (`text
+ ('text
(while (looking-at "</")
(sgml-forward-sexp 1)
(skip-chars-forward " \t"))
(list (concat slash citations opt arg) 3 'font-lock-constant-face)
;;
;; Text between `` quotes ''.
- (cons (concat (regexp-opt `("``" "\"<" "\"`" "<<" "«") t)
+ (cons (concat (regexp-opt '("``" "\"<" "\"`" "<<" "«") t)
"[^'\">{]+" ;a bit pessimistic
- (regexp-opt `("''" "\">" "\"'" ">>" "»") t))
+ (regexp-opt '("''" "\">" "\"'" ">>" "»") t))
'font-lock-string-face)
;;
;; Command names, special and general.
(let ((pt (point)))
(skip-chars-backward "^ {}\n\t\\\\")
(pcase (char-before)
- ((or `nil ?\s ?\n ?\t ?\}) nil)
+ ((or 'nil ?\s ?\n ?\t ?\}) nil)
(?\\
;; TODO: Complete commands.
nil)
(mapcar
(lambda (x)
(pcase (car-safe x)
- (`font-lock-syntactic-face-function
+ ('font-lock-syntactic-face-function
(cons (car x) #'doctex-font-lock-syntactic-face-function))
(_ x)))
(cdr font-lock-defaults))))
((and cua-mode
(or (and (eq def-fun 'ESC-prefix)
(equal key-fun
- `(keymap
- (118 . cua-repeat-replace-region)))
+ '(keymap
+ (118 . cua-repeat-replace-region)))
(setq def-fun-txt "\"ESC prefix\""))
(and (eq def-fun 'mode-specific-command-prefix)
(equal key-fun
value nil)
(pcase node-type
- ((or `dateTime.iso8601tz
- `dateTime.iso8601
- `dateTime.tz
- `dateTime.rfc1123
- `dateTime
- `date) ; date is our 'special' one...
+ ((or 'dateTime.iso8601tz
+ 'dateTime.iso8601
+ 'dateTime.tz
+ 'dateTime.rfc1123
+ 'dateTime
+ 'date) ; date is our 'special' one...
;; Some type of date/time string.
(setq value (url-dav-process-date-property node)))
- (`int
+ ('int
;; Integer type...
(setq value (url-dav-process-integer-property node)))
- ((or `number `float)
+ ((or 'number 'float)
(setq value (url-dav-process-number-property node)))
- (`boolean
+ ('boolean
(setq value (url-dav-process-boolean-property node)))
- (`uri
+ ('uri
(setq value (url-dav-process-uri-property node)))
(_
(if (not (eq node-type 'unknown))
(setq lock (car supported-locks)
supported-locks (cdr supported-locks))
(pcase (car lock)
- (`DAV:write
+ ('DAV:write
(pcase (cdr lock)
- (`DAV:shared ; group permissions (possibly world)
+ ('DAV:shared ; group permissions (possibly world)
(aset modes 5 ?w))
- (`DAV:exclusive
+ ('DAV:exclusive
(aset modes 2 ?w)) ; owner permissions?
(_
(url-debug 'dav "Unrecognized DAV:lockscope (%S)" (cdr lock)))))
(let ((coding-system-for-read 'binary)
(coding-system-for-write 'binary))
(setq conn (pcase gw-method
- ((or `tls `ssl `native)
+ ((or 'tls 'ssl 'native)
(if (eq gw-method 'native)
(setq gw-method 'plain))
(open-network-stream
:nowait (and (featurep 'make-network-process)
(url-asynchronous url-current-object)
'(:nowait t))))
- (`socks
+ ('socks
(socks-open-network-stream name buffer host service))
- (`telnet
+ ('telnet
(url-open-telnet name buffer host service))
- (`rlogin
+ ('rlogin
(url-open-rlogin name buffer host service))
(_
(error "Bad setting of url-gateway-method: %s"
;; 206 Partial content
;; 207 Multi-status (Added by DAV)
(pcase status-symbol
- ((or `no-content `reset-content)
+ ((or 'no-content 'reset-content)
;; No new data, just stay at the same document
(url-mark-buffer-as-dead buffer))
(_
(let ((redirect-uri (or (mail-fetch-field "Location")
(mail-fetch-field "URI"))))
(pcase status-symbol
- (`multiple-choices ; 300
+ ('multiple-choices ; 300
;; Quoth the spec (section 10.3.1)
;; -------------------------------
;; The requested resource corresponds to any one of a set of
;; We do not support agent-driven negotiation, so we just
;; redirect to the preferred URI if one is provided.
nil)
- (`found ; 302
+ ('found ; 302
;; 302 Found was ambiguously defined in the standards, but
;; it's now recommended that it's treated like 303 instead
;; of 307, since that's what most servers expect.
(setq url-http-method "GET"
url-http-data nil))
- (`see-other ; 303
+ ('see-other ; 303
;; The response to the request can be found under a different
;; URI and SHOULD be retrieved using a GET method on that
;; resource.
(setq url-http-method "GET"
url-http-data nil))
- (`not-modified ; 304
+ ('not-modified ; 304
;; The 304 response MUST NOT contain a message-body.
(url-http-debug "Extracting document from cache... (%s)"
(url-cache-create-filename (url-view-url t)))
(url-cache-extract (url-cache-create-filename (url-view-url t)))
(setq redirect-uri nil
success t))
- (`use-proxy ; 305
+ ('use-proxy ; 305
;; The requested resource MUST be accessed through the
;; proxy given by the Location field. The Location field
;; gives the URI of the proxy. The recipient is expected
;; 424 Failed Dependency
(setq success
(pcase status-symbol
- (`unauthorized ; 401
+ ('unauthorized ; 401
;; The request requires user authentication. The response
;; MUST include a WWW-Authenticate header field containing a
;; challenge applicable to the requested resource. The
;; client MAY repeat the request with a suitable
;; Authorization header field.
(url-http-handle-authentication nil))
- (`payment-required ; 402
+ ('payment-required ; 402
;; This code is reserved for future use
(url-mark-buffer-as-dead buffer)
(error "Somebody wants you to give them money"))
- (`forbidden ; 403
+ ('forbidden ; 403
;; The server understood the request, but is refusing to
;; fulfill it. Authorization will not help and the request
;; SHOULD NOT be repeated.
t)
- (`not-found ; 404
+ ('not-found ; 404
;; Not found
t)
- (`method-not-allowed ; 405
+ ('method-not-allowed ; 405
;; The method specified in the Request-Line is not allowed
;; for the resource identified by the Request-URI. The
;; response MUST include an Allow header containing a list of
;; valid methods for the requested resource.
t)
- (`not-acceptable ; 406
+ ('not-acceptable ; 406
;; The resource identified by the request is only capable of
;; generating response entities which have content
;; characteristics not acceptable according to the accept
;; headers sent in the request.
t)
- (`proxy-authentication-required ; 407
+ ('proxy-authentication-required ; 407
;; This code is similar to 401 (Unauthorized), but indicates
;; that the client must first authenticate itself with the
;; proxy. The proxy MUST return a Proxy-Authenticate header
;; field containing a challenge applicable to the proxy for
;; the requested resource.
(url-http-handle-authentication t))
- (`request-timeout ; 408
+ ('request-timeout ; 408
;; The client did not produce a request within the time that
;; the server was prepared to wait. The client MAY repeat
;; the request without modifications at any later time.
t)
- (`conflict ; 409
+ ('conflict ; 409
;; The request could not be completed due to a conflict with
;; the current state of the resource. This code is only
;; allowed in situations where it is expected that the user
;; information for the user to recognize the source of the
;; conflict.
t)
- (`gone ; 410
+ ('gone ; 410
;; The requested resource is no longer available at the
;; server and no forwarding address is known.
t)
- (`length-required ; 411
+ ('length-required ; 411
;; The server refuses to accept the request without a defined
;; Content-Length. The client MAY repeat the request if it
;; adds a valid Content-Length header field containing the
;; `url-http-create-request' automatically calculates the
;; content-length.
t)
- (`precondition-failed ; 412
+ ('precondition-failed ; 412
;; The precondition given in one or more of the
;; request-header fields evaluated to false when it was
;; tested on the server.
t)
- ((or `request-entity-too-large `request-uri-too-large) ; 413 414
+ ((or 'request-entity-too-large 'request-uri-too-large) ; 413 414
;; The server is refusing to process a request because the
;; request entity|URI is larger than the server is willing or
;; able to process.
t)
- (`unsupported-media-type ; 415
+ ('unsupported-media-type ; 415
;; The server is refusing to service the request because the
;; entity of the request is in a format not supported by the
;; requested resource for the requested method.
t)
- (`requested-range-not-satisfiable ; 416
+ ('requested-range-not-satisfiable ; 416
;; A server SHOULD return a response with this status code if
;; a request included a Range request-header field, and none
;; of the range-specifier values in this field overlap the
;; current extent of the selected resource, and the request
;; did not include an If-Range request-header field.
t)
- (`expectation-failed ; 417
+ ('expectation-failed ; 417
;; The expectation given in an Expect request-header field
;; could not be met by this server, or, if the server is a
;; proxy, the server has unambiguous evidence that the
;; 507 Insufficient storage
(setq success t)
(pcase url-http-response-status
- (`not-implemented ; 501
+ ('not-implemented ; 501
;; The server does not support the functionality required to
;; fulfill the request.
nil)
- (`bad-gateway ; 502
+ ('bad-gateway ; 502
;; The server, while acting as a gateway or proxy, received
;; an invalid response from the upstream server it accessed
;; in attempting to fulfill the request.
nil)
- (`service-unavailable ; 503
+ ('service-unavailable ; 503
;; The server is currently unable to handle the request due
;; to a temporary overloading or maintenance of the server.
;; The implication is that this is a temporary condition
;; header. If no Retry-After is given, the client SHOULD
;; handle the response as it would for a 500 response.
nil)
- (`gateway-timeout ; 504
+ ('gateway-timeout ; 504
;; The server, while acting as a gateway or proxy, did not
;; receive a timely response from the upstream server
;; specified by the URI (e.g. HTTP, FTP, LDAP) or some other
;; auxiliary server (e.g. DNS) it needed to access in
;; attempting to complete the request.
nil)
- (`http-version-not-supported ; 505
+ ('http-version-not-supported ; 505
;; The server does not support, or refuses to support, the
;; HTTP protocol version that was used in the request
;; message.
nil)
- (`insufficient-storage ; 507 (DAV)
+ ('insufficient-storage ; 507 (DAV)
;; The method could not be performed on the resource
;; because the server is unable to store the representation
;; needed to successfully complete the request. This
(set-process-buffer connection buffer)
(set-process-filter connection 'url-http-generic-filter)
(pcase (process-status connection)
- (`connect
+ ('connect
;; Asynchronous connection
(set-process-sentinel connection 'url-http-async-sentinel))
- (`failed
+ ('failed
;; Asynchronous connection failed
(error "Could not create connection to %s:%d" (url-host url)
(url-port url)))
(type (cdr cell)))
(if symbol
(pcase type
- (`function
+ ('function
;; Store the symbol name of a function
(if (fboundp symbol)
(setq desc (plist-put desc (car cell) symbol))))
- (`variable
+ ('variable
;; Store the VALUE of a variable
(if (boundp symbol)
(setq desc (plist-put desc (car cell)
((memq (url-device-type) '(win32 w32)) "Windows; 32bit")
(t
(pcase (url-device-type)
- (`x "X11")
- (`ns "OpenStep")
- (`tty "TTY")
+ ('x "X11")
+ ('ns "OpenStep")
+ ('tty "TTY")
(_ nil)))))
(setq url-personal-mail-address (or url-personal-mail-address
(cond
((= l1 l2)
(pcase (cvs-tag-compare tag1 tag2)
- (`more1 (cons rev2 (cvs-tree-merge tree1 (cdr tree2))))
- (`more2 (cons rev1 (cvs-tree-merge (cdr tree1) tree2)))
- (`equal
+ ('more1 (cons rev2 (cvs-tree-merge tree1 (cdr tree2))))
+ ('more2 (cons rev1 (cvs-tree-merge (cdr tree1) tree2)))
+ ('equal
(cons (cons (cvs-tag-merge tag1 tag2)
(cvs-tree-merge (cvs-cdr rev1) (cvs-cdr rev2)))
(cvs-tree-merge (cdr tree1) (cdr tree2))))))
(defconst cvs-tree-char-space
(pcase cvs-tree-use-charset
- (`jisx0208 (make-char 'japanese-jisx0208 33 33))
- (`unicode " ")
+ ('jisx0208 (make-char 'japanese-jisx0208 33 33))
+ ('unicode " ")
(_ " ")))
(defconst cvs-tree-char-hbar
(pcase cvs-tree-use-charset
- (`jisx0208 (make-char 'japanese-jisx0208 40 44))
- (`unicode "â”")
+ ('jisx0208 (make-char 'japanese-jisx0208 40 44))
+ ('unicode "â”")
(_ "--")))
(defconst cvs-tree-char-vbar
(pcase cvs-tree-use-charset
- (`jisx0208 (make-char 'japanese-jisx0208 40 45))
- (`unicode "┃")
+ ('jisx0208 (make-char 'japanese-jisx0208 40 45))
+ ('unicode "┃")
(_ "| ")))
(defconst cvs-tree-char-branch
(pcase cvs-tree-use-charset
- (`jisx0208 (make-char 'japanese-jisx0208 40 50))
- (`unicode "┣")
+ ('jisx0208 (make-char 'japanese-jisx0208 40 50))
+ ('unicode "┣")
(_ "+-")))
(defconst cvs-tree-char-eob ;end of branch
(pcase cvs-tree-use-charset
- (`jisx0208 (make-char 'japanese-jisx0208 40 49))
- (`unicode "â”—")
+ ('jisx0208 (make-char 'japanese-jisx0208 40 49))
+ ('unicode "â”—")
(_ "`-")))
(defconst cvs-tree-char-bob ;beginning of branch
(pcase cvs-tree-use-charset
- (`jisx0208 (make-char 'japanese-jisx0208 40 51))
- (`unicode "┳")
+ ('jisx0208 (make-char 'japanese-jisx0208 40 51))
+ ('unicode "┳")
(_ "+-")))
(defun cvs-tag-lessp (tag1 tag2)
(unless end
(setq end (and (re-search-forward
(pcase style
- (`unified
+ ('unified
(concat (if diff-valid-unified-empty-line
"^[^-+# \\\n]\\|" "^[^-+# \\]\\|")
;; A `unified' header is ambiguous.
diff-file-header-re))
- (`context "^[^-+#! \\]")
- (`normal "^[^<>#\\]")
+ ('context "^[^-+#! \\]")
+ ('normal "^[^<>#\\]")
(_ "^[^-+#!<> \\]"))
nil t)
(match-beginning 0)))
(goto-char beg)
(pcase style
- (`unified
+ ('unified
(while (re-search-forward "^-" end t)
(let ((beg-del (progn (beginning-of-line) (point)))
beg-add end-add)
(setq end-add (point))))
(smerge-refine-regions beg-del beg-add beg-add end-add
nil #'diff-refine-preproc props-r props-a)))))
- (`context
+ ('context
(let* ((middle (save-excursion (re-search-forward "^---")))
(other middle))
(while (re-search-forward "^\\(?:!.*\n\\)+" middle t)
(and (ediff-window-display-p) ediff-multiframe))
(defmacro ediff-narrow-control-frame-p ()
- `(and (ediff-multiframe-setup-p)
- (equal ediff-help-message ediff-brief-message-string)))
+ '(and (ediff-multiframe-setup-p)
+ (equal ediff-help-message ediff-brief-message-string)))
(defmacro ediff-3way-comparison-job ()
- `(memq
+ '(memq
ediff-job-name
'(ediff-files3 ediff-buffers3)))
(ediff-defvar-local ediff-3way-comparison-job nil "")
(defmacro ediff-merge-job ()
- `(memq
+ '(memq
ediff-job-name
'(ediff-merge-files
ediff-merge-buffers
(ediff-defvar-local ediff-merge-job nil "")
(defmacro ediff-patch-job ()
- `(eq ediff-job-name 'epatch))
+ '(eq ediff-job-name 'epatch))
(defmacro ediff-merge-with-ancestor-job ()
- `(memq
+ '(memq
ediff-job-name
'(ediff-merge-files-with-ancestor
ediff-merge-buffers-with-ancestor
(ediff-defvar-local ediff-merge-with-ancestor-job nil "")
(defmacro ediff-3way-job ()
- `(or ediff-3way-comparison-job ediff-merge-job))
+ '(or ediff-3way-comparison-job ediff-merge-job))
(ediff-defvar-local ediff-3way-job nil "")
;; A diff3 job is like a 3way job, but ediff-merge doesn't require the use
;; of diff3.
(defmacro ediff-diff3-job ()
- `(or ediff-3way-comparison-job
+ '(or ediff-3way-comparison-job
ediff-merge-with-ancestor-job))
(ediff-defvar-local ediff-diff3-job nil "")
(defmacro ediff-windows-job ()
- `(memq ediff-job-name '(ediff-windows-wordwise ediff-windows-linewise)))
+ '(memq ediff-job-name '(ediff-windows-wordwise ediff-windows-linewise)))
(ediff-defvar-local ediff-windows-job nil "")
(defmacro ediff-word-mode-job ()
- `(memq ediff-job-name '(ediff-windows-wordwise ediff-regions-wordwise)))
+ '(memq ediff-job-name '(ediff-windows-wordwise ediff-regions-wordwise)))
(ediff-defvar-local ediff-word-mode-job nil "")
(defmacro ediff-narrow-job ()
- `(memq ediff-job-name '(ediff-windows-wordwise
+ '(memq ediff-job-name '(ediff-windows-wordwise
ediff-regions-wordwise
ediff-windows-linewise
ediff-regions-linewise)))
(setq startup-hooks
;; this sets various vars in the meta buffer inside
;; ediff-prepare-meta-buffer
- (cons `(lambda ()
- ;; tell what to do if the user clicks on a session record
- (setq ediff-session-action-function
- 'ediff-patch-file-form-meta
- ediff-meta-patchbufer patch-buf) )
+ (cons (lambda ()
+ ;; tell what to do if the user clicks on a session record
+ (setq ediff-session-action-function
+ 'ediff-patch-file-form-meta
+ ediff-meta-patchbufer patch-buf) )
startup-hooks))
(setq meta-buf (ediff-prepare-meta-buffer
'ediff-filegroup-action
;; The main keymap
(easy-mmode-defmap log-edit-mode-map
- `(("\C-c\C-c" . log-edit-done)
+ '(("\C-c\C-c" . log-edit-done)
("\C-c\C-a" . log-edit-insert-changelog)
("\C-c\C-d" . log-edit-show-diff)
("\C-c\C-f" . log-edit-show-files)
(easy-menu-define log-view-mode-menu log-view-mode-map
"Log-View Display Menu"
- `("Log-View"
+ '("Log-View"
;; XXX Do we need menu entries for these?
;; ["Quit" quit-window]
;; ["Kill This Buffer" kill-this-buffer]
(setq check 'type) (symbolp type)
(setq check 'consistency)
(pcase type
- (`DIRCHANGE (and (null subtype) (string= "." file)))
- ((or `NEED-UPDATE `ADDED `MISSING `DEAD `MODIFIED `MESSAGE
- `UP-TO-DATE `REMOVED `NEED-MERGE `CONFLICT `UNKNOWN)
+ ('DIRCHANGE (and (null subtype) (string= "." file)))
+ ((or 'NEED-UPDATE 'ADDED 'MISSING 'DEAD 'MODIFIED 'MESSAGE
+ 'UP-TO-DATE 'REMOVED 'NEED-MERGE 'CONFLICT 'UNKNOWN)
t)))
fi
(error "Invalid :%s in cvs-fileinfo %s" check fi))))
(subtype (cvs-fileinfo->subtype fileinfo)))
(insert
(pcase type
- (`DIRCHANGE (concat "In directory "
+ ('DIRCHANGE (concat "In directory "
(cvs-add-face (cvs-fileinfo->full-name fileinfo)
'cvs-header t 'cvs-goal-column t)
":"))
- (`MESSAGE
+ ('MESSAGE
(cvs-add-face (format "Message: %s" (cvs-fileinfo->full-log fileinfo))
'cvs-msg))
(_
(type
(let ((str (pcase type
;;(MOD-CONFLICT "Not Removed")
- (`DEAD "")
+ ('DEAD "")
(_ (capitalize (symbol-name type)))))
(face (let ((sym (intern-soft
(concat "cvs-fi-"
(set-buffer buffer)
(and (cvs-buffer-p)
(pcase cvs-reuse-cvs-buffer
- (`always t)
- (`subdir
+ ('always t)
+ ('subdir
(or (string-prefix-p default-directory dir)
(string-prefix-p dir default-directory)))
- (`samedir (string= default-directory dir)))
+ ('samedir (string= default-directory dir)))
(cl-return buffer)))))
;; we really have to create a new buffer:
;; we temporarily bind cwd to "" to prevent
(keep
(pcase type
;; Remove temp messages and keep the others.
- (`MESSAGE (not (or rm-msgs (eq subtype 'TEMP))))
+ ('MESSAGE (not (or rm-msgs (eq subtype 'TEMP))))
;; Remove dead entries.
- (`DEAD nil)
+ ('DEAD nil)
;; Handled also?
- (`UP-TO-DATE
+ ('UP-TO-DATE
(not
(if (find-buffer-visiting (cvs-fileinfo->full-name fi))
(eq rm-handled 'all)
according to `smerge-match-conflict'.")
(defvar smerge-text-properties
- `(help-echo "merge conflict: mouse-3 shows a menu"
- ;; mouse-face highlight
- keymap (keymap (down-mouse-3 . smerge-popup-context-menu))))
+ '(help-echo "merge conflict: mouse-3 shows a menu"
+ ;; mouse-face highlight
+ keymap (keymap (down-mouse-3 . smerge-popup-context-menu))))
(defun smerge-remove-props (beg end)
(remove-overlays beg end 'smerge 'refine)
;; 2. When a file A is renamed to B in the index and then back to A
;; in the working tree.
;; In both of these instances, `unregistered' is a reasonable response.
- (`("D " "??") 'unregistered)
+ ('("D " "??") 'unregistered)
;; In other cases, let us return `edited'.
(_ 'edited)))
(files (vc-git-dir-status-state->files git-state)))
(goto-char (point-min))
(pcase (vc-git-dir-status-state->stage git-state)
- (`update-index
+ ('update-index
(setq next-stage (if (vc-git--empty-db-p) 'ls-files-added 'diff-index)))
- (`ls-files-added
+ ('ls-files-added
(setq next-stage 'ls-files-unknown)
(while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 0\t\\([^\0]+\\)\0" nil t)
(let ((new-perm (string-to-number (match-string 1) 8))
(vc-git-dir-status-update-file
git-state name 'added
(vc-git-create-extra-fileinfo 0 new-perm)))))
- (`ls-files-up-to-date
+ ('ls-files-up-to-date
(setq next-stage 'ls-files-unknown)
(while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} \\([0-3]\\)\t\\([^\0]+\\)\0" nil t)
(let ((perm (string-to-number (match-string 1) 8))
'up-to-date
'conflict)
(vc-git-create-extra-fileinfo perm perm)))))
- (`ls-files-conflict
+ ('ls-files-conflict
(setq next-stage 'ls-files-unknown)
;; It's enough to look for "3" to notice a conflict.
(while (re-search-forward "\\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} 3\t\\([^\0]+\\)\0" nil t)
(vc-git-dir-status-update-file
git-state name 'conflict
(vc-git-create-extra-fileinfo perm perm)))))
- (`ls-files-unknown
+ ('ls-files-unknown
(when files (setq next-stage 'ls-files-ignored))
(while (re-search-forward "\\([^\0]*?\\)\0" nil t 1)
(vc-git-dir-status-update-file git-state (match-string 1) 'unregistered
(vc-git-create-extra-fileinfo 0 0))))
- (`ls-files-ignored
+ ('ls-files-ignored
(while (re-search-forward "\\([^\0]*?\\)\0" nil t 1)
(vc-git-dir-status-update-file git-state (match-string 1) 'ignored
(vc-git-create-extra-fileinfo 0 0))))
- (`diff-index
+ ('diff-index
(setq next-stage (if files 'ls-files-up-to-date 'ls-files-conflict))
(while (re-search-forward
":\\([0-7]\\{6\\}\\) \\([0-7]\\{6\\}\\) [0-9a-f]\\{40\\} [0-9a-f]\\{40\\} \\(\\([ADMUT]\\)\0\\([^\0]+\\)\\|\\([CR]\\)[0-9]*\0\\([^\0]+\\)\0\\([^\0]+\\)\\)\0"
(let ((files (vc-git-dir-status-state->files git-state)))
(erase-buffer)
(pcase (vc-git-dir-status-state->stage git-state)
- (`update-index
+ ('update-index
(if files
(vc-git-command (current-buffer) 'async files "add" "--refresh" "--")
(vc-git-command (current-buffer) 'async nil
"update-index" "--refresh")))
- (`ls-files-added
+ ('ls-files-added
(vc-git-command (current-buffer) 'async files
"ls-files" "-z" "-c" "-s" "--"))
- (`ls-files-up-to-date
+ ('ls-files-up-to-date
(vc-git-command (current-buffer) 'async files
"ls-files" "-z" "-c" "-s" "--"))
- (`ls-files-conflict
+ ('ls-files-conflict
(vc-git-command (current-buffer) 'async files
"ls-files" "-z" "-u" "--"))
- (`ls-files-unknown
+ ('ls-files-unknown
(vc-git-command (current-buffer) 'async files
"ls-files" "-z" "-o" "--directory"
"--no-empty-directory" "--exclude-standard" "--"))
- (`ls-files-ignored
+ ('ls-files-ignored
(vc-git-command (current-buffer) 'async files
"ls-files" "-z" "-o" "-i" "--directory"
"--no-empty-directory" "--exclude-standard" "--"))
;; --relative added in Git 1.5.5.
- (`diff-index
+ ('diff-index
(vc-git-command (current-buffer) 'async files
"diff-index" "--relative" "-z" "-M" "HEAD" "--")))
(vc-run-delayed
(defvar vc-git--log-view-long-font-lock-keywords nil)
(defvar font-lock-keywords)
(defvar vc-git-region-history-font-lock-keywords
- `((vc-git-region-history-font-lock)))
+ '((vc-git-region-history-font-lock)))
(defun vc-git-region-history-font-lock (limit)
(let ((in-diff (save-excursion
(insert (propertize
(format " (%s %s)"
(pcase (vc-hg-extra-fileinfo->rename-state extra)
- (`copied "copied from")
- (`renamed-from "renamed from")
- (`renamed-to "renamed to"))
+ ('copied "copied from")
+ ('renamed-from "renamed from")
+ ('renamed-to "renamed to"))
(vc-hg-extra-fileinfo->extra-name extra))
'face 'font-lock-comment-face)))))
(setq branch (replace-match (cdr rule) t nil branch))))
(format "Mtn%c%s"
(pcase (vc-state file)
- ((or `up-to-date `needs-update) ?-)
- (`added ?@)
+ ((or 'up-to-date 'needs-update) ?-)
+ ('added ?@)
(_ ?:))
branch))
"")))
(forward-line (1- (pop insn)))
(setq p (point))
(pcase (pop insn)
- (`k (setq s (buffer-substring-no-properties
+ ('k (setq s (buffer-substring-no-properties
p (progn (forward-line (car insn))
(point))))
(when prda
(push `(,p . ,(propertize s :vc-rcs-r/d/a prda)) path))
(delete-region p (point)))
- (`i (setq s (car insn))
+ ('i (setq s (car insn))
(when prda
(push `(,p . ,(length s)) path))
(insert s)))))
(goto-char (point-min))
(forward-line (1- (pop insn)))
(pcase (pop insn)
- (`k (delete-region
+ ('k (delete-region
(point) (progn (forward-line (car insn))
(point))))
- (`i (insert (propertize
+ ('i (insert (propertize
(car insn)
:vc-rcs-r/d/a
(or prda (setq prda (r/d/a))))))))
(setq has-bogus (memq (car option) style)))
t)))
whitespace-report-list)))
- (when (pcase report-if-bogus (`nil t) (`never nil) (_ has-bogus))
+ (when (pcase report-if-bogus ('nil t) ('never nil) (_ has-bogus))
(whitespace-kill-buffer whitespace-report-buffer-name)
;; `indent-tabs-mode' may be local to current buffer
;; `tab-width' may be local to current buffer
(window-prev-buffers window)))))
(head
`(,type
- ,@(unless (window-next-sibling window) `((last . t)))
+ ,@(unless (window-next-sibling window) '((last . t)))
(pixel-width . ,(window-pixel-width window))
(pixel-height . ,(window-pixel-height window))
(total-width . ,(window-total-width window))
((window-minibuffer-p) nil)
((not (eq (window-dedicated-p) t)) 'force-same-window)
((pcase switch-to-buffer-in-dedicated-window
- (`nil (user-error
+ ('nil (user-error
"Cannot switch buffers in a dedicated window"))
- (`prompt
+ ('prompt
(if (y-or-n-p
(format "Window is dedicated to %s; undedicate it"
(window-buffer)))
'force-same-window)
(user-error
"Cannot switch buffers in a dedicated window")))
- (`pop nil)
+ ('pop nil)
(_ (set-window-dedicated-p nil nil) 'force-same-window))))))
(list (read-buffer-to-switch "Switch to buffer: ") nil force-same-window)))
(let ((buffer (window-normalize-buffer-to-switch-to buffer-or-name)))
""
"-in-comments")))
(if test-in-strings
- `(("\"" "\"" "-in-strings")))
+ '(("\"" "\"" "-in-strings")))
(if test-in-code
- `(("" "" ""))))
+ '(("" "" ""))))
append
(cl-loop
for char across input
(should-error (cl-struct-slot-offset 'mystruct 'marypoppins))
(should (pcase (cl-struct-slot-info 'mystruct)
(`((cl-tag-slot) (abc 5 :readonly t)
- (def . ,(or `nil `(nil))))
+ (def . ,(or 'nil '(nil))))
t)))))
(ert-deftest cl-lib-struct-constructors ()
(should (string-match "\\`Constructor docstring."
(ert-deftest ert-test-should-with-macrolet ()
(let ((test (make-ert-test :body (lambda ()
- (cl-macrolet ((foo () `(progn t nil)))
+ (cl-macrolet ((foo () '(progn t nil)))
(should (foo)))))))
(let ((result (let ((ert-debug-on-error nil))
(ert-run-test test))))
:name nil
:body nil
:tags '(a b))))
- (should (equal (ert-select-tests `(tag a) (list test)) (list test)))
- (should (equal (ert-select-tests `(tag b) (list test)) (list test)))
- (should (equal (ert-select-tests `(tag c) (list test)) '()))))
+ (should (equal (ert-select-tests '(tag a) (list test)) (list test)))
+ (should (equal (ert-select-tests '(tag b) (list test)) (list test)))
+ (should (equal (ert-select-tests '(tag c) (list test)) '()))))
;;; Tests for utility functions.
(setf (epg-context-home-directory context)
epg-tests-home-directory)
,(if require-passphrase
- `(with-temp-file (expand-file-name
+ '(with-temp-file (expand-file-name
"gpg-agent.conf" epg-tests-home-directory)
(insert "pinentry-program "
(expand-file-name "dummy-pinentry"
context
#'epg-tests-passphrase-callback)))
,(if require-public-key
- `(epg-import-keys-from-file
+ '(epg-import-keys-from-file
context
(expand-file-name "pubkey.asc" epg-tests-data-directory)))
,(if require-secret-key
- `(epg-import-keys-from-file
+ '(epg-import-keys-from-file
context
(expand-file-name "seckey.asc" epg-tests-data-directory)))
(with-temp-buffer
(unless (memq method '(+ - * / vconcat append
sit-for ignore))
(signal 'jsonrpc-error
- `((jsonrpc-error-message
+ '((jsonrpc-error-message
. "Sorry, this isn't allowed")
(jsonrpc-error-code . -32601))))
(apply method (append params nil)))
(should-have-watch-data `(data-tests-lvar 3 set ,buf1)))
(should-have-watch-data `(data-tests-lvar 1 unlet ,buf1))
(setq-default data-tests-lvar 4)
- (should-have-watch-data `(data-tests-lvar 4 set nil))
+ (should-have-watch-data '(data-tests-lvar 4 set nil))
(with-temp-buffer
(setq buf2 (current-buffer))
(setq data-tests-lvar 1)
(kill-all-local-variables)
(should-have-watch-data `(data-tests-lvar nil makunbound ,buf2)))
(setq-default data-tests-lvar 4)
- (should-have-watch-data `(data-tests-lvar 4 set nil))
+ (should-have-watch-data '(data-tests-lvar 4 set nil))
(makunbound 'data-tests-lvar)
(should-have-watch-data '(data-tests-lvar nil makunbound nil))
(setq data-tests-lvar 5)
(should (equal
(json-serialize
(list :detect-hash-table #s(hash-table test equal data ("bla" "ble"))
- :detect-alist `((bla . "ble"))
- :detect-plist `(:bla "ble")))
+ :detect-alist '((bla . "ble"))
+ :detect-plist '(:bla "ble")))
"\
{\
\"detect-hash-table\":{\"bla\":\"ble\"},\