mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-23 22:20:24 -08:00
Use `declare' in defmacros.
* lisp/window.el (save-selected-window): * lisp/subr.el (with-temp-file, with-temp-message, with-syntax-table): * lisp/progmodes/python.el (def-python-skeleton): * lisp/net/dbus.el (dbus-ignore-errors): * lisp/jka-cmpr-hook.el (with-auto-compression-mode): * lisp/international/mule.el (with-category-table): * lisp/emacs-lisp/timer.el (with-timeout): * lisp/emacs-lisp/lisp-mnt.el (lm-with-file): * lisp/emacs-lisp/eieio.el (with-slots): * lisp/emacs-lisp/easymenu.el (easy-menu-define): * lisp/emacs-lisp/debug.el (debugger-env-macro): * lisp/emacs-lisp/cl-compat.el (Multiple-value-bind, Multiple-value-setq) (Multiple-value-call, Multiple-value-prog1): * lisp/emacs-lisp/cl-seq.el (cl-parsing-keywords, cl-check-key) (cl-check-test-nokey, cl-check-test, cl-check-match): Move indent and edebug rule to definition. * lisp/emacs-lisp/lisp-mode.el (save-selected-window) (with-current-buffer, combine-after-change-calls) (with-output-to-string, with-temp-file, with-temp-buffer) (with-temp-message, with-syntax-table, read-if, eval-after-load) (dolist, dotimes, when, unless): * lisp/emacs-lisp/byte-run.el (inline): Remove indent rule, redundant.
This commit is contained in:
parent
cd196f1256
commit
f291fe60fb
16 changed files with 52 additions and 51 deletions
|
|
@ -48,6 +48,7 @@
|
|||
;;; this file independent from cl-macs.
|
||||
|
||||
(defmacro cl-parsing-keywords (kwords other-keys &rest body)
|
||||
(declare (indent 2) (debug (sexp sexp &rest form)))
|
||||
(cons
|
||||
'let*
|
||||
(cons (mapcar
|
||||
|
|
@ -84,13 +85,13 @@
|
|||
(car cl-keys-temp)))
|
||||
'(setq cl-keys-temp (cdr (cdr cl-keys-temp)))))))
|
||||
body))))
|
||||
(put 'cl-parsing-keywords 'lisp-indent-function 2)
|
||||
(put 'cl-parsing-keywords 'edebug-form-spec '(sexp sexp &rest form))
|
||||
|
||||
(defmacro cl-check-key (x)
|
||||
(declare (debug edebug-forms))
|
||||
(list 'if 'cl-key (list 'funcall 'cl-key x) x))
|
||||
|
||||
(defmacro cl-check-test-nokey (item x)
|
||||
(declare (debug edebug-forms))
|
||||
(list 'cond
|
||||
(list 'cl-test
|
||||
(list 'eq (list 'not (list 'funcall 'cl-test item x))
|
||||
|
|
@ -101,20 +102,17 @@
|
|||
(list 'equal item x) (list 'eq item x)))))
|
||||
|
||||
(defmacro cl-check-test (item x)
|
||||
(declare (debug edebug-forms))
|
||||
(list 'cl-check-test-nokey item (list 'cl-check-key x)))
|
||||
|
||||
(defmacro cl-check-match (x y)
|
||||
(declare (debug edebug-forms))
|
||||
(setq x (list 'cl-check-key x) y (list 'cl-check-key y))
|
||||
(list 'if 'cl-test
|
||||
(list 'eq (list 'not (list 'funcall 'cl-test x y)) 'cl-test-not)
|
||||
(list 'if (list 'numberp x)
|
||||
(list 'equal x y) (list 'eq x y))))
|
||||
|
||||
(put 'cl-check-key 'edebug-form-spec 'edebug-forms)
|
||||
(put 'cl-check-test 'edebug-form-spec 'edebug-forms)
|
||||
(put 'cl-check-test-nokey 'edebug-form-spec 'edebug-forms)
|
||||
(put 'cl-check-match 'edebug-form-spec 'edebug-forms)
|
||||
|
||||
(defvar cl-test) (defvar cl-test-not)
|
||||
(defvar cl-if) (defvar cl-if-not)
|
||||
(defvar cl-key)
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue