Make down-list signal an error if called inside a string
* lisp/emacs-lisp/lisp.el (down-list): Signal an error inside a string (bug#5588).
This commit is contained in:
parent
cbd59395bd
commit
0b3b295776
1 changed files with 2 additions and 0 deletions
|
@ -171,6 +171,8 @@ This command assumes point is not in a string or comment.
|
|||
If INTERACTIVE is non-nil, as it is interactively,
|
||||
report errors as appropriate for this kind of usage."
|
||||
(interactive "^p\nd")
|
||||
(when (ppss-comment-or-string-start (syntax-ppss))
|
||||
(user-error "This command doesn't work in strings or comments"))
|
||||
(if interactive
|
||||
(condition-case _
|
||||
(down-list arg nil)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue