Function: actype:act

actype:act is a byte-compiled function defined in hact.el.

Signature

(actype:act ACTYPE &rest ARGS)

Documentation

Perform action formed from ACTYPE and rest of ARGS and return value.

If value is nil, however, t is returned instead, to ensure that implicit button types register the performance of the action. ACTYPE may be a symbol or symbol name for either an action type or a function. Runs action-act-hook before performing ACTION.

Source Code

;; Defined in ~/.emacs.d/elpa/hyperbole-20260414.325/hact.el
(defun    actype:act (actype &rest args)
  "Perform action formed from ACTYPE and rest of ARGS and return value.
If value is nil, however, t is returned instead, to ensure that implicit button
types register the performance of the action.  ACTYPE may be a symbol or symbol
name for either an action type or a function.  Runs `action-act-hook' before
performing ACTION."
  (when (null actype)
    (error "(actype:act): No action type specified"))
  (let ((prefix-arg current-prefix-arg)
	(action (actype:action actype)))
    (if (null action)
	(error "(actype:act): Null action for action type: `%s'" actype)
      ;; Next 2 lines are needed so that relative paths are expanded
      ;; properly.  But in rare cases, this can improperly expand simple
      ;; string arguments like "tags" as a pathname, when it is not
      ;; being used as a path.  So do this only if actype is a defact
      ;; and not a defun to limit any potential impact. RSW - 9/22/2017
      (and (symbolp action)
	   (symtable:hyperbole-actype-p action)
	   (setq args (hpath:absolute-arguments actype args)))
      (let ((hist-elt (hhist:element)))
	(run-hooks 'action-act-hook)
	(prog1 (or (when (and (fboundp 'closurep) (closurep action))
			 (apply action args))
		   (if (or (symbolp action) (listp action)
			   (byte-code-function-p action)
			   (subrp action)
			   (and (stringp action) (not (integerp action))
				(setq action (key-binding action))))
		       (apply action args)
		     (eval action))
		   t)
	  (hhist:add hist-elt))))))