Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

latest fixes for next release 1.95

  • Loading branch information...
commit 7416008bede5312cfeced60d7d14db47233e42a6 1 parent 3f92d72
berndl authored
Showing with 65 additions and 29 deletions.
  1. +3 −2 NEWS
  2. +8 −25 ecb.el
  3. +51 −1 ecb.texi
  4. +3 −1 tree-buffer.el
View
5 NEWS
@@ -1,13 +1,14 @@
* Changes for ECB version 1.95
** ECB now displays the expand- and collapse symbols in the tree-buffers with
- icons - the same icons as speedbar uses. See the new option
+ image-icons - the same icons as speedbar uses. See the new option
`ecb-tree-use-image-icons'.
** Adding hideshow to the popup-menu of the Methods-buffer.
This popup-menu now offers two entries for hiding resp. showing the block
of that token in the Methods-buffer for which the popup-menu was openend.
This is done with the hideshow.el library.
+ Thanks to Christoff Pale <christoff_pale@yahoo.com> for suggestion.
** Horizontal scrolling of the tree-buffers by clicking the edges of the
modeline with mouse-1 or mouse-2. I.e. if you click with mouse-1 onto the
@@ -33,7 +34,7 @@
** Fixed bugs
*** Now the "goto-window-..." menu-entries in the "ECB"-menu are working correct
- if a speedbar is integrated.
+ if a speedbar is integrated into the layout.
*** Preventing etags-supported sources from being parsed (and saved) too often.
View
33 ecb.el
@@ -4974,7 +4974,7 @@ always the ECB-frame if called from another frame."
(if ecb-use-recursive-edit
(if ecb-minor-mode
(progn
- (message "ECB already activated. Drawing layout.")
+ (message "ECB already activated. Drawing layout.")
(ecb-redraw-layout))
(catch 'exit
@@ -5519,8 +5519,12 @@ function which is called with current node and has to return a string.")
(widen))
+;; Klaus Berndl <klaus.berndl@sdm.de>: This is for silencing the
+;; byte-compiler. Normally there shouls be no warning which silentcomp-defun
+;; for hs-minor-mode is used but....argghhh.
(if (not ecb-running-xemacs)
(require 'hideshow))
+
(defun ecb-methods-menu-activate-hs ()
"Activates `hs-minor-mode' in the buffer of `ecb-path-selected-source'. If
this fails then nil is returned otherwise t."
@@ -5535,32 +5539,13 @@ this fails then nil is returned otherwise t."
nil)
t)))
-(defvar ecb-methods-hs-show-xemacs-special-modes '(emacs-lisp-mode
- lisp-mode
- scheme-mode)
- "List of `major-modes' which contains all modes which need the following
-behavior for the XEmacs-version of `hs-show-block': To show a hidden block at
-toplevel point must stay at the first char of that block. Example: In
-`emacs-lisp-mode' point must stay onto the opening paren of a defun so the
-hidden block can be shown.")
-
-
(defun ecb-methods-menu-show-block (node)
(if (not (ecb-methods-menu-activate-hs))
(ecb-error "hs-minor-mode can not be activated!")
(ecb-method-clicked node 1 nil)
(save-excursion
- ;; The XEmacs-shipped version of hide-show seems not to hide the last line
- ;; of a block, therefore we have to go 1 line forward to be surely within
- ;; the block. TODO: Klaus Berndl <klaus.berndl@sdm.de>: This is somehow
- ;; clumsy and unsave....because if hideshow-implementation changes we have
- ;; to change this code too...but currently i know no better solution.
- (if (and ecb-running-xemacs
- (not (boundp 'hs-isearch-open))
- (not (boundp 'hs-hide-comments-when-hiding-all))
- (not (fboundp 'hs-already-hidden-p)))
- (unless (member major-mode ecb-methods-hs-show-xemacs-special-modes)
- (forward-line 1)))
+ (or (looking-at hs-block-start-regexp)
+ (re-search-forward hs-block-start-regexp nil t))
(hs-show-block))
;; Now we are at the beginning of the block or - with other word - on that
;; position `ecb-method-clicked' has set the point.
@@ -5571,9 +5556,7 @@ hidden block can be shown.")
(ecb-error "hs-minor-mode can not be activated!")
(ecb-method-clicked node 1 nil)
(or (looking-at hs-block-start-regexp)
- (search-forward hs-block-start-regexp nil t))
-;; (forward-line 1)
-;; (end-of-line)
+ (re-search-forward hs-block-start-regexp nil t))
(hs-hide-block)
(beginning-of-line)))
View
52 ecb.texi
@@ -243,6 +243,7 @@ Tips and tricks
* Working with JDEE:: Working best with ECB and JDEE
* Compile-window on demand:: Displaying the compile-window on demand
* Non-semantic sources:: Parsing and displaying non-semantic sources
+* Hide-show:: Using hide-show from the methods-buffer-menu
Entry points for elisp programmers
@@ -5993,6 +5994,7 @@ situations.
* Working with JDEE:: Working best with ECB and JDEE
* Compile-window on demand:: Displaying the compile-window on demand
* Non-semantic sources:: Parsing and displaying non-semantic sources
+* Hide-show:: Using hide-show from the methods-buffer-menu
@end menu
@node Changing faces, Small screens, Tips and tricks, Tips and tricks
@@ -6444,7 +6446,7 @@ errors) then you can throw away the compile-window just by
@code{ecb-toggle-compile-window} - ECB will reactivate it autom.
before next compilation!
-@node Non-semantic sources, , Compile-window on demand, Tips and tricks
+@node Non-semantic sources, Hide-show, Compile-window on demand, Tips and tricks
@section Parsing and displaying non-semantic sources
ECB is mostly designed to display parsing information for files
@@ -6576,6 +6578,42 @@ non-semantic-sources.
@code{ecb-non-semantic-methods-initial-expand} can be useful too.
+
+@node Hide-show, , Non-semantic sources, Tips and tricks
+@section Using hide-show from the methods-buffer-menu
+
+The popup-menu of the Methods-buffer offer two entries for either
+hiding or showing the block which is related to the selected token
+(that token for which the popup-menu was opened):
+
+@itemize @bullet
+@item ``Jump to token and hide block'':
+Jumps to the token and calls @code{hs-hide-block} from the
+hideshow-library which is shipped with (X)Emacs. After that the block
+is hidden, i.e. only the header-line of that token (method, variable
+etc.) is visible, the rest is hidden behind the ``...''.
+
+@item ``Jump to token and show block'':
+Jumps to the token and calls @code{hs-show-block}. This shows the related
+hidden block if the block was hidden via @code{hs-hide-block} or the
+menu-entry ``Jump to token and hide block'' (s.a.).
+@end itemize
+
+For this feature the library @file{hideshow.el} is used which should
+normally being included in the (X)Emacs-distribution. If this library
+is not loaded into Emacs, ECB does this automatically before the first
+call to one of these menu-entries.
+
+IMPORTANT: If in some @code{major-mode} hiding and showing does not
+work as you expect it to work then you must probably add an entry for
+this @code{major-mode} to the hideshow-variable
+@code{hs-special-modes-alist}. See the documentation of this variable
+for further details. One example of such a @code{major-mode} is
+@code{jde-mode} of the Java Development Environment JDEE; just add an
+entry for it like the already contained entries for @code{c++-mode} or
+@code{java-mode} and hiding and showing will work for you with JDEE
+too.
+
@node Elisp programming, Conflicts and bugs, Tips and tricks, Top
@chapter Entry points for elisp programmers
@@ -8019,6 +8057,18 @@ You can change it with the options @code{ecb-mode-line-prefixes} and
How can i change the keybindings of ECB?
@tab @tab
You can do this with option @code{ecb-key-map} (@pxref{ecb-general}).
+
+@item @tab @tab
+
+@item
+What can i do if hiding/showing from the methods-buffer does not work?
+@tab @tab
+Either the current @code{major-modes} is not supported by hideshow or
+you have to add an entry to @code{hs-special-modes-alist}
+@ifinfo
+@*
+@end ifinfo
+(@pxref{Hide-show}).
@end multitable
View
4 tree-buffer.el
@@ -1159,7 +1159,9 @@ EXPAND-COLLAPSE: A 2-elem list where the first elem is a cons cell where the
car is the token-string for the expand-symbol \(e.g.
\"\[+]\") and the cdr is a speedbar-image-icon. The second
elem is the same for the collapse symbol. Both elems can be
- nil; then no expand- or collapse-symbol is drawn.
+ nil; then no expand- or collapse-symbol is drawn. If only the
+ cdr of an elem is nil then no image-icon is used but always
+ the token-string.
TYPE-FACER: Nil or a list of one or two conses, each cons for a node-type \(0
or 1). The cdr of a cons can be:
- a symbol of a face
Please sign in to comment.
Something went wrong with that request. Please try again.