Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

makes ecb-canonical-ecb-windows-list much saver

  • Loading branch information...
commit a2758f8c8b0d1d0c6a7a0e5640d2efcd66d82280 1 parent f376380
berndl authored
Showing with 40 additions and 7 deletions.
  1. +6 −0 ecb-file-browser.el
  2. +3 −1 ecb-help.el
  3. +31 −6 ecb-layout.el
View
6 ecb-file-browser.el
@@ -2449,6 +2449,12 @@ Returns t if the current history filter has been applied otherwise nil."
(ecb-buffer-file-name buf)))
(base-buf (buffer-base-buffer buf)))
(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)
(not (member (buffer-name buf)
ignore-buffername-list))
View
4 ecb-help.el
@@ -251,8 +251,9 @@ this."
;;prepare the basic buffer
(reporter-submit-bug-report
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
+ cedet-version
semantic-version
eieio-version
speedbar-version
@@ -442,6 +443,7 @@ could be interesting for support."
ecb-toggle-layout-state
ecb-tree-buffer-creators
ecb-tree-buffers
+ ecb-buffer-setfunction-registration
ecb-current-maximized-ecb-buffer-name
ecb-special-ecb-buffers-of-current-layout)
(function (lambda (l r)
View
37 ecb-layout.el
@@ -958,14 +958,22 @@ Per default this is only enabled for `switch-to-buffer'."
:value switch-to-buffer)))
(defun ecb-canonical-ecb-windows-list (&optional winlist)
- "Return a list of all current visible special dedicated ECB-windows
-\(starting from the left-most top-most window) in the order `other-window'
+ "Return a list of all visible ECB-windows.
+
+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."
- (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)
- (if (and (not (member elem
- ecb-layout-temporary-dedicated-windows))
- (window-dedicated-p elem))
+ (if (and (not (memq elem
+ ecb-layout-temporary-dedicated-windows))
+ (window-dedicated-p elem)
+ (memq (window-buffer elem) registered-ecb-buffers)
+ )
elem)))
windows-list))))
@@ -3186,6 +3194,23 @@ NTH-WINDOW is nil then it is treated as 1."
point-loc
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
"The ECB-version of `other-window'. Works exactly like the original function
with the following ECB-adjustment: The behavior depends on
Please sign in to comment.
Something went wrong with that request. Please try again.