Function: emacs-lock--can-auto-unlock

emacs-lock--can-auto-unlock is a byte-compiled function defined in emacs-lock.el.gz.

Signature

(emacs-lock--can-auto-unlock ACTION)

Documentation

Return t if the current buffer can auto-unlock for ACTION.

ACTION must be one of kill or exit. See emacs-lock-unlockable-modes.

Source Code

;; Defined in /usr/src/emacs/lisp/emacs-lock.el.gz
(defun emacs-lock--can-auto-unlock (action)
  "Return t if the current buffer can auto-unlock for ACTION.
ACTION must be one of `kill' or `exit'.
See `emacs-lock-unlockable-modes'."
  (and emacs-lock--try-unlocking
       (not (emacs-lock-live-process-p (current-buffer)))
       (or (eq emacs-lock-unlockable-modes t)
           (let ((unlock (cdr (assq major-mode emacs-lock-unlockable-modes))))
             (or (eq unlock 'all) (eq unlock action))))))