diff --git a/lisp/outline.el b/lisp/outline.el index e6365629197..9874e318afe 100644 --- a/lisp/outline.el +++ b/lisp/outline.el @@ -1067,6 +1067,7 @@ outline-isearch-open-invisible (defun outline-hide-entry () "Hide the body directly following this heading." + (declare (context point)) (interactive) (save-excursion (outline-back-to-heading) @@ -1094,6 +1095,7 @@ 'show-entry (defun outline-hide-body () "Hide all body lines in buffer, leaving all headings visible. Note that this does not hide the lines preceding the first heading line." + (declare (context buffer)) (interactive) (outline-hide-region-body (point-min) (point-max))) diff --git a/lisp/simple.el b/lisp/simple.el index ff665111a5d..9026f0950c8 100644 --- a/lisp/simple.el +++ b/lisp/simple.el @@ -2772,6 +2772,12 @@ command-execute executing a special event, so ignore the prefix argument and don't clear it." (setq debug-on-next-call nil) + (when (and (mouse-event-p last-nonmenu-event) + (not (memq (posn-area (event-start last-nonmenu-event)) + '(mode-line menu-bar))) + (symbolp this-command) + (memq 'point (function-get this-command 'context))) + (posn-set-point (event-start last-nonmenu-event))) (let ((prefixarg (unless special ;; FIXME: This should probably be done around ;; pre-command-hook rather than here! diff --git a/lisp/emacs-lisp/byte-run.el b/lisp/emacs-lisp/byte-run.el index a377ec395e1..24a1d11d960 100644 --- a/lisp/emacs-lisp/byte-run.el +++ b/lisp/emacs-lisp/byte-run.el @@ -217,6 +217,11 @@ 'byte-run--set-interactive-args (cadr elem))) val))))) +(defalias 'byte-run--set-context + #'(lambda (f _args &rest val) + (list 'function-put (list 'quote f) + ''context (list 'quote val)))) + ;; Add any new entries to info node `(elisp)Declare Form'. (defvar defun-declarations-alist (list @@ -239,7 +244,8 @@ defun-declarations-alist (list 'speed #'byte-run--set-speed) (list 'completion #'byte-run--set-completion) (list 'modes #'byte-run--set-modes) - (list 'interactive-args #'byte-run--set-interactive-args)) + (list 'interactive-args #'byte-run--set-interactive-args) + (list 'context #'byte-run--set-context)) "List associating function properties to their macro expansion. Each element of the list takes the form (PROP FUN) where FUN is a function. For each (PROP . VALUES) in a function's declaration,