Add declares for viper-deflocalvar and viper-loop.

* lisp/emulation/viper-init.el (viper-deflocalvar): Add docstring and
indentation declaration.
(viper-loop): Add indentation declaration.

Fixes: debbugs:7025
This commit is contained in:
Vegard Øye 2012-08-05 16:51:59 +08:00 committed by Chong Yidong
parent f0422feb64
commit d5c31f1ddd
2 changed files with 11 additions and 0 deletions

View file

@ -1,3 +1,9 @@
2012-08-05 Vegard Øye <vegard_oye@hotmail.com>
* emulation/viper-init.el (viper-deflocalvar): Add docstring and
indentation declaration.
(viper-loop): Add indentation declaration (Bug#7025).
2012-08-05 Chong Yidong <cyd@gnu.org>
* help-fns.el (describe-variable): Add hyperlink for

View file

@ -96,6 +96,10 @@ In all likelihood, you don't need to bother with this setting."
;;; Macros
(defmacro viper-deflocalvar (var default-value &optional documentation)
"Define VAR as a buffer-local variable.
DEFAULT-VALUE is the default value, and DOCUMENTATION is the
docstring. The variable becomes buffer-local whenever set."
(declare (indent defun))
`(progn
(defvar ,var ,default-value
,(format "%s\n\(buffer local\)" documentation))
@ -103,6 +107,7 @@ In all likelihood, you don't need to bother with this setting."
;; (viper-loop COUNT BODY) Execute BODY COUNT times.
(defmacro viper-loop (count &rest body)
(declare (indent defun))
`(let ((count ,count))
(while (> count 0)
,@body