Function: sesman-browser-get

sesman-browser-get is a byte-compiled function defined in sesman-browser.el.

Signature

(sesman-browser-get WHAT &optional NO-ERROR LAX)

Documentation

Get value of the property WHAT at point.

If NO-ERROR is non-nil, don't throw an error if no value has been found and return nil. If LAX is non-nil, search nearby and return the closest value.

Source Code

;; Defined in ~/.emacs.d/elpa/sesman-20240417.1723/sesman-browser.el
(defun sesman-browser-get (what &optional no-error lax)
  "Get value of the property WHAT at point.
If NO-ERROR is non-nil, don't throw an error if no value has been found and
return nil. If LAX is non-nil, search nearby and return the closest value."
  (when (derived-mode-p 'sesman-browser-mode)
    (or (let ((prop (pcase what
                      ('session :sesman-session)
                      ('link    :sesman-link)
                      ('object  :sesman-object)
                      (_        what))))
          (sesman-browser--closeby-value prop 'lax))
        (unless no-error
          (user-error "No %s %s" what (if lax "nearby" "at point"))))))