emacs - A smarter alternative to delete-window? -


sometimes multiple windows open same buffer (or similar one) , have differentiate whether or not buffer in window same before deciding either kill or delete window.

is there way in emacs delete window if buffer exists in another? ideally same function kill buffer , window if instance of buffer in window.

(defun delete-extra-windows ()   (interactive)   (let* ((selwin  (selected-window))          (buf     (window-buffer selwin)))     (walk-windows (lambda (ww)                     (unless (eq ww selwin)                       (when (eq (window-buffer ww) buf)                         (delete-window ww))))                   'no-mini 'this-frame))) 

Comments

Popular posts from this blog

Detect support for Shoutcast ICY MP3 without navigator.userAgent in Firefox? -

web - SVG not rendering properly in Firefox -

java - JavaFX 2 slider labelFormatter not being used -