Skip to content

ace-window 0.6.0

Compare
Choose a tag to compare
@abo-abo abo-abo released this 26 Dec 09:48
· 172 commits to master since this release

Library

After this release, ace-window can be used a library.

If your code needs to select a window from the current Emacs instance, and you'd like to
do it with the same method that ace-window does it, it has become very simple to
implement. For example, here's the implementation of ace-delete-window:

(require 'ace-window)
;;;###autoload
(defun ace-delete-window ()
  "Ace delete window."
  (interactive)
  (setq aw--current-op 'aw-delete-window)
  (aw--doit " Ace - Delete Window"))

(defun aw-delete-window (aj-data)
  "Delete window of `aj-position' structure AJ-DATA."
  (let ((frame (aj-position-frame aj-data))
        (window (aj-position-window aj-data)))
    (when (and (frame-live-p frame)
               (not (eq frame (selected-frame))))
      (select-frame-set-input-focus (window-frame window)))
    (if (= 1 (length (window-list)))
        (delete-frame frame)
      (if (window-live-p window)
          (delete-window window)
        (error "Bad aj-data, aw-delete-window: %S" aj-data)))))

Fixes/Improvements since 0.5.0

  • ace-delete-window can now close frames.
  • ace-swap-window now works properly when you have, for instance, two
    frames with one window each.
  • aw-list-visual-area now works in a non-silly way to detect the
    invisible Emacs frame. Thanks, @oantolin.
  • aw-offset now works properly with comint buffers.