Function: 2C-associated-buffer

2C-associated-buffer is an interactive and byte-compiled function defined in two-column.el.gz.

Signature

(2C-associated-buffer)

Documentation

Switch to associated buffer.

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/two-column.el.gz
;;;;; utility functions ;;;;;

(defun 2C-associated-buffer ()
  "Switch to associated buffer."
  (interactive)
  (let ((line (+ (count-lines (point-min) (point))
		 (if (bolp) 1 0)))
	(col (if (eolp) (if (bolp) 0) (current-column))))
    (if (get-buffer-window (2C-other t))
	(select-window (get-buffer-window (2C-other)))
      (switch-to-buffer (2C-other)))
    (goto-char (point-min))
    (newline (forward-line (1- line)))
    (if col
	(move-to-column col)
      (end-of-line 1))))