Function: 2C-associate-buffer

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

Signature

(2C-associate-buffer BUFFER)

Documentation

Associate another BUFFER with this one in two-column minor mode.

Can also be used to associate a just previously visited file, by accepting the proposed default buffer.

(See C-h m (describe-mode) .)

Key Bindings

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/two-column.el.gz
;;;###autoload
(defun 2C-associate-buffer (buffer)
  "Associate another BUFFER with this one in two-column minor mode.
Can also be used to associate a just previously visited file, by
accepting the proposed default buffer.

\(See  \\[describe-mode] .)"
  (interactive
   (list (or (2C-other)
	     (read-buffer "Associate buffer: " (other-buffer)))))
  (let ((b1 (current-buffer))
	(b2 buffer))
    (setq 2C-mode nil)
    (with-current-buffer b2
      (and (2C-other)
	   (not (eq b1 (2C-other)))
	   (error "Buffer already associated with buffer `%s'"
		  (buffer-name (2C-other))))
      (setq b1 (and (assq '2C-window-width (buffer-local-variables))
		    2C-window-width)))
    ; if other buffer has a local width, adjust here too
    (if b1 (setq 2C-window-width (- (frame-width) b1)))
    (2C-two-columns b2)))