[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] master b351b51 48/68: Clean up code
From: |
Oleh Krehel |
Subject: |
[elpa] master b351b51 48/68: Clean up code |
Date: |
Sat, 21 Mar 2015 19:07:04 +0000 |
branch: master
commit b351b51e7b485629f6cfbf9f1b4ec47ee0622e4a
Author: Oleh Krehel <address@hidden>
Commit: Oleh Krehel <address@hidden>
Clean up code
* ace-window.el (aw--done): Simplify.
(aw--doit): Simplify.
(aw-switch-to-window): Update.
(aw-delete-window): Update.
---
ace-window.el | 17 +++++------------
1 files changed, 5 insertions(+), 12 deletions(-)
diff --git a/ace-window.el b/ace-window.el
index 7a56ca5..fde7976 100644
--- a/ace-window.el
+++ b/ace-window.el
@@ -121,10 +121,8 @@ This hook is set to nil with each call to `ace-window'.")
(defun aw--done ()
"Clean up ace-jump overlays."
- (setq ace-jump-query-char nil)
+ ;; clean up mode line
(setq ace-jump-current-mode nil)
-
- ;; clean the status line
(setq ace-jump-mode nil)
(force-mode-line-update)
@@ -160,7 +158,6 @@ Amend MODE-LINE to the mode line for the duration of the
selection."
(cl-case (length visual-area-list)
(0)
(1
- ;; don't get stuck in an empty read-only buffer
(select-window (aj-visual-area-window (car visual-area-list))))
(2
(select-window
@@ -203,11 +200,10 @@ Amend MODE-LINE to the mode line for the duration of the
selection."
;; turn off helm transient map
(remove-hook 'post-command-hook 'helm--maybe-update-keymap)
(unwind-protect
- (let (char node)
+ (let (node)
(catch 'done
(while t
- (setq char (read-char))
- (setq node (cl-position char aw-keys))
+ (setq node (cl-position (read-char) aw-keys))
(when node
(setq node (nth node (cdr ace-jump-search-tree))))
(cond ((null node)
@@ -225,9 +221,6 @@ Amend MODE-LINE to the mode line for the duration of the
selection."
((eq (car node) 'leaf)
(let ((aj-data (overlay-get (cdr node) 'aj-data)))
- (ace-jump-done)
- (ace-jump-push-mark)
- (run-hooks 'ace-jump-mode-before-jump-hook)
(select-window (aj-position-window aj-data)))
(throw 'done t))
@@ -318,7 +311,7 @@ Windows are numbered top down, left to right."
(select-frame-set-input-focus frame))
(if (window-live-p window)
(select-window window)
- (error "Bad aj-data, aw-delete-window: %S" aj-data))))
+ (error "Got a dead window %S" window))))
(defun aw-delete-window (window)
"Delete window WINDOW."
@@ -330,7 +323,7 @@ Windows are numbered top down, left to right."
(delete-frame frame)
(if (window-live-p window)
(delete-window window)
- (error "Bad aj-data, aw-delete-window: %S" aj-data)))))
+ (error "Got a dead window %S" window)))))
(defun aw-swap-window (window)
"Swap buffers of current window and WINDOW."
- [elpa] master 8d40101 39/68: ace-window.el (ace-window-end-hook): add, (continued)
- [elpa] master 8d40101 39/68: ace-window.el (ace-window-end-hook): add, Oleh Krehel, 2015/03/21
- [elpa] master 752c2cc 37/68: README.md: update, Oleh Krehel, 2015/03/21
- [elpa] master b86d163 40/68: ace-window.el (ace-window-end-once-hook): Add, Oleh Krehel, 2015/03/21
- [elpa] master 6becad8 38/68: ace-window.el: bump version, Oleh Krehel, 2015/03/21
- [elpa] master bb9da9c 44/68: Update `aw--doit' signature, Oleh Krehel, 2015/03/21
- [elpa] master 352c33a 43/68: Finalize transition to `read-char', Oleh Krehel, 2015/03/21
- [elpa] master 32911db 42/68: Start transition to `read-char', Oleh Krehel, 2015/03/21
- [elpa] master 50fafc5 45/68: ace-window.el (aw--doit): don't show anything in echo area, Oleh Krehel, 2015/03/21
- [elpa] master 4291989 41/68: ace-window.el (ace-maximize-window): Add, Oleh Krehel, 2015/03/21
- [elpa] master 064c4fb 49/68: ace-window.el (aw-select): Rename from `aw--doit', Oleh Krehel, 2015/03/21
- [elpa] master b351b51 48/68: Clean up code,
Oleh Krehel <=
- [elpa] master 4570578 46/68: ace-window.el (aw--doit): simplify, Oleh Krehel, 2015/03/21
- [elpa] master df86665 51/68: ace-window.el (aw-ignored-buffers): add "*LV*", Oleh Krehel, 2015/03/21
- [elpa] master fa7cb4d 47/68: `aw--doit' simply returns a window now, Oleh Krehel, 2015/03/21
- [elpa] master e1ae6ba 50/68: Try not to end in `aw-ignored-p' when ace method isn't invoked, Oleh Krehel, 2015/03/21
- [elpa] master 47bd115 52/68: Allow customizing the leading char face, Oleh Krehel, 2015/03/21
- [elpa] master c897759 55/68: Update avy interface, Oleh Krehel, 2015/03/21
- [elpa] master 574b3bd 57/68: Add `aw-leading-char-style' extra-awesome custom var, Oleh Krehel, 2015/03/21
- [elpa] master 8b5f10a 53/68: Update outlines, Oleh Krehel, 2015/03/21
- [elpa] master d7cafcb 56/68: avy-jump.el: add example commands using avy, Oleh Krehel, 2015/03/21
- [elpa] master fcc64ab 59/68: avy-jump.el (avi--regex-candidates): Add optional bounds, Oleh Krehel, 2015/03/21