Permalink
Browse files

vimpulse-surround-define-text-object complains loudly about docstring…

… mismatch
  • Loading branch information...
1 parent 0d1cc15 commit f6f48601f1bcb86d45fd12e5898d3b5592566166 @timcharper committed Aug 24, 2010
Showing with 3 additions and 2 deletions.
  1. +3 −2 vimpulse-surround.el
@@ -120,10 +120,11 @@ It triggers `vimpulse-change'. Nothing to see here, move along.")
(defun vimpulse-surround-prepend-key-prefix (keys)
(mapcar (lambda (key) (concat "s" key)) keys))
-(defmacro vimpulse-surround-define-text-object (object args &rest body)
+(defmacro vimpulse-surround-define-text-object (object args docstring &rest body)
(let ((strip-object-name (intern (concat (symbol-name object) "-strip")))
- (docstring (pop body))
forward-args strip-keys keys)
+ (unless (stringp docstring)
+ (throw 'exception (format "Invalid docstring: %S" docstring)))
(while (keywordp (car body))
(setq keyword (pop body))
(cond

0 comments on commit f6f4860

Please sign in to comment.