Function: smart-push-button

smart-push-button is a byte-compiled function defined in hui-mouse.el.

Signature

(smart-push-button &optional POS USE-MOUSE-ACTION)

Documentation

Activate an Emacs push-button, including text-property follow-link buttons.

Button is at optional POS or at point. USE-MOUSE-ACTION prefers mouse-action to action property.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hui-mouse.el
;;; ************************************************************************
;;; smart-push-button functions
;;; ************************************************************************

;; Emacs push button support
(defun smart-push-button (&optional _pos _use-mouse-action)
  "Activate an Emacs `push-button', including text-property follow-link buttons.
Button is at optional POS or at point.  USE-MOUSE-ACTION prefers
mouse-action to action property."
  (or
   ;; Handle Emacs text-property buttons which don't work with 'button-activate'.
   ;; Use whatever command is bound to RET within the button's keymap.
   (call-interactively (or (lookup-key (get-text-property (point) 'keymap) (kbd "RET"))
			   (lambda () (interactive) nil)))
   ;; non-text-property push-buttons
   (push-button nil (mouse-event-p last-command-event))))