diff options
author | Juri Linkov <juri@linkov.net> | 2021-09-27 18:41:34 +0300 |
---|---|---|
committer | Juri Linkov <juri@linkov.net> | 2021-09-27 18:41:34 +0300 |
commit | 28f8ffa58ee6c3af5e486dd5cb28e7dbf680232f (patch) | |
tree | bf683787c33792818bf90ea4f278ee5bc227d483 | |
parent | 79b5d66bd66458f6e669adee2698e9fd18c4bc3a (diff) | |
download | emacs-28f8ffa58ee6c3af5e486dd5cb28e7dbf680232f.tar.gz emacs-28f8ffa58ee6c3af5e486dd5cb28e7dbf680232f.tar.bz2 emacs-28f8ffa58ee6c3af5e486dd5cb28e7dbf680232f.zip |
* lisp/mouse.el (context-menu-region): Check for nil for char-after at eobp.
-rw-r--r-- | lisp/mouse.el | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/lisp/mouse.el b/lisp/mouse.el index 9f1417f420d..d80b241af52 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el @@ -486,8 +486,9 @@ Some context functions add menu items below the separator." `(menu-item "List" ,(lambda (e) (interactive "e") (mark-thing-at-mouse e 'list)) :help "Mark the list at click for a subsequent cut/copy")) - (when (let ((pos (posn-point (event-end click)))) - (or (eq (char-syntax (char-after pos)) ?\") + (when (let* ((pos (posn-point (event-end click))) + (char (when pos (char-after pos)))) + (or (and char (eq (char-syntax char) ?\")) (nth 3 (save-excursion (syntax-ppss pos))))) (define-key-after submenu [mark-string] `(menu-item "String" |