Function: log-view-toggle-entry-display
log-view-toggle-entry-display is an interactive and byte-compiled
function defined in log-view.el.gz.
Signature
(log-view-toggle-entry-display)
Documentation
If possible, expand the current Log View entry.
This calls log-view-expanded-log-entry-function to do the work.
See also log-view-display-entry-and-diff.
Probably introduced at or before Emacs version 24.1.
Key Bindings
Source Code
;; Defined in /usr/src/emacs/lisp/vc/log-view.el.gz
(defun log-view-toggle-entry-display ()
"If possible, expand the current Log View entry.
This calls `log-view-expanded-log-entry-function' to do the work.
See also `log-view-display-entry-and-diff'."
(interactive)
;; Don't do anything unless `log-view-expanded-log-entry-function'
;; is defined in this mode.
(when (functionp log-view-expanded-log-entry-function)
(let* ((opoint (point))
(entry (log-view-current-entry nil t))
(beg (car entry))
(inhibit-read-only t)
deactivate-mark)
(when entry
(if (get-text-property beg 'log-view-entry-expanded)
;; If the entry is expanded, collapse it.
(let ((pos (next-single-property-change beg 'log-view-comment)))
(unless (and pos (log-view-inside-comment-p pos))
(error "Broken markup in `log-view-toggle-entry-display'"))
(delete-region pos
(or
(next-single-property-change pos 'log-view-comment)
(point-max)))
(put-text-property beg (1+ beg) 'log-view-entry-expanded nil)
(if (< opoint pos)
(goto-char opoint)))
;; Otherwise, expand the entry.
(let ((long-entry (funcall log-view-expanded-log-entry-function
(nth 1 entry))))
(when long-entry
(put-text-property beg (1+ beg) 'log-view-entry-expanded t)
(log-view-end-of-defun)
(setq beg (point))
(insert long-entry "\n")
(add-text-properties
beg (point)
'(font-lock-face log-view-commit-body log-view-comment t))
(goto-char opoint))))))))