From: Stefan Monnier Date: Wed, 14 Apr 2021 03:34:35 +0000 (-0400) Subject: * lisp/nxml/xmltok.el (xmltok-defregexp): Don't quote lambda X-Git-Tag: emacs-28.0.90~2861 X-Git-Url: http://git.eshelyaron.com/gitweb/?a=commitdiff_plain;h=839a9e74e0263f4e75a0c34df39c2e0a57c49438;p=emacs.git * lisp/nxml/xmltok.el (xmltok-defregexp): Don't quote lambda --- diff --git a/lisp/nxml/xmltok.el b/lisp/nxml/xmltok.el index 8f89598a5ad..9824eebbd8b 100644 --- a/lisp/nxml/xmltok.el +++ b/lisp/nxml/xmltok.el @@ -324,8 +324,8 @@ and VALUE-END, otherwise a STRING giving the value." (setq strs (cons (car arg) strs)) (setq names (cons (cdr arg) names))) (setq args (cdr args)))) - (cons (apply 'concat (nreverse strs)) - (apply 'append (nreverse names)))))) + (cons (apply #'concat (nreverse strs)) + (apply #'append (nreverse names)))))) (eval-when-compile ;; Make a symbolic group named NAME from the regexp R. @@ -338,7 +338,7 @@ and VALUE-END, otherwise a STRING giving the value." (cons (concat "\\(" (car ,sym) "\\)") (cons ',name (cdr ,sym))))))) (defun xmltok-p (&rest r) (xmltok+ "\\(?:" - (apply 'xmltok+ r) + (apply #'xmltok+ r) "\\)")) ;; Get the group index of ELEM in a LIST of symbols. @@ -372,22 +372,23 @@ and VALUE-END, otherwise a STRING giving the value." (defmacro xmltok-defregexp (sym r) `(defalias ',sym (let ((r ,r)) - `(macro lambda (action &optional group-name) - (cond ((eq action 'regexp) - ,(car r)) - ((or (eq action 'start) (eq action 'beginning)) - (list 'match-beginning (xmltok-get-index group-name - ',(cdr r)))) - ((eq action 'end) - (list 'match-end (xmltok-get-index group-name - ',(cdr r)))) - ((eq action 'string) - (list 'match-string - (xmltok-get-index group-name ',(cdr r)))) - ((eq action 'string-no-properties) - (list 'match-string-no-properties - (xmltok-get-index group-name ',(cdr r)))) - (t (error "Invalid action: %s" action)))))))) + `(macro + . ,(lambda (action &optional group-name) + (cond ((eq action 'regexp) + (car r)) + ((or (eq action 'start) (eq action 'beginning)) + (list 'match-beginning (xmltok-get-index group-name + (cdr r)))) + ((eq action 'end) + (list 'match-end (xmltok-get-index group-name + (cdr r)))) + ((eq action 'string) + (list 'match-string + (xmltok-get-index group-name (cdr r)))) + ((eq action 'string-no-properties) + (list 'match-string-no-properties + (xmltok-get-index group-name (cdr r)))) + (t (error "Invalid action: %s" action))))))))) (eval-when-compile @@ -878,7 +879,7 @@ and VALUE-END, otherwise a STRING giving the value." (cons " " value-parts))))) (< (point) end)))) (when well-formed - (aset att 5 (apply 'concat (nreverse value-parts)))) + (aset att 5 (apply #'concat (nreverse value-parts)))) (aset att 6 (nreverse refs)))) (defun xmltok-scan-after-amp (entity-handler) @@ -1333,7 +1334,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT." t)))) (if (not well-formed) nil - (apply 'concat + (apply #'concat (nreverse (cons (buffer-substring-no-properties start lim) value-parts)))))) @@ -1358,7 +1359,7 @@ If LIMIT is non-nil, then do not consider characters beyond LIMIT." (defun xmltok-require-next-token (&rest types) (xmltok-next-prolog-token) - (apply 'xmltok-require-token types)) + (apply #'xmltok-require-token types)) (defun xmltok-require-token (&rest types) ;; XXX Generate a more helpful error message