Function: log-view-toggle-mark-entry

log-view-toggle-mark-entry is an interactive and byte-compiled function defined in log-view.el.gz.

Signature

(log-view-toggle-mark-entry)

Documentation

Toggle the marked state for the log entry at point.

Individual log entries can be marked and unmarked. The marked entries are denoted by changing their background color. log-view-get-marked returns the list of tags for the marked log entries.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/vc/log-view.el.gz
(defun log-view-toggle-mark-entry ()
  "Toggle the marked state for the log entry at point.
Individual log entries can be marked and unmarked.  The marked
entries are denoted by changing their background color.
`log-view-get-marked' returns the list of tags for the marked
log entries."
  (interactive)
  (save-excursion
    (let* ((entry (log-view-current-entry nil t))
	   (beg (car entry))
	   found)
      (when entry
	;; Look to see if the current entry is marked.
	(setq found (get-char-property beg 'log-view-self))
	(if found
	    (delete-overlay found)
	  ;; Create an overlay covering this entry and change its color.
	  (let* ((end (if (get-text-property beg 'log-view-entry-expanded)
			  (next-single-property-change beg 'log-view-comment)
			(log-view-end-of-defun)
			(point)))
		 (ov (make-overlay beg end)))
	    (overlay-put ov 'face 'log-view-file)
	    ;; This is used to check if the overlay is present.
	    (overlay-put ov 'log-view-self ov)
	    (overlay-put ov 'log-view-marked (nth 1 entry))))))))