Function: makefile-browser-toggle

makefile-browser-toggle is an interactive and byte-compiled function defined in make-mode.el.gz.

Signature

(makefile-browser-toggle)

Documentation

Toggle the selection state of the browser item at the cursor position.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/progmodes/make-mode.el.gz
;;;
;;; Toggle state of a browser item
;;;

(defun makefile-browser-toggle ()
  "Toggle the selection state of the browser item at the cursor position."
  (interactive)
  (let ((this-line (count-lines (point-min) (point))))
    (setq this-line (max 1 this-line))
    (makefile-browser-toggle-state-for-line this-line)
    (goto-char (point-min))
    (forward-line (1- this-line))
    (let ((inhibit-read-only t))
      (beginning-of-line)		; redundant?
      (if (makefile-browser-on-macro-line-p)
	  (let ((macro-name (makefile-browser-this-line-macro-name)))
	    (delete-region (point) (progn (end-of-line) (point)))
	    (insert
	     (makefile-browser-format-macro-line
		macro-name
		(makefile-browser-get-state-for-line this-line))))
	(let ((target-name (makefile-browser-this-line-target-name)))
	  (delete-region (point) (progn (end-of-line) (point)))
	  (insert
	   (makefile-browser-format-target-line
	      target-name
	      (makefile-browser-get-state-for-line this-line))))))
    (beginning-of-line)
    (forward-char makefile-browser-cursor-column)
    (if makefile-browser-auto-advance-after-selection-p
	(makefile-browser-next-line))))