]> code.delx.au - gnu-emacs/blobdiff - lisp/progmodes/ebrowse.el
Merge from emacs--rel--22
[gnu-emacs] / lisp / progmodes / ebrowse.el
index 5669b25a3d4f7630346a9c6820323ab5fc0171d4..58a25ab5b88c3585239a5d6a7b9a3f40ea8aac22 100644 (file)
@@ -1,6 +1,8 @@
 ;;; ebrowse.el --- Emacs C++ class browser & tags facility
 
 ;;; ebrowse.el --- Emacs C++ class browser & tags facility
 
-;; Copyright (C) 1992-1999, 2000 Free Software Foundation Inc.
+;; Copyright (C) 1992, 1993, 1994, 1995, 1996, 1997, 1998, 1999, 2000, 2001,
+;; 2002, 2003, 2004, 2005, 2006, 2007
+;; Free Software Foundation Inc.
 
 ;; Author: Gerd Moellmann <gerd@gnu.org>
 ;; Maintainer: FSF
 
 ;; Author: Gerd Moellmann <gerd@gnu.org>
 ;; Maintainer: FSF
@@ -10,7 +12,7 @@
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
 
 ;; GNU Emacs is free software; you can redistribute it and/or modify
 ;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
+;; the Free Software Foundation; either version 3, or (at your option)
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
 ;; any later version.
 
 ;; GNU Emacs is distributed in the hope that it will be useful,
@@ -20,7 +22,8 @@
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
 
 ;; You should have received a copy of the GNU General Public License
 ;; along with GNU Emacs; see the file COPYING.  If not, write to
-;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
+;; the Free Software Foundation, 51 Franklin Street, Fifth Floor,
+;; Boston, MA 02110-1301, USA.
 
 ;;; Commentary:
 
 
 ;;; Commentary:
 
@@ -30,7 +33,7 @@
 ;; - A complete set of tags-like functions working on class trees
 ;; - An electric buffer list showing class browser buffers only
 
 ;; - A complete set of tags-like functions working on class trees
 ;; - An electric buffer list showing class browser buffers only
 
-;; Documentation is found in a separate Info file. 
+;; Documentation is found in a separate Info file.
 
 ;;; Code:
 
 
 ;;; Code:
 
@@ -53,7 +56,7 @@
 (defcustom ebrowse-search-path nil
   "*List of directories to search for source files in a class tree.
 Elements should be directory names; nil as an element means to try
 (defcustom ebrowse-search-path nil
   "*List of directories to search for source files in a class tree.
 Elements should be directory names; nil as an element means to try
-to find source files relative to the location of the EBROWSE file loaded."
+to find source files relative to the location of the BROWSE file loaded."
   :group 'ebrowse
   :type '(repeat (choice (const :tag "Default" nil)
                          (string :tag "Directory"))))
   :group 'ebrowse
   :type '(repeat (choice (const :tag "Default" nil)
                          (string :tag "Directory"))))
@@ -156,46 +159,64 @@ This space is used to display markers."
   :group 'ebrowse)
 
 
   :group 'ebrowse)
 
 
-(defface ebrowse-tree-mark-face
-  '((t (:foreground "red")))
+(defface ebrowse-tree-mark
+  '((((min-colors 88)) (:foreground "red1"))
+    (t (:foreground "red")))
   "*The face used for the mark character in the tree."
   :group 'ebrowse-faces)
   "*The face used for the mark character in the tree."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-tree-mark-face 'face-alias 'ebrowse-tree-mark)
 
 
 
 
-(defface ebrowse-root-class-face
-  '((t (:weight bold :foreground "blue")))
+(defface ebrowse-root-class
+  '((((min-colors 88)) (:weight bold :foreground "blue1"))
+    (t (:weight bold :foreground "blue")))
   "*The face used for root classes in the tree."
   :group 'ebrowse-faces)
   "*The face used for root classes in the tree."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-root-class-face 'face-alias 'ebrowse-root-class)
 
 
 
 
