* lisp/mouse.el (context-menu-region): Use save-excursion for syntax-ppss.
This commit is contained in:
parent
5d96fad278
commit
13d930dedd
1 changed files with 2 additions and 1 deletions
|
@ -483,7 +483,8 @@ Some context functions add menu items below the separator."
|
|||
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'defun))
|
||||
:help "Mark the defun at click for a subsequent cut/copy"))
|
||||
(define-key-after submenu [mark-list-or-string]
|
||||
`(menu-item ,(if (nth 8 (syntax-ppss (posn-point (event-end click))))
|
||||
`(menu-item ,(if (nth 8 (save-excursion
|
||||
(syntax-ppss (posn-point (event-end click)))))
|
||||
"String" "List")
|
||||
,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list-or-string))
|
||||
:help "Mark list or string at click for a subsequent cut/copy"))
|
||||
|
|
Loading…
Add table
Reference in a new issue