Function: js--backward-text-property

js--backward-text-property is a byte-compiled function defined in js.el.gz.

Signature

(js--backward-text-property PROPNAME)

Documentation

Move over the previous value of PROPNAME in the buffer.

If found, return that value and leave point just before the character that has that value, otherwise return nil and leave point at BOB.

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/js.el.gz
(defun js--backward-text-property (propname)
  "Move over the previous value of PROPNAME in the buffer.
If found, return that value and leave point just before the
character that has that value, otherwise return nil and leave
point at BOB."
    (unless (bobp)
      (let ((prev-value (get-text-property (1- (point)) propname)))
        (if prev-value
            (backward-char)

          (goto-char (previous-single-property-change
                      (point) propname nil (point-min)))

          (unless (bobp)
            (backward-char)
            (setq prev-value (get-text-property (point) propname))))

        prev-value)))