-(defface ebrowse-file-name-face
+(defface ebrowse-file-name
   '((t (:italic t)))
   "*The face for filenames displayed in the tree."
   :group 'ebrowse-faces)
   '((t (:italic t)))
   "*The face for filenames displayed in the tree."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-file-name-face 'face-alias 'ebrowse-file-name)
 
 
 
 
-(defface ebrowse-default-face
+(defface ebrowse-default
   '((t nil))
   "*Face for everything else in the tree not having other faces."
   :group 'ebrowse-faces)
   '((t nil))
   "*Face for everything else in the tree not having other faces."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-default-face 'face-alias 'ebrowse-default)
 
 
 
 
-(defface ebrowse-member-attribute-face
-  '((t (:foreground "red")))
+(defface ebrowse-member-attribute
+  '((((min-colors 88)) (:foreground "red1"))
+    (t (:foreground "red")))
   "*Face used to display member attributes."
   :group 'ebrowse-faces)
   "*Face used to display member attributes."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-member-attribute-face 'face-alias 'ebrowse-member-attribute)
 
 
 
 
-(defface ebrowse-member-class-face
+(defface ebrowse-member-class
   '((t (:foreground "purple")))
   "*Face used to display the class title in member buffers."
   :group 'ebrowse-faces)
   '((t (:foreground "purple")))
   "*Face used to display the class title in member buffers."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-member-class-face 'face-alias 'ebrowse-member-class)
 
 
 
 
-(defface ebrowse-progress-face
-  '((t (:background "blue")))
+(defface ebrowse-progress
+  '((((min-colors 88)) (:background "blue1"))
+    (t (:background "blue")))
   "*Face for progress indicator."
   :group 'ebrowse-faces)
   "*Face for progress indicator."
   :group 'ebrowse-faces)
+;; backward-compatibility alias
+(put 'ebrowse-progress-face 'face-alias 'ebrowse-progress)
 
 
 \f
 
 
 \f
@@ -254,15 +275,10 @@ This is a destructive operation."
     result))
 
 
     result))
 
 
-(defun ebrowse-copy-list (list)
-  "Return a shallow copy of LIST."
-  (apply #'list list))
-
-
 (defmacro ebrowse-output (&rest body)
   "Eval BODY with a writable current buffer.
 Preserve buffer's modified state."
 (defmacro ebrowse-output (&rest body)
   "Eval BODY with a writable current buffer.
 Preserve buffer's modified state."
-  (let ((modified (gensym "--ebrowse-output--")))
+  (let ((modified (make-symbol "--ebrowse-output--")))
     `(let (buffer-read-only (,modified (buffer-modified-p)))
        (unwind-protect
           (progn ,@body)
     `(let (buffer-read-only (,modified (buffer-modified-p)))
        (unwind-protect
           (progn ,@body)
@@ -364,12 +380,12 @@ otherwise use the current frame's width."
 ;;; Structure definitions
 
 (defstruct (ebrowse-hs (:type vector) :named)
 ;;; Structure definitions
 
 (defstruct (ebrowse-hs (:type vector) :named)
-  "Header structure found at the head of EBROWSE files."
+  "Header structure found at the head of BROWSE files."
   ;; A version string that is compared against the version number of
   ;; the Lisp package when the file is loaded.  This is done to
   ;; detect file format changes.
   version
   ;; A version string that is compared against the version number of
   ;; the Lisp package when the file is loaded.  This is done to
   ;; detect file format changes.
   version
-  ;; Command line options used for producing the EBROWSE file.
+  ;; Command line options used for producing the BROWSE file.
   command-line-options
   ;; The following slot is currently not used.  It's kept to keep
   ;; the file format compatible.
   command-line-options
   ;; The following slot is currently not used.  It's kept to keep
   ;; the file format compatible.
@@ -379,10 +395,10 @@ otherwise use the current frame's width."
   ;; they are defined.
   member-table)
 
   ;; they are defined.
   member-table)
 
-    
+
 (defstruct (ebrowse-ts (:type vector) :named)
   "Tree structure.
 (defstruct (ebrowse-ts (:type vector) :named)
   "Tree structure.
-Following the header structure, an EBROWSE file contains a number
+Following the header structure, a BROWSE file contains a number
 of `ebrowse-ts' structures, each one describing one root class of
 the class hierarchy with all its subclasses."
   ;; A `ebrowse-cs' structure describing the root class.
 of `ebrowse-ts' structures, each one describing one root class of
 the class hierarchy with all its subclasses."
   ;; A `ebrowse-cs' structure describing the root class.
@@ -508,7 +524,7 @@ members."
 
 
 (defconst ebrowse-version-string "ebrowse 5.0"
 
 
 (defconst ebrowse-version-string "ebrowse 5.0"
-  "Version string expected in EBROWSE files.")
+  "Version string expected in BROWSE files.")
 
 
 (defconst ebrowse-globals-name "*Globals*"
 
 
 (defconst ebrowse-globals-name "*Globals*"
@@ -518,8 +534,7 @@ This must be the same that `ebrowse' uses.")
 
 (defvar ebrowse--last-regexp nil
   "Last regular expression searched for in tree and member buffers.
 
 (defvar ebrowse--last-regexp nil
   "Last regular expression searched for in tree and member buffers.
-Automatically buffer-local so that each tree and member buffer
-maintains its own search history.")
+Each tree and member buffer maintains its own search history.")
 (make-variable-buffer-local 'ebrowse--last-regexp)
 
 
 (make-variable-buffer-local 'ebrowse--last-regexp)
 
 
@@ -544,7 +559,7 @@ Buffer-local in Ebrowse buffers.")
 
 
 (defvar ebrowse--tags-file-name nil
 
 
 (defvar ebrowse--tags-file-name nil
-  "File from which EBROWSE file was loaded.
+  "File from which BROWSE file was loaded.
 Buffer-local in Ebrowse buffers.")
 
 
 Buffer-local in Ebrowse buffers.")
 
 
@@ -556,7 +571,7 @@ Buffer-local in Ebrowse buffers.")
 (defvar ebrowse--frozen-flag nil
   "Non-nil means an Ebrowse buffer won't be reused.
 Buffer-local in Ebrowse buffers.")
 (defvar ebrowse--frozen-flag nil
   "Non-nil means an Ebrowse buffer won't be reused.
 Buffer-local in Ebrowse buffers.")
-  
+
 
 (defvar ebrowse--show-file-names-flag nil
   "Non-nil means show file names in a tree buffer.
 
 (defvar ebrowse--show-file-names-flag nil
   "Non-nil means show file names in a tree buffer.
@@ -577,7 +592,7 @@ Buffer-local in Ebrowse member buffers.")
   "Width of a columns to display for short member display form.
 Buffer-local in Ebrowse member buffers.")
 
   "Width of a columns to display for short member display form.
 Buffer-local in Ebrowse member buffers.")
 
-  
+
 (defvar ebrowse--virtual-display-flag nil
   "Non-nil means display virtual members in a member buffer.
 Buffer-local in Ebrowse member buffers.")
 (defvar ebrowse--virtual-display-flag nil
   "Non-nil means display virtual members in a member buffer.
 Buffer-local in Ebrowse member buffers.")
@@ -785,23 +800,23 @@ The class tree is found in the buffer-local variable `ebrowse--tree-obarray'."
 
 (defun ebrowse-class-in-tree (class tree)
   "Search for a class with name CLASS in TREE.
 
 (defun ebrowse-class-in-tree (class tree)
   "Search for a class with name CLASS in TREE.
-Return the class found, if any.  This function is used during the load
-phase where classes appended to a file replace older class
-information."
+If CLASS is found, return the tail of TREE starting at CLASS.  This function
+is used during the load phase where classes appended to a file replace older
+class information."
   (let ((tclass (ebrowse-ts-class class))
        found)
     (while (and tree (not found))
   (let ((tclass (ebrowse-ts-class class))
        found)
     (while (and tree (not found))
-      (let ((root (car tree)))
-       (when (string= (ebrowse-qualified-class-name (ebrowse-ts-class root))
+      (let ((root-ptr tree))
+       (when (string= (ebrowse-qualified-class-name (ebrowse-ts-class (car root-ptr)))
                       (ebrowse-qualified-class-name tclass))
                       (ebrowse-qualified-class-name tclass))
-         (setq found root))
+         (setq found root-ptr))
        (setq tree (cdr tree))))
     found))
 
 
 (defun ebrowse-base-classes (tree)
   "Return list of base-classes of TREE by searching subclass lists.
        (setq tree (cdr tree))))
     found))
 
 
 (defun ebrowse-base-classes (tree)
   "Return list of base-classes of TREE by searching subclass lists.
-This function must be used instead of the struct slot 
+This function must be used instead of the struct slot
 `base-classes' to access the base-class list directly because it
 computes this information lazily."
   (or (ebrowse-ts-base-classes tree)
 `base-classes' to access the base-class list directly because it
 computes this information lazily."
   (or (ebrowse-ts-base-classes tree)
@@ -884,13 +899,13 @@ this is the first progress message displayed."
     (message (concat title ": "
                     (propertize (make-string ebrowse-n-boxes
                                              (if (display-color-p) ?\  ?+))
     (message (concat title ": "
                     (propertize (make-string ebrowse-n-boxes
                                              (if (display-color-p) ?\  ?+))
-                                'face 'ebrowse-progress-face)))))
+                                'face 'ebrowse-progress)))))
 
 \f
 ;;; Reading a tree from disk
 
 (defun ebrowse-read ()
 
 \f
 ;;; Reading a tree from disk
 
 (defun ebrowse-read ()
-  "Read `ebrowse-hs' and `ebrowse-ts' structures in the current buffer.  
+  "Read `ebrowse-hs' and `ebrowse-ts' structures in the current buffer.
 Return a list (HEADER TREE) where HEADER is the file header read
 and TREE is a list of `ebrowse-ts' structures forming the class tree."
   (let ((header (condition-case nil
 Return a list (HEADER TREE) where HEADER is the file header read
 and TREE is a list of `ebrowse-ts' structures forming the class tree."
   (let ((header (condition-case nil
@@ -908,10 +923,10 @@ and TREE is a list of `ebrowse-ts' structures forming the class tree."
     (let ((gc-cons-threshold 2000000))
       (while (not (progn (skip-chars-forward " \t\n\r") (eobp)))
        (let* ((root (read (current-buffer)))
     (let ((gc-cons-threshold 2000000))
       (while (not (progn (skip-chars-forward " \t\n\r") (eobp)))
        (let* ((root (read (current-buffer)))
-              (old-root (ebrowse-class-in-tree root tree)))
+              (old-root-ptr (ebrowse-class-in-tree root tree)))
          (ebrowse-show-progress "Reading data" (null tree))
          (ebrowse-show-progress "Reading data" (null tree))
-         (if old-root
-             (setf (car old-root) root)
+         (if old-root-ptr
+             (setcar old-root-ptr root)
            (push root tree)))))
     (garbage-collect)
     (list header tree)))
            (push root tree)))))
     (garbage-collect)
     (list header tree)))
@@ -925,11 +940,12 @@ NOCONFIRM."
     (loop for member-buffer in (ebrowse-same-tree-member-buffer-list)
          do (kill-buffer member-buffer))
     (erase-buffer)
     (loop for member-buffer in (ebrowse-same-tree-member-buffer-list)
          do (kill-buffer member-buffer))
     (erase-buffer)
-    (insert-file (or buffer-file-name ebrowse--tags-file-name))
+    (with-no-warnings
+      (insert-file (or buffer-file-name ebrowse--tags-file-name)))
     (ebrowse-tree-mode)
     (current-buffer)))
 
     (ebrowse-tree-mode)
     (current-buffer)))
 
-    
+
 (defun ebrowse-create-tree-buffer (tree tags-file header obarray pop)
   "Create a new tree buffer for tree TREE.
 The tree was loaded from file TAGS-FILE.
 (defun ebrowse-create-tree-buffer (tree tags-file header obarray pop)
   "Create a new tree buffer for tree TREE.
 The tree was loaded from file TAGS-FILE.
@@ -987,7 +1003,7 @@ type `ebrowse-hs' is set to the resulting obarray."
 
 
 (defun ebrowse-member-table (header)
 
 
 (defun ebrowse-member-table (header)
-  "Return the member obarray.  Build it it hasn't been set up yet.
+  "Return the member obarray.  Build it if it hasn't been set up yet.
 HEADER is the tree header structure of the class tree."
   (when (null (ebrowse-hs-member-table header))
     (loop for buffer in (ebrowse-browser-buffer-list)
 HEADER is the tree header structure of the class tree."
   (when (null (ebrowse-hs-member-table header))
     (loop for buffer in (ebrowse-browser-buffer-list)
@@ -1061,11 +1077,11 @@ if for some reason a circle is in the inheritance graph."
     (setf ebrowse-tree-mode-map map)
     (suppress-keymap map)
 
     (setf ebrowse-tree-mode-map map)
     (suppress-keymap map)
 
-    (when window-system
+    (when (display-mouse-p)
       (define-key map [down-mouse-3] 'ebrowse-mouse-3-in-tree-buffer)
       (define-key map [mouse-2] 'ebrowse-mouse-2-in-tree-buffer)
       (define-key map [down-mouse-1] 'ebrowse-mouse-1-in-tree-buffer))
       (define-key map [down-mouse-3] 'ebrowse-mouse-3-in-tree-buffer)
       (define-key map [mouse-2] 'ebrowse-mouse-2-in-tree-buffer)
       (define-key map [down-mouse-1] 'ebrowse-mouse-1-in-tree-buffer))
-  
+
     (let ((map1 (make-sparse-keymap)))
       (suppress-keymap map1 t)
       (define-key map "L" map1)
     (let ((map1 (make-sparse-keymap)))
       (suppress-keymap map1 t)
       (define-key map "L" map1)
@@ -1120,10 +1136,10 @@ Tree mode key bindings:
   (interactive)
   (let* ((ident (propertized-buffer-identification "C++ Tree"))
         header tree buffer-read-only)
   (interactive)
   (let* ((ident (propertized-buffer-identification "C++ Tree"))
         header tree buffer-read-only)
-    
+
     (kill-all-local-variables)
     (use-local-map ebrowse-tree-mode-map)
     (kill-all-local-variables)
     (use-local-map ebrowse-tree-mode-map)
-    
+
     (unless (zerop (buffer-size))
       (goto-char (point-min))
       (multiple-value-setq (header tree) (ebrowse-read))
     (unless (zerop (buffer-size))
       (goto-char (point-min))
       (multiple-value-setq (header tree) (ebrowse-read))
@@ -1131,7 +1147,7 @@ Tree mode key bindings:
       (setq tree (ebrowse-sort-tree-list tree))
       (erase-buffer)
       (message nil))
       (setq tree (ebrowse-sort-tree-list tree))
       (erase-buffer)
       (message nil))
-    
+
     (mapcar 'make-local-variable
            '(ebrowse--tags-file-name
              ebrowse--indentation
     (mapcar 'make-local-variable
            '(ebrowse--tags-file-name
              ebrowse--indentation
@@ -1141,7 +1157,7 @@ Tree mode key bindings:
              ebrowse--frozen-flag
              ebrowse--tree-obarray
              revert-buffer-function))
              ebrowse--frozen-flag
              ebrowse--tree-obarray
              revert-buffer-function))
-    
+
     (setf ebrowse--show-file-names-flag nil
          ebrowse--tree-obarray (make-vector 127 0)
          ebrowse--frozen-flag nil
     (setf ebrowse--show-file-names-flag nil
          ebrowse--tree-obarray (make-vector 127 0)
          ebrowse--frozen-flag nil
@@ -1163,8 +1179,8 @@ Tree mode key bindings:
     (when tree
       (ebrowse-redraw-tree)
       (set-buffer-modified-p nil))
     (when tree
       (ebrowse-redraw-tree)
       (set-buffer-modified-p nil))
-    (run-hooks 'ebrowse-tree-mode-hook)))
-    
+    (run-mode-hooks 'ebrowse-tree-mode-hook)))
+
 
 
 (defun ebrowse-update-tree-buffer-mode-line ()
 
 
 (defun ebrowse-update-tree-buffer-mode-line ()
@@ -1227,7 +1243,7 @@ If given a numeric N-TIMES argument, mark that many classes."
     (condition-case error
        (loop repeat (or n-times 1)
              as tree = (ebrowse-tree-at-point)
     (condition-case error
        (loop repeat (or n-times 1)
              as tree = (ebrowse-tree-at-point)
-             do (progn 
+             do (progn
                   (setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree)))
                   (forward-line 1)
                   (push tree to-change)))
                   (setf (ebrowse-ts-mark tree) (not (ebrowse-ts-mark tree)))
                   (forward-line 1)
                   (push tree to-change)))
@@ -1300,7 +1316,6 @@ With PREFIX, insert that many filenames."
        (let ((tree (ebrowse-tree-at-point))
              start
              file-name-existing)
        (let ((tree (ebrowse-tree-at-point))
              start
              file-name-existing)
-         (unless tree return)
          (beginning-of-line)
          (skip-chars-forward " \t*a-zA-Z0-9_")
          (setq start (point)
          (beginning-of-line)
          (skip-chars-forward " \t*a-zA-Z0-9_")
          (setq start (point)
@@ -1312,7 +1327,7 @@ With PREFIX, insert that many filenames."
                             (ebrowse-ts-class tree))
                            "unknown")
                    ")"))
                             (ebrowse-ts-class tree))
                            "unknown")
                    ")"))
-         (ebrowse-set-face start (point) 'ebrowse-file-name-face)
+         (ebrowse-set-face start (point) 'ebrowse-file-name)
          (beginning-of-line)
          (forward-line 1))))))
 
          (beginning-of-line)
          (forward-line 1))))))
 
@@ -1431,11 +1446,11 @@ If no member buffer exists, make one."
   "Pop to a browser buffer from any other buffer.
 Pop to member buffer if no prefix ARG, to tree buffer otherwise."
   (interactive "P")
   "Pop to a browser buffer from any other buffer.
 Pop to member buffer if no prefix ARG, to tree buffer otherwise."
   (interactive "P")
-  (let ((buffer (get-buffer (if arg 
+  (let ((buffer (get-buffer (if arg
                                ebrowse-tree-buffer-name
                              ebrowse-member-buffer-name))))
     (unless buffer
                                ebrowse-tree-buffer-name
                              ebrowse-member-buffer-name))))
     (unless buffer
-      (setq buffer 
+      (setq buffer
            (get-buffer (if arg
                            ebrowse-member-buffer-name
                          ebrowse-tree-buffer-name))))
            (get-buffer (if arg
                            ebrowse-member-buffer-name
                          ebrowse-tree-buffer-name))))
@@ -1450,10 +1465,10 @@ Pop to member buffer if no prefix ARG, to tree buffer otherwise."
 (defun ebrowse-set-tree-indentation ()
   "Set the indentation width of the tree display."
   (interactive)
 (defun ebrowse-set-tree-indentation ()
   "Set the indentation width of the tree display."
   (interactive)
-  (let ((width (string-to-int (read-from-minibuffer
-                              (concat "Indentation ("
-                                      (int-to-string ebrowse--indentation)
-                                      "): ")))))
+  (let ((width (string-to-number (read-from-minibuffer
+                                  (concat "Indentation ("
+                                          (int-to-string ebrowse--indentation)
+                                          "): ")))))
     (when (plusp width)
       (setf ebrowse--indentation width)
       (ebrowse-redraw-tree))))
     (when (plusp width)
       (setf ebrowse--indentation width)
       (ebrowse-redraw-tree))))
@@ -1541,7 +1556,7 @@ VIEW non-nil means view it.  WHERE is additional position info."
                         :file (ebrowse-cs-file class)
                         :point (ebrowse-cs-point class))))
     (ebrowse-view/find-file-and-search-pattern
                         :file (ebrowse-cs-file class)
                         :point (ebrowse-cs-point class))))
     (ebrowse-view/find-file-and-search-pattern
-     browse-struct 
+     browse-struct
      (list ebrowse--header class nil)
      file
      ebrowse--tags-file-name
      (list ebrowse--header class nil)
      file
      ebrowse--tags-file-name
@@ -1643,7 +1658,7 @@ The new frame is deleted when it is no longer used."
     (make-local-variable 'ebrowse--frame-configuration)
     (setq ebrowse--frame-configuration old-frame-configuration)
     (make-local-variable 'ebrowse--view-exit-action)
     (make-local-variable 'ebrowse--frame-configuration)
     (setq ebrowse--frame-configuration old-frame-configuration)
     (make-local-variable 'ebrowse--view-exit-action)
-    (setq ebrowse--view-exit-action 
+    (setq ebrowse--view-exit-action
          (and (not had-a-buf)
               (not (buffer-modified-p buf-to-view))
               'kill-buffer))
          (and (not had-a-buf)
               (not (buffer-modified-p buf-to-view))
               'kill-buffer))
@@ -1658,12 +1673,12 @@ describing what to search.
 INFO is a list (HEADER MEMBER-OR-CLASS ACCESSOR).  HEADER is the
 header structure of a class tree.  MEMBER-OR-CLASS is either an
 `ebrowse-ms' or `ebrowse-cs' structure depending on what is searched.
 INFO is a list (HEADER MEMBER-OR-CLASS ACCESSOR).  HEADER is the
 header structure of a class tree.  MEMBER-OR-CLASS is either an
 `ebrowse-ms' or `ebrowse-cs' structure depending on what is searched.
-ACCESSOR is an accessor function for the member list of an member
+ACCESSOR is an accessor function for the member list of a member
 if MEMBER-OR-CLASS is an `ebrowse-ms'.
 FILE is the file to search the member in.
 FILE is not taken out of STRUC here because the filename in STRUC
 may be nil in which case the filename of the class description is used.
 if MEMBER-OR-CLASS is an `ebrowse-ms'.
 FILE is the file to search the member in.
 FILE is not taken out of STRUC here because the filename in STRUC
 may be nil in which case the filename of the class description is used.
-TAGS-FILE-NAME is the name of the EBROWSE file from which the
+TAGS-FILE-NAME is the name of the BROWSE file from which the
 tree was loaded.
 If VIEW is non-nil, view file else find the file.
 WHERE is either `other-window', `other-frame' or `this-window' and
 tree was loaded.
 If VIEW is non-nil, view file else find the file.
 WHERE is either `other-window', `other-frame' or `this-window' and
@@ -1675,7 +1690,7 @@ specifies where to find/view the result."
   (setf file (ebrowse-find-source-file file tags-file-name))
   ;; If current window is dedicated, use another frame.
   (when (window-dedicated-p (selected-window))
   (setf file (ebrowse-find-source-file file tags-file-name))
   ;; If current window is dedicated, use another frame.
   (when (window-dedicated-p (selected-window))
-    (setf where 'other-frame))
+    (setf where 'other-window))
   (cond (view
         (setf ebrowse-temp-position-to-view struc
               ebrowse-temp-info-to-view info)
   (cond (view
         (setf ebrowse-temp-position-to-view struc
               ebrowse-temp-info-to-view info)
@@ -1698,19 +1713,20 @@ specifies where to find/view the result."
   "Generate a suitable regular expression for a member or class NAME.
 This is `regexp-quote' for most symbols, except for operator names
 which may contain whitespace.  For these symbols, replace white
   "Generate a suitable regular expression for a member or class NAME.
 This is `regexp-quote' for most symbols, except for operator names
 which may contain whitespace.  For these symbols, replace white
-space in the symbol name (generated by EBROWSE) with a regular
+space in the symbol name (generated by BROWSE) with a regular
 expression matching any number of whitespace characters."
   (loop with regexp = (regexp-quote name)
        with start = 0
        finally return regexp
        while (string-match "[ \t]+" regexp start)
 expression matching any number of whitespace characters."
   (loop with regexp = (regexp-quote name)
        with start = 0
        finally return regexp
        while (string-match "[ \t]+" regexp start)
-       do (setf (substring regexp (match-beginning 0) (match-end 0))
-                "[ \t]*"
+       do (setq regexp (concat (substring regexp 0 (match-beginning 0))
+                               "[ \t]*"
+                               (substring regexp (match-end 0)))
                 start (+ (match-beginning 0) 5))))
 
 
 (defun ebrowse-class-declaration-regexp (name)
                 start (+ (match-beginning 0) 5))))
 
 
 (defun ebrowse-class-declaration-regexp (name)
-  "Construct a regexp for a declaration of class NAME." 
+  "Construct a regexp for a declaration of class NAME."
   (concat "^[ \t]*\\(template[ \t\n]*<.*>\\)?"
          "[ \t\n]*\\(class\\|struct\\|union\\).*\\S_"
          (ebrowse-symbol-regexp name)
   (concat "^[ \t]*\\(template[ \t\n]*<.*>\\)?"
          "[ \t\n]*\\(class\\|struct\\|union\\).*\\S_"
          (ebrowse-symbol-regexp name)
@@ -1782,7 +1798,7 @@ INFO is a list (TREE-HEADER TREE-OR-MEMBER MEMBER-LIST)."
       ;; START will be 0.
       (when (and (boundp 'ebrowse-debug)
                 (symbol-value 'ebrowse-debug))
       ;; START will be 0.
       (when (and (boundp 'ebrowse-debug)
                 (symbol-value 'ebrowse-debug))
-       (y-or-n-p (format "start = %d" start))
+       (y-or-n-p (format "start = %d" start))
        (y-or-n-p pattern))
       (setf found
            (loop do (goto-char (max (point-min) (- start offset)))
        (y-or-n-p pattern))
       (setf found
            (loop do (goto-char (max (point-min) (- start offset)))
@@ -1829,14 +1845,14 @@ TREE denotes the class shown."
    start end
    `(mouse-face highlight ebrowse-what mark ebrowse-tree ,tree
                help-echo "double-mouse-1: mark/unmark"))
    start end
    `(mouse-face highlight ebrowse-what mark ebrowse-tree ,tree
                help-echo "double-mouse-1: mark/unmark"))
-  (ebrowse-set-face start end 'ebrowse-tree-mark-face))
+  (ebrowse-set-face start end 'ebrowse-tree-mark))
 
 
 (defun* ebrowse-draw-tree-fn (&aux stack1 stack2 start)
 
 
 (defun* ebrowse-draw-tree-fn (&aux stack1 stack2 start)
-  "Display a single class and recursively it's subclasses.
+  "Display a single class and recursively its subclasses.
 This function may look weird, but this is faster than recursion."
   (setq stack1 (make-list (length ebrowse--tree) 0)
 This function may look weird, but this is faster than recursion."
   (setq stack1 (make-list (length ebrowse--tree) 0)
-       stack2 (ebrowse-copy-list ebrowse--tree))
+       stack2 (copy-sequence ebrowse--tree))
   (loop while stack2
        as level = (pop stack1)
        as tree = (pop stack2)
   (loop while stack2
        as level = (pop stack1)
        as tree = (pop stack2)
@@ -1845,19 +1861,19 @@ This function may look weird, but this is faster than recursion."
              start-of-class-name end-of-class-name)
          ;; Insert mark
          (insert (if (ebrowse-ts-mark tree) ">" " "))
              start-of-class-name end-of-class-name)
          ;; Insert mark
          (insert (if (ebrowse-ts-mark tree) ">" " "))
-         
+
          ;; Indent and insert class name
          (indent-to (+ (* level ebrowse--indentation)
                        ebrowse-tree-left-margin))
          (setq start (point))
          (insert (ebrowse-qualified-class-name class))
          ;; Indent and insert class name
          (indent-to (+ (* level ebrowse--indentation)
                        ebrowse-tree-left-margin))
          (setq start (point))
          (insert (ebrowse-qualified-class-name class))
-         
+
          ;; If template class, add <>
          (when (ebrowse-template-p class)
            (insert "<>"))
          (ebrowse-set-face start (point) (if (zerop level)
          ;; If template class, add <>
          (when (ebrowse-template-p class)
            (insert "<>"))
          (ebrowse-set-face start (point) (if (zerop level)
-                                             'ebrowse-root-class-face
-                                           'ebrowse-default-face))
+                                             'ebrowse-root-class
+                                           'ebrowse-default))
          (setf start-of-class-name start
                end-of-class-name (point))
          ;; If filenames are to be displayed...
          (setf start-of-class-name start
                end-of-class-name (point))
          ;; If filenames are to be displayed...
@@ -1868,7 +1884,7 @@ This function may look weird, but this is faster than recursion."
                    (or (ebrowse-cs-file class)
                        "unknown")
                    ")")
                    (or (ebrowse-cs-file class)
                        "unknown")
                    ")")
-           (ebrowse-set-face start (point) 'ebrowse-file-name-face))
+           (ebrowse-set-face start (point) 'ebrowse-file-name))
          (ebrowse-set-mark-props start-of-line (1+ start-of-line) tree)
          (add-text-properties
           start-of-class-name end-of-class-name
          (ebrowse-set-mark-props start-of-line (1+ start-of-line) tree)
          (add-text-properties
           start-of-class-name end-of-class-name
@@ -1879,7 +1895,7 @@ This function may look weird, but this is faster than recursion."
        ;; Push subclasses, if any.
        (when (ebrowse-ts-subclasses tree)
          (setq stack2
        ;; Push subclasses, if any.
        (when (ebrowse-ts-subclasses tree)
          (setq stack2
-               (nconc (ebrowse-copy-list (ebrowse-ts-subclasses tree)) stack2)
+               (nconc (copy-sequence (ebrowse-ts-subclasses tree)) stack2)
                stack1
                (nconc (make-list (length (ebrowse-ts-subclasses tree))
                                  (1+ level)) stack1)))))
                stack1
                (nconc (make-list (length (ebrowse-ts-subclasses tree))
                                  (1+ level)) stack1)))))
@@ -2027,7 +2043,7 @@ COLLAPSE non-nil means collapse the branch."
        truncate-lines t
        buffer-read-only t
        major-mode 'ebrowse-electric-list-mode)
        truncate-lines t
        buffer-read-only t
        major-mode 'ebrowse-electric-list-mode)
-  (run-hooks 'ebrowse-electric-list-mode-hook))
+  (run-mode-hooks 'ebrowse-electric-list-mode-hook))
 
 
 (defun ebrowse-list-tree-buffers ()
 
 
 (defun ebrowse-list-tree-buffers ()
@@ -2160,7 +2176,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
     (setf ebrowse-member-mode-map map)
     (suppress-keymap map)
 
     (setf ebrowse-member-mode-map map)
     (suppress-keymap map)
 
-  (when window-system
+  (when (display-mouse-p)
     (define-key map [down-mouse-3] 'ebrowse-member-mouse-3)
     (define-key map [mouse-2] 'ebrowse-member-mouse-2))
 
     (define-key map [down-mouse-3] 'ebrowse-member-mouse-3)
     (define-key map [mouse-2] 'ebrowse-member-mouse-2))
 
@@ -2172,7 +2188,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
     (define-key map1 "d" 'ebrowse-switch-member-buffer-to-derived-class)
     (define-key map1 "n" 'ebrowse-switch-member-buffer-to-next-sibling-class)
     (define-key map1 "p" 'ebrowse-switch-member-buffer-to-previous-sibling-class))
     (define-key map1 "d" 'ebrowse-switch-member-buffer-to-derived-class)
     (define-key map1 "n" 'ebrowse-switch-member-buffer-to-next-sibling-class)
     (define-key map1 "p" 'ebrowse-switch-member-buffer-to-previous-sibling-class))
-    
+
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "D" map1)
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "D" map1)
@@ -2182,7 +2198,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
     (define-key map1 "l" 'ebrowse-toggle-long-short-display)
     (define-key map1 "r" 'ebrowse-toggle-regexp-display)
     (define-key map1 "w" 'ebrowse-set-member-buffer-column-width))
     (define-key map1 "l" 'ebrowse-toggle-long-short-display)
     (define-key map1 "r" 'ebrowse-toggle-regexp-display)
     (define-key map1 "w" 'ebrowse-set-member-buffer-column-width))
-    
+
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "F" map1)
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "F" map1)
@@ -2197,7 +2213,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
     (define-key map1 "p" 'ebrowse-toggle-pure-member-filter)
     (define-key map1 "r" 'ebrowse-remove-all-member-filters)
     (define-key map1 "v" 'ebrowse-toggle-virtual-member-filter))
     (define-key map1 "p" 'ebrowse-toggle-pure-member-filter)
     (define-key map1 "r" 'ebrowse-remove-all-member-filters)
     (define-key map1 "v" 'ebrowse-toggle-virtual-member-filter))
-    
+
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "L" map1)
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "L" map1)
@@ -2209,14 +2225,14 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
     (define-key map1 "t" 'ebrowse-display-types-member-list)
     (define-key map1 "v" 'ebrowse-display-variables-member-list)
     (define-key map1 "V" 'ebrowse-display-static-variables-member-list))
     (define-key map1 "t" 'ebrowse-display-types-member-list)
     (define-key map1 "v" 'ebrowse-display-variables-member-list)
     (define-key map1 "V" 'ebrowse-display-static-variables-member-list))
-    
+
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "G" map1)
     (define-key map1 "m" 'ebrowse-goto-visible-member/all-member-lists)
     (define-key map1 "n" 'ebrowse-repeat-member-search)
     (define-key map1 "v" 'ebrowse-goto-visible-member))
   (let ((map1 (make-sparse-keymap)))
     (suppress-keymap map1 t)
     (define-key map "G" map1)
     (define-key map1 "m" 'ebrowse-goto-visible-member/all-member-lists)
     (define-key map1 "n" 'ebrowse-repeat-member-search)
     (define-key map1 "v" 'ebrowse-goto-visible-member))
-    
+
   (define-key map "f" 'ebrowse-find-member-declaration)
   (define-key map "m" 'ebrowse-switch-to-next-member-buffer)
   (define-key map "q" 'bury-buffer)
   (define-key map "f" 'ebrowse-find-member-declaration)
   (define-key map "m" 'ebrowse-switch-to-next-member-buffer)
   (define-key map "q" 'bury-buffer)
@@ -2232,7 +2248,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
 \f
 ;;; Member mode
 
 \f
 ;;; Member mode
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-member-mode ()
   "Major mode for Ebrowse member buffers.
 
 (defun ebrowse-member-mode ()
   "Major mode for Ebrowse member buffers.
 
@@ -2278,7 +2294,7 @@ See 'Electric-command-loop' for a description of STATE and CONDITION."
        ebrowse--const-display-flag nil
        ebrowse--pure-display-flag nil)
   (modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
        ebrowse--const-display-flag nil
        ebrowse--pure-display-flag nil)
   (modify-syntax-entry ?_ (char-to-string (char-syntax ?a)))
-  (run-hooks 'ebrowse-member-mode-hook))
+  (run-mode-hooks 'ebrowse-member-mode-hook))
 
 
 \f
 
 
 \f
@@ -2330,7 +2346,7 @@ With prefix ARG, switch to the tree buffer else pop to it."
   "Set the column width of the member display.
 The new width is read from the minibuffer."
   (interactive)
   "Set the column width of the member display.
 The new width is read from the minibuffer."
   (interactive)
-  (let ((width (string-to-int
+  (let ((width (string-to-number
                (read-from-minibuffer
                 (concat "Column width ("
                         (int-to-string (if ebrowse--long-display-flag
                (read-from-minibuffer
                 (concat "Column width ("
                         (int-to-string (if ebrowse--long-display-flag
@@ -2579,7 +2595,7 @@ DEFINITION non-nil means find the definition, otherwise find the
 declaration.
 INFO is a list (TREE ACCESSOR MEMBER) describing the member to
 search.
 declaration.
 INFO is a list (TREE ACCESSOR MEMBER) describing the member to
 search.
-TAGS-FILE-NAME is the file name of the EBROWSE file."
+TAGS-FILE-NAME is the file name of the BROWSE file."
   (unless header
     (setq header ebrowse--header))
   (unless tags-file-name
   (unless header
     (setq header ebrowse--header))
   (unless tags-file-name
@@ -2686,7 +2702,7 @@ CLASS non-nil means display that class' title.  Otherwise use
 the class cursor is on."
   (let ((start (point))
        (tree  (or class ebrowse--displayed-class))
 the class cursor is on."
   (let ((start (point))
        (tree  (or class ebrowse--displayed-class))
-       class-name-start 
+       class-name-start
        class-name-end)
     (insert "class ")
     (setq class-name-start (point))
        class-name-end)
     (insert "class ")
     (setq class-name-start (point))
@@ -2695,7 +2711,7 @@ the class cursor is on."
       (insert "<>"))
     (setq class-name-end (point))
     (insert ":\n\n")
       (insert "<>"))
     (setq class-name-end (point))
     (insert ":\n\n")
-    (ebrowse-set-face start (point) 'ebrowse-member-class-face)
+    (ebrowse-set-face start (point) 'ebrowse-member-class)
     (add-text-properties
      class-name-start class-name-end
      '(ebrowse-what class-name
     (add-text-properties
      class-name-start class-name-end
      '(ebrowse-what class-name
@@ -2718,24 +2734,24 @@ means the member buffer is standalone.  CLASS is its class."
     ;; is on if not specified as an argument.
     (unless class
       (setq class (ebrowse-tree-at-point)))
     ;; is on if not specified as an argument.
     (unless class
       (setq class (ebrowse-tree-at-point)))
-    (with-output-to-temp-buffer ebrowse-member-buffer-name
-      (save-excursion
-       (set-buffer standard-output)
+    (save-selected-window
+      (if temp-buffer
+         (pop-to-buffer temp-buffer)
+       (pop-to-buffer (get-buffer-create ebrowse-member-buffer-name))
        ;; If new buffer, set the mode and initial values of locals
        ;; If new buffer, set the mode and initial values of locals
-       (unless temp-buffer
-         (ebrowse-member-mode))
-       ;; Set local variables
-       (setq ebrowse--member-list (funcall list class)
-             ebrowse--displayed-class class
-             ebrowse--accessor list
-             ebrowse--tree-obarray classes
-             ebrowse--frozen-flag stand-alone
-             ebrowse--tags-file-name tags-file-name
-             ebrowse--header header
-             ebrowse--tree tree
-             buffer-read-only t)
-       (ebrowse-redisplay-member-buffer)
-       (current-buffer)))))
+       (ebrowse-member-mode))
+      ;; Set local variables
+      (setq ebrowse--member-list (funcall list class)
+           ebrowse--displayed-class class
+           ebrowse--accessor list
+           ebrowse--tree-obarray classes
+           ebrowse--frozen-flag stand-alone
+           ebrowse--tags-file-name tags-file-name
+           ebrowse--header header
+           ebrowse--tree tree
+           buffer-read-only t)
+      (ebrowse-redisplay-member-buffer)
+      (current-buffer))))
 
 
 (defun ebrowse-member-display-p (member)
 
 
 (defun ebrowse-member-display-p (member)
@@ -2811,7 +2827,7 @@ TREE is the class tree of MEMBER-LIST."
            (ebrowse-draw-member-attributes member-struc)
            (insert ">")
            (ebrowse-set-face start (point)
            (ebrowse-draw-member-attributes member-struc)
            (insert ">")
            (ebrowse-set-face start (point)
-                             'ebrowse-member-attribute-face)))
+                             'ebrowse-member-attribute)))
        (insert " ")
        (ebrowse-draw-member-regexp member-struc))))
   (insert "\n")
        (insert " ")
        (ebrowse-draw-member-regexp member-struc))))
   (insert "\n")
@@ -2836,13 +2852,13 @@ TREE is the class tree in which the members are found."
          (indent-to (* i column-width))
          (put-text-property start-of-column (point) 'mouse-face nil)
          (setq start-of-entry (point))
          (indent-to (* i column-width))
          (put-text-property start-of-column (point) 'mouse-face nil)
          (setq start-of-entry (point))
-         ;; Show various attributes 
+         ;; Show various attributes
          (when ebrowse--attributes-flag
            (insert "<")
            (ebrowse-draw-member-attributes member)
            (insert "> ")
            (ebrowse-set-face start-of-entry (point)
          (when ebrowse--attributes-flag
            (insert "<")
            (ebrowse-draw-member-attributes member)
            (insert "> ")
            (ebrowse-set-face start-of-entry (point)
-                             'ebrowse-member-attribute-face))
+                             'ebrowse-member-attribute))
          ;; insert member name truncated to column width
          (setq start-of-name (point))
          (insert (substring name 0
          ;; insert member name truncated to column width
          (setq start-of-name (point))
          (insert (substring name 0
@@ -3039,7 +3055,7 @@ Prefix arg INC specifies which one."
 Prefix arg ARG says which class should be displayed.  Default is
 the first derived class."
   (interactive "P")
 Prefix arg ARG says which class should be displayed.  Default is
 the first derived class."
   (interactive "P")
-  (flet ((ebrowse-tree-obarray-as-alist () 
+  (flet ((ebrowse-tree-obarray-as-alist ()
                                        (loop for s in (ebrowse-ts-subclasses
                                                        ebrowse--displayed-class)
                                              collect (cons (ebrowse-cs-name
                                        (loop for s in (ebrowse-ts-subclasses
                                                        ebrowse--displayed-class)
                                              collect (cons (ebrowse-cs-name
@@ -3129,7 +3145,7 @@ the first derived class."
     ["Find in Tree" ebrowse-goto-visible-member/all-member-lists
      :help "Search for a member in any class"
      :active t])
     ["Find in Tree" ebrowse-goto-visible-member/all-member-lists
      :help "Search for a member in any class"
      :active t])
-   ("Display" 
+   ("Display"
     ["Inherited" ebrowse-toggle-base-class-display
      :help "Toggle display of inherited members"
      :style toggle
     ["Inherited" ebrowse-toggle-base-class-display
      :help "Toggle display of inherited members"
      :style toggle
@@ -3222,7 +3238,7 @@ the first derived class."
     :active (eq (get-text-property (point) 'ebrowse-what) 'class-name)]))
 
 
     :active (eq (get-text-property (point) 'ebrowse-what) 'class-name)]))
 
 
-(easy-menu-define 
+(easy-menu-define
  ebrowse-member-name-object-menu ebrowse-member-mode-map
  "Object menu for member names"
  '("Ebrowse"
  ebrowse-member-name-object-menu ebrowse-member-mode-map
  "Object menu for member names"
  '("Ebrowse"
@@ -3279,7 +3295,7 @@ TREE-HEADER is the header structure of the class tree.
 NAME is the name of the member.
 Value is an alist of elements (CLASS-NAME . (CLASS LIST NAME)),
 where each element describes one occurrence of member NAME in the tree.
 NAME is the name of the member.
 Value is an alist of elements (CLASS-NAME . (CLASS LIST NAME)),
 where each element describes one occurrence of member NAME in the tree.
-CLASS-NAME is the qualified name of the class in which the 
+CLASS-NAME is the qualified name of the class in which the
 member was found.  The CDR of the acons is described in function
 `ebrowse-class/index/member-for-member'."
   (let ((table (ebrowse-member-table tree-header))
 member was found.  The CDR of the acons is described in function
 `ebrowse-class/index/member-for-member'."
   (let ((table (ebrowse-member-table tree-header))
@@ -3318,16 +3334,15 @@ from point as default.  Value is a list (CLASS-NAME MEMBER-NAME)."
        (unless member-name
          (error "No member name at point"))
        (if members
        (unless member-name
          (error "No member name at point"))
        (if members
-           (let* ((alist (ebrowse-hash-table-to-alist members))
-                  (name (ebrowse-ignoring-completion-case
-                          (completing-read prompt alist nil nil member-name)))
-                  (completion-result (try-completion name alist)))
-             ;; Cannot rely on `try-completion' returning T for exact
-             ;; matches!  it returns the the name as a string.
+           (let* ((name (ebrowse-ignoring-completion-case
+                          (completing-read prompt members nil nil member-name)))
+                  (completion-result (try-completion name members)))
+             ;; Cannot rely on `try-completion' returning t for exact
+             ;; matches!  It returns the name as a string.
              (unless (setq member-info (gethash name members))
                (if (y-or-n-p "No exact match found.  Try substrings? ")
              (unless (setq member-info (gethash name members))
                (if (y-or-n-p "No exact match found.  Try substrings? ")
-                   (setq name 
-                         (or (first (ebrowse-list-of-matching-members 
+                   (setq name
+                         (or (first (ebrowse-list-of-matching-members
                                      members (regexp-quote name) name))
                              (error "Sorry, nothing found")))
                  (error "Canceled")))
                                      members (regexp-quote name) name))
                              (error "Sorry, nothing found")))
                  (error "Canceled")))
@@ -3403,28 +3418,28 @@ definition."
       (ebrowse-push-position (point-marker) info t))))
 
 
       (ebrowse-push-position (point-marker) info t))))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-view-declaration ()
   "View declaration of member at point."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 0 :view t :definition nil))
 
 
 (defun ebrowse-tags-view-declaration ()
   "View declaration of member at point."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 0 :view t :definition nil))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-find-declaration ()
   "Find declaration of member at point."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 0 :view nil :definition nil))
 
 
 (defun ebrowse-tags-find-declaration ()
   "Find declaration of member at point."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 0 :view nil :definition nil))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-view-definition ()
   "View definition of member at point."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 0 :view t :definition t))
 
 
 (defun ebrowse-tags-view-definition ()
   "View definition of member at point."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 0 :view t :definition t))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-find-definition ()
   "Find definition of member at point."
   (interactive)
 (defun ebrowse-tags-find-definition ()
   "Find definition of member at point."
   (interactive)
@@ -3437,21 +3452,21 @@ definition."
   (ebrowse-tags-view/find-member-decl/defn 4 :view t :definition nil))
 
 
   (ebrowse-tags-view/find-member-decl/defn 4 :view t :definition nil))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-find-declaration-other-window ()
   "Find declaration of member at point in other window."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 4 :view nil :definition nil))
 
 
 (defun ebrowse-tags-find-declaration-other-window ()
   "Find declaration of member at point in other window."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 4 :view nil :definition nil))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-view-definition-other-window ()
   "View definition of member at point in other window."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 4 :view t :definition t))
 
 
 (defun ebrowse-tags-view-definition-other-window ()
   "View definition of member at point in other window."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 4 :view t :definition t))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-find-definition-other-window ()
   "Find definition of member at point in other window."
   (interactive)
 (defun ebrowse-tags-find-definition-other-window ()
   "Find definition of member at point in other window."
   (interactive)
@@ -3464,21 +3479,21 @@ definition."
   (ebrowse-tags-view/find-member-decl/defn 5 :view t :definition nil))
 
 
   (ebrowse-tags-view/find-member-decl/defn 5 :view t :definition nil))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-find-declaration-other-frame ()
   "Find definition of member at point in other frame."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 5 :view nil :definition nil))
 
 
 (defun ebrowse-tags-find-declaration-other-frame ()
   "Find definition of member at point in other frame."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 5 :view nil :definition nil))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-view-definition-other-frame ()
   "View definition of member at point in other frame."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 5 :view t :definition t))
 
 
 (defun ebrowse-tags-view-definition-other-frame ()
   "View definition of member at point in other frame."
   (interactive)
   (ebrowse-tags-view/find-member-decl/defn 5 :view t :definition t))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-find-definition-other-frame ()
   "Find definition of member at point in other frame."
   (interactive)
 (defun ebrowse-tags-find-definition-other-frame ()
   "Find definition of member at point in other frame."
   (interactive)
@@ -3560,8 +3575,7 @@ The file name is read from the minibuffer."
   (let* ((buffer (or (ebrowse-choose-from-browser-buffers)
                     (error "No tree buffer")))
         (files (save-excursion (set-buffer buffer) (ebrowse-files-table)))
   (let* ((buffer (or (ebrowse-choose-from-browser-buffers)
                     (error "No tree buffer")))
         (files (save-excursion (set-buffer buffer) (ebrowse-files-table)))
-        (alist (ebrowse-hash-table-to-alist files))
-        (file (completing-read "List members in file: " alist nil t))
+        (file (completing-read "List members in file: " files nil t))
         (header (ebrowse-value-in-buffer 'ebrowse--header buffer))
         temp-buffer-setup-hook
         (members (ebrowse-member-table header)))
         (header (ebrowse-value-in-buffer 'ebrowse--header buffer))
         temp-buffer-setup-hook
         (members (ebrowse-member-table header)))
@@ -3584,12 +3598,12 @@ The file name is read from the minibuffer."
 
 
 (defun* ebrowse-draw-file-member-info (info &optional (kind ""))
 
 
 (defun* ebrowse-draw-file-member-info (info &optional (kind ""))
-  "Display a line in an the members per file info buffer.
+  "Display a line in the members info buffer.
 INFO describes the member.  It has the form (TREE ACCESSOR MEMBER).
 TREE is the class of the member to display.
 ACCESSOR is the accessor symbol of its member list.
 MEMBER is the member structure.
 INFO describes the member.  It has the form (TREE ACCESSOR MEMBER).
 TREE is the class of the member to display.
 ACCESSOR is the accessor symbol of its member list.
 MEMBER is the member structure.
-KIND is a an additional string printed in the buffer."
+KIND is an additional string printed in the buffer."
   (let* ((tree (first info))
         (globals-p (ebrowse-globals-tree-p tree)))
     (unless globals-p
   (let* ((tree (first info))
         (globals-p (ebrowse-globals-tree-p tree)))
     (unless globals-p
@@ -3632,7 +3646,7 @@ KIND is a an additional string printed in the buffer."
 
 \f
 (defun ebrowse-some-member-table ()
 
 \f
 (defun ebrowse-some-member-table ()
-  "Return a hash table containing all member of a tree.
+  "Return a hash table containing all members of a tree.
 If there's only one tree loaded, use that.  Otherwise let the
 use choose a tree."
   (let* ((buffers (ebrowse-known-class-trees-buffer-list))
 If there's only one tree loaded, use that.  Otherwise let the
 use choose a tree."
   (let* ((buffers (ebrowse-known-class-trees-buffer-list))
@@ -3644,15 +3658,6 @@ use choose a tree."
     (ebrowse-member-table header)))
 
 
     (ebrowse-member-table header)))
 
 
-(defun ebrowse-hash-table-to-alist (table)
-  "Return an alist holding all key/value pairs of hash table TABLE."
-  (let ((list))
-    (maphash #'(lambda (key value)
-                (setq list (cons (cons key value) list)))
-            table)
-    list))
-  
-
 (defun ebrowse-cyclic-successor-in-string-list (string list)
   "Return the item following STRING in LIST.
 If STRING is the last element, return the first element as successor."
 (defun ebrowse-cyclic-successor-in-string-list (string list)
   "Return the item following STRING in LIST.
 If STRING is the last element, return the first element as successor."
@@ -3665,7 +3670,7 @@ If STRING is the last element, return the first element as successor."
 ;;;###autoload
 (defun* ebrowse-tags-complete-symbol (prefix)
   "Perform completion on the C++ symbol preceding point.
 ;;;###autoload
 (defun* ebrowse-tags-complete-symbol (prefix)
   "Perform completion on the C++ symbol preceding point.
-A second call of this function without changing point inserts the next match. 
+A second call of this function without changing point inserts the next match.
 A call with prefix PREFIX reads the symbol to insert from the minibuffer with
 completion."
   (interactive "P")
 A call with prefix PREFIX reads the symbol to insert from the minibuffer with
 completion."
   (interactive "P")
@@ -3677,9 +3682,8 @@ completion."
      ;; With prefix, read name from minibuffer with completion.
      (prefix
       (let* ((members (ebrowse-some-member-table))
      ;; With prefix, read name from minibuffer with completion.
      (prefix
       (let* ((members (ebrowse-some-member-table))
-            (alist (ebrowse-hash-table-to-alist members))
             (completion (completing-read "Insert member: "
             (completion (completing-read "Insert member: "
-                                         alist nil t pattern)))
+                                         members nil t pattern)))
        (when completion
          (setf ebrowse-last-completion-location nil)
          (delete-region begin end)
        (when completion
          (setf ebrowse-last-completion-location nil)
          (delete-region begin end)
@@ -3711,7 +3715,7 @@ completion."
              (t
               (delete-region begin end)
               (insert completion)
              (t
               (delete-region begin end)
               (insert completion)
-              
+
               (setf ebrowse-last-completion-location (point)
                     ebrowse-last-completion-start pattern
                     ebrowse-last-completion completion
               (setf ebrowse-last-completion-location (point)
                     ebrowse-last-completion-start pattern
                     ebrowse-last-completion completion
@@ -3796,7 +3800,7 @@ TREE-BUFFER if indirectly specifies which files to loop over."
     (goto-char (point-min))))
 
 
     (goto-char (point-min))))
 
 
-;;###autoload
+;;;###autoload
 (defun ebrowse-tags-search (regexp)
   "Search for REGEXP in all files in a tree.
 If marked classes exist, process marked classes, only.
 (defun ebrowse-tags-search (regexp)
   "Search for REGEXP in all files in a tree.
 If marked classes exist, process marked classes, only.
@@ -3813,16 +3817,16 @@ If regular expression is nil, repeat last search."
 (defun ebrowse-tags-query-replace (from to)
   "Query replace FROM with TO in all files of a class tree.
 With prefix arg, process files of marked classes only."
 (defun ebrowse-tags-query-replace (from to)
   "Query replace FROM with TO in all files of a class tree.
 With prefix arg, process files of marked classes only."
-  (interactive 
+  (interactive
    "sTree query replace (regexp): \nsTree query replace %s by: ")
   (setq ebrowse-tags-loop-form
        (list 'and (list 'save-excursion
                         (list 're-search-forward from nil t))
    "sTree query replace (regexp): \nsTree query replace %s by: ")
   (setq ebrowse-tags-loop-form
        (list 'and (list 'save-excursion
                         (list 're-search-forward from nil t))
-             (list 'not (list 'perform-replace from to nil nil t t nil))))
+             (list 'not (list 'perform-replace from to t t nil))))
   (ebrowse-tags-loop-continue 'first-time))
 
 
   (ebrowse-tags-loop-continue 'first-time))
 
 
-;;; ###autoload
+;;;###autoload
 (defun ebrowse-tags-search-member-use (&optional fix-name)
   "Search for call sites of a member.
 If FIX-NAME is specified, search uses of that member.
 (defun ebrowse-tags-search-member-use (&optional fix-name)
   "Search for call sites of a member.
 If FIX-NAME is specified, search uses of that member.
@@ -3884,7 +3888,7 @@ If VIEW is non-nil, view the position, otherwise find it."
        (t
         (unwind-protect
             (progn
        (t
         (unwind-protect
             (progn
-              (push (function 
+              (push (function
                      (lambda ()
                        (goto-char (ebrowse-position-point position))))
                     view-mode-hook)
                      (lambda ()
                        (goto-char (ebrowse-position-point position))))
                     view-mode-hook)
@@ -3910,7 +3914,7 @@ Positions in buffers that have no file names are not saved."
             :file-name (buffer-file-name (marker-buffer marker))
             :point (marker-position marker)
             :target target
             :file-name (buffer-file-name (marker-buffer marker))
             :point (marker-position marker)
             :target target
-            :info info) 
+            :info info)
            ebrowse-position-stack))))
 
 
            ebrowse-position-stack))))
 
 
@@ -3926,7 +3930,7 @@ Positions in buffers that have no file names are not saved."
                                     ebrowse-position-stack))))
 
 
                                     ebrowse-position-stack))))
 
 
-;;; ###autoload
+;;;###autoload
 (defun ebrowse-back-in-position-stack (arg)
   "Move backward in the position stack.
 Prefix arg ARG says how much."
 (defun ebrowse-back-in-position-stack (arg)
   "Move backward in the position stack.
 Prefix arg ARG says how much."
@@ -3934,7 +3938,7 @@ Prefix arg ARG says how much."
   (ebrowse-move-in-position-stack (max 1 arg)))
 
 
   (ebrowse-move-in-position-stack (max 1 arg)))
 
 
-;;; ###autoload
+;;;###autoload
 (defun ebrowse-forward-in-position-stack (arg)
   "Move forward in the position stack.
 Prefix arg ARG says how much."
 (defun ebrowse-forward-in-position-stack (arg)
   "Move forward in the position stack.
 Prefix arg ARG says how much."
@@ -3950,7 +3954,7 @@ Prefix arg ARG says how much."
 
 
 (defvar ebrowse-electric-position-mode-hook nil
 
 
 (defvar ebrowse-electric-position-mode-hook nil
-  "If non-nil, its value is called by ebrowse-electric-position-mode.")
+  "If non-nil, its value is called by `ebrowse-electric-position-mode'.")
 
 
 (unless ebrowse-electric-position-mode-map
 
 
 (unless ebrowse-electric-position-mode-map
@@ -4000,7 +4004,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'."
        truncate-lines t
        buffer-read-only t
        major-mode 'ebrowse-electric-position-mode)
        truncate-lines t
        buffer-read-only t
        major-mode 'ebrowse-electric-position-mode)
-  (run-hooks 'ebrowse-electric-position-mode-hook))
+  (run-mode-hooks 'ebrowse-electric-position-mode-hook))
 
 
 (defun ebrowse-draw-position-buffer ()
 
 
 (defun ebrowse-draw-position-buffer ()
@@ -4019,7 +4023,7 @@ Runs the hook `ebrowse-electric-position-mode-hook'."
   (setq buffer-read-only t))
 
 
   (setq buffer-read-only t))
 
 
-;;; ###autoload
+;;;###autoload
 (defun ebrowse-electric-position-menu ()
   "List positions in the position stack in an electric buffer."
   (interactive)
 (defun ebrowse-electric-position-menu ()
   "List positions in the position stack in an electric buffer."
   (interactive)
@@ -4121,7 +4125,7 @@ Installed on `local-write-file-hooks'."
   t)
 
 
   t)
 
 
-;;; ###autoload
+;;;###autoload
 (defun ebrowse-save-tree ()
   "Save current tree in same file it was loaded from."
   (interactive)
 (defun ebrowse-save-tree ()
   "Save current tree in same file it was loaded from."
   (interactive)
@@ -4172,7 +4176,7 @@ Otherwise, FILE-NAME specifies the file to save the tree in."
 \f
 ;;; Statistics
 
 \f
 ;;; Statistics
 
-;;; ###autoload
+;;;###autoload
 (defun ebrowse-statistics ()
   "Display statistics for a class tree."
   (interactive)
 (defun ebrowse-statistics ()
   "Display statistics for a class tree."
   (interactive)
@@ -4198,7 +4202,7 @@ Otherwise, FILE-NAME specifies the file to save the tree in."
 
 (defun ebrowse-print-statistics-line (title value)
   "Print a line in the statistics buffer.
 
 (defun ebrowse-print-statistics-line (title value)
   "Print a line in the statistics buffer.
-TITLE is the title of the line, VALUE is number to be printed
+TITLE is the title of the line, VALUE is number to be printed
 after that."
   (insert title)
   (indent-to 40)
 after that."
   (insert title)
   (indent-to 40)
@@ -4226,13 +4230,13 @@ NUMBER-OF-STATIC-VARIABLES:"
 ;;; Global key bindings
 
 ;;; The following can be used to bind key sequences starting with
 ;;; Global key bindings
 
 ;;; The following can be used to bind key sequences starting with
-;;; prefix `\C-cb' to browse commands.
+;;; prefix `\C-c\C-m' to browse commands.
 
 (defvar ebrowse-global-map nil
   "*Keymap for Ebrowse commands.")
 
 
 
 (defvar ebrowse-global-map nil
   "*Keymap for Ebrowse commands.")
 
 
-(defvar ebrowse-global-prefix-key "\C-cb"
+(defvar ebrowse-global-prefix-key "\C-c\C-m"
   "Prefix key for Ebrowse commands.")
 
 
   "Prefix key for Ebrowse commands.")
 
 
@@ -4326,13 +4330,13 @@ NUMBER-OF-STATIC-VARIABLES:"
   "Select the nth entry in the list by the keys 1..9."
   (interactive)
   (let* ((maxlin (count-lines (point-min) (point-max)))
   "Select the nth entry in the list by the keys 1..9."
   (interactive)
   (let* ((maxlin (count-lines (point-min) (point-max)))
-        (n (min maxlin (+ 2 (string-to-int (this-command-keys))))))
+        (n (min maxlin (+ 2 (string-to-number (this-command-keys))))))
     (goto-line n)
     (throw 'electric-buffer-menu-select (point))))
 
 
 (defun ebrowse-install-1-to-9-keys ()
     (goto-line n)
     (throw 'electric-buffer-menu-select (point))))
 
 
 (defun ebrowse-install-1-to-9-keys ()
-  "Define keys 1..9 to select the 1st to 0nth entry in the list."
+  "Define keys 1..9 to select the 1st to 9nth entry in the list."
   (dotimes (i 9)
     (define-key (current-local-map) (char-to-string (+ i ?1))
       'ebrowse-select-1st-to-9nth)))
   (dotimes (i 9)
     (define-key (current-local-map) (char-to-string (+ i ?1))
       'ebrowse-select-1st-to-9nth)))
@@ -4383,7 +4387,7 @@ EVENT is the mouse event."
 
 
 (easy-menu-define
 
 
 (easy-menu-define
- ebrowse-tree-buffer-class-object-menu ebrowse-tree-mode-map 
+ ebrowse-tree-buffer-class-object-menu ebrowse-tree-mode-map
  "Object menu for classes in the tree buffer"
  '("Class"
    ["Functions" ebrowse-tree-command:show-member-functions
  "Object menu for classes in the tree buffer"
  '("Class"
    ["Functions" ebrowse-tree-command:show-member-functions
@@ -4425,7 +4429,7 @@ EVENT is the mouse event."
 
 
 (easy-menu-define
 
 
 (easy-menu-define
- ebrowse-tree-buffer-object-menu ebrowse-tree-mode-map 
+ ebrowse-tree-buffer-object-menu ebrowse-tree-mode-map
  "Object menu for tree buffers"
  '("Ebrowse"
    ["Filename Display" ebrowse-toggle-file-name-display
  "Object menu for tree buffers"
  '("Ebrowse"
    ["Filename Display" ebrowse-toggle-file-name-display
@@ -4509,5 +4513,5 @@ EVENT is the mouse event."
 ;;; eval:(put 'ebrowse-for-all-trees 'lisp-indent-hook 1)
 ;;; End:
 
 ;;; eval:(put 'ebrowse-for-all-trees 'lisp-indent-hook 1)
 ;;; End:
 
-;;; ebrowse.el ends here.    
-
+;;; arch-tag: 4fa3c8bf-1771-479b-bcd7-b029c7c9677b
+;;; ebrowse.el ends here