diff options
| author | Vegard Øye | 2012-08-05 16:51:59 +0800 |
|---|---|---|
| committer | Chong Yidong | 2012-08-05 16:51:59 +0800 |
| commit | d5c31f1ddd83e958d4b944d7aa94302359f8ecf9 (patch) | |
| tree | 5741b799e602b4af7484b7d53bf99793084d2ed1 | |
| parent | f0422feb64518e6a787346fa934ad1e1744435c6 (diff) | |
| download | emacs-d5c31f1ddd83e958d4b944d7aa94302359f8ecf9.tar.gz emacs-d5c31f1ddd83e958d4b944d7aa94302359f8ecf9.zip | |
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
| -rw-r--r-- | lisp/ChangeLog | 6 | ||||
| -rw-r--r-- | lisp/emulation/viper-init.el | 5 |
2 files changed, 11 insertions, 0 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 623bf4336b6..0b86350aef8 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,3 +1,9 @@ | |||
| 1 | 2012-08-05 Vegard Øye <vegard_oye@hotmail.com> | ||
| 2 | |||
| 3 | * emulation/viper-init.el (viper-deflocalvar): Add docstring and | ||
| 4 | indentation declaration. | ||
| 5 | (viper-loop): Add indentation declaration (Bug#7025). | ||
| 6 | |||
| 1 | 2012-08-05 Chong Yidong <cyd@gnu.org> | 7 | 2012-08-05 Chong Yidong <cyd@gnu.org> |
| 2 | 8 | ||
| 3 | * help-fns.el (describe-variable): Add hyperlink for | 9 | * help-fns.el (describe-variable): Add hyperlink for |
diff --git a/lisp/emulation/viper-init.el b/lisp/emulation/viper-init.el index 9f0826bf515..c482a88de1a 100644 --- a/lisp/emulation/viper-init.el +++ b/lisp/emulation/viper-init.el | |||
| @@ -96,6 +96,10 @@ In all likelihood, you don't need to bother with this setting." | |||
| 96 | ;;; Macros | 96 | ;;; Macros |
| 97 | 97 | ||
| 98 | (defmacro viper-deflocalvar (var default-value &optional documentation) | 98 | (defmacro viper-deflocalvar (var default-value &optional documentation) |
| 99 | "Define VAR as a buffer-local variable. | ||
| 100 | DEFAULT-VALUE is the default value, and DOCUMENTATION is the | ||
| 101 | docstring. The variable becomes buffer-local whenever set." | ||
| 102 | (declare (indent defun)) | ||
| 99 | `(progn | 103 | `(progn |
| 100 | (defvar ,var ,default-value | 104 | (defvar ,var ,default-value |
| 101 | ,(format "%s\n\(buffer local\)" documentation)) | 105 | ,(format "%s\n\(buffer local\)" documentation)) |
| @@ -103,6 +107,7 @@ In all likelihood, you don't need to bother with this setting." | |||
| 103 | 107 | ||
| 104 | ;; (viper-loop COUNT BODY) Execute BODY COUNT times. | 108 | ;; (viper-loop COUNT BODY) Execute BODY COUNT times. |
| 105 | (defmacro viper-loop (count &rest body) | 109 | (defmacro viper-loop (count &rest body) |
| 110 | (declare (indent defun)) | ||
| 106 | `(let ((count ,count)) | 111 | `(let ((count ,count)) |
| 107 | (while (> count 0) | 112 | (while (> count 0) |
| 108 | ,@body | 113 | ,@body |