Skip to content

Commit

Permalink
makes ecb-canonical-ecb-windows-list much saver
Browse files Browse the repository at this point in the history
  • Loading branch information
berndl committed May 9, 2009
1 parent f376380 commit a2758f8
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 7 deletions.
6 changes: 6 additions & 0 deletions ecb-file-browser.el
Expand Up @@ -2449,6 +2449,12 @@ Returns t if the current history filter has been applied otherwise nil."
(ecb-buffer-file-name buf))) (ecb-buffer-file-name buf)))
(base-buf (buffer-base-buffer buf))) (base-buf (buffer-base-buffer buf)))
(if (and file-name (if (and file-name
;; needed for revision-files temporally
;; checked out (e.g. by ediff-revision)
;; these not longer existing files
;; would pollute the history - we do not
;; want entries which could not loaded
;; into a buffer
(ecb-buffer-or-file-readable-p file-name) (ecb-buffer-or-file-readable-p file-name)
(not (member (buffer-name buf) (not (member (buffer-name buf)
ignore-buffername-list)) ignore-buffername-list))
Expand Down
4 changes: 3 additions & 1 deletion ecb-help.el
Expand Up @@ -251,8 +251,9 @@ this."
;;prepare the basic buffer ;;prepare the basic buffer
(reporter-submit-bug-report (reporter-submit-bug-report
ecb-problem-report-mail-address ecb-problem-report-mail-address
(format "ECB: %s, semantic: %s, eieio: %s, speedbar: %s, JDEE: %s" (format "ECB: %s, CEDET: %s, semantic: %s, eieio: %s, speedbar: %s, JDEE: %s"
ecb-version ecb-version
cedet-version
semantic-version semantic-version
eieio-version eieio-version
speedbar-version speedbar-version
Expand Down Expand Up @@ -442,6 +443,7 @@ could be interesting for support."
ecb-toggle-layout-state ecb-toggle-layout-state
ecb-tree-buffer-creators ecb-tree-buffer-creators
ecb-tree-buffers ecb-tree-buffers
ecb-buffer-setfunction-registration
ecb-current-maximized-ecb-buffer-name ecb-current-maximized-ecb-buffer-name
ecb-special-ecb-buffers-of-current-layout) ecb-special-ecb-buffers-of-current-layout)
(function (lambda (l r) (function (lambda (l r)
Expand Down
37 changes: 31 additions & 6 deletions ecb-layout.el
Expand Up @@ -958,14 +958,22 @@ Per default this is only enabled for `switch-to-buffer'."
:value switch-to-buffer))) :value switch-to-buffer)))


(defun ecb-canonical-ecb-windows-list (&optional winlist) (defun ecb-canonical-ecb-windows-list (&optional winlist)
"Return a list of all current visible special dedicated ECB-windows "Return a list of all visible ECB-windows.
\(starting from the left-most top-most window) in the order `other-window'
Such a window must be dedicated to its ecb-buffer and for the related buffer
a dedicator-function must be defined with `defecb-window-dedicator' so this
dedicator is registered for that ecb-buffer.
The list starts from the left-most top-most window in the order `other-window'
would walk through these windows." would walk through these windows."
(let ((windows-list (or winlist (ecb-canonical-windows-list)))) (let ((windows-list (or winlist (ecb-canonical-windows-list)))
(registered-ecb-buffers (ecb-dedicated-special-buffers))
)
(delete nil (mapcar (function (lambda (elem) (delete nil (mapcar (function (lambda (elem)
(if (and (not (member elem (if (and (not (memq elem
ecb-layout-temporary-dedicated-windows)) ecb-layout-temporary-dedicated-windows))
(window-dedicated-p elem)) (window-dedicated-p elem)
(memq (window-buffer elem) registered-ecb-buffers)
)
elem))) elem)))
windows-list)))) windows-list))))


Expand Down Expand Up @@ -3186,6 +3194,23 @@ NTH-WINDOW is nil then it is treated as 1."
point-loc point-loc
nth-window))))))) nth-window)))))))


;; (defecb-advice other-window around ecb-layout-basic-adviced-functions
;; "The ECB-version of `other-window'. Works exactly like the original function
;; with the following ECB-adjustment: The behavior depends on
;; `ecb-other-window-behavior'."
;; (if (or (not ecb-minor-mode)
;; (not (equal (selected-frame) ecb-frame)))
;; (ecb-with-original-basic-functions
;; ad-do-it)
;; (let* ((count (if (ad-get-arg 0)
;; (ad-get-arg 0)
;; 1))
;; (o-w (let ((ecb-other-window-behavior (if (interactive-p)
;; ecb-other-window-behavior
;; 'only-edit)))
;; (ecb-get-other-window count))))
;; (select-window o-w))))

(defecb-advice other-window around ecb-layout-basic-adviced-functions (defecb-advice other-window around ecb-layout-basic-adviced-functions
"The ECB-version of `other-window'. Works exactly like the original function "The ECB-version of `other-window'. Works exactly like the original function
with the following ECB-adjustment: The behavior depends on with the following ECB-adjustment: The behavior depends on
Expand Down

0 comments on commit a2758f8

Please sign in to comment.