changeset 83134:445e34bd8b61

Merged in changes from CVS trunk. Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-339 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-340 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-341 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-174
author Karoly Lorentey <lorentey@elte.hu>
date Mon, 24 May 2004 23:42:52 +0000
parents 50b9a96c837c (current diff) e31413b06034 (diff)
children 0c9a34bef526
files lisp/ChangeLog lisp/simple.el
diffstat 11 files changed, 481 insertions(+), 273 deletions(-) [+]
line wrap: on
line diff
--- a/lisp/ChangeLog	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/ChangeLog	Mon May 24 23:42:52 2004 +0000
@@ -1,3 +1,93 @@
+2004-05-24  Nick Roberts  <nickrob@gnu.org>
+
+	* progmodes/gdb-ui.el (gdb-breakpoints-mode, gdb-frames-mode) 
+	(gdb-locals-mode): Check gud-minor-mode in gud-comint-buffer.
+
+2004-05-24  Yoichi NAKAYAMA  <yoichi@geiin.org>  (tiny change)
+
+	* net/browse-url.el (browse-url-interactive-arg): Enable user to
+	explicitly select the text to be taken as URL.
+
+2004-05-23  Juri Linkov  <juri@jurta.org>
+
+	* info.el (Info-index-nodes): New var and fun.
+	(Info-goto-index, Info-index, info-apropos)
+	(Info-find-emacs-command-nodes): Rewrite to use Info-index-nodes.
+	(Info-index): Fix docstring.  Store and restore Info-history-list.
+	(Info-complete-nodes): New var.
+	(Info-complete-menu-item): Use it.
+	(Info-index-node): New fun.
+	(Info-final-node, Info-forward-node, Info-backward-node)
+	(Info-build-toc, Info-try-follow-nearest-node, Info-fontify-node):
+	Use Info-index-node.
+	(Info-extract-menu-item, Info-extract-menu-counting): Set second
+	arg of `Info-extract-menu-node-name' to non-nil for index nodes.
+	(Info-find-node-2): If a node with period in its name not found,
+	try to find a node without the name part after period.
+	(Info-select-node): Call Info-fontify-node only if
+	Info-fontify-maximum-menu-size is not nil.
+	(info-apropos): Set Info-fontify-maximum-menu-size to nil.
+	(Info-find-emacs-command-nodes, Info-goto-emacs-command-node):
+	Preserve Info-history-list.
+	(Info-toc): Set Info-current-file.
+	(Info-build-toc): Move point to the beginning of the buffer.
+	Add main-file variable.
+	(Info-dir-remove-duplicates, Info-history, Info-toc, info-apropos):
+	Use backslashed representation of the control character ^_.
+
+	* textmodes/texinfmt.el (texinfo-print-index): Print index line
+	numbers in the new Texinfo 4.7 format.
+
+	* add-log.el (change-log-font-lock-keywords): Remove `:' from
+	regexps for function and variable names.
+
+	* descr-text.el (describe-property-list): Add [show] button for
+	`syntax-table' property with action to pp to a separate buffer.
+	(describe-char): Replace search-forward by re-search-forward with
+	whitespace regexp after "character:" to not fail in too narrow
+	windows.
+
+	* simple.el (next-error-find-buffer): Add a rule to return
+	next-error capable buffer if one window on the selected frame
+	displays such buffer.
+
+2004-05-23  Nick Roberts  <nickrob@gnu.org>
+
+	* progmodes/gdb-ui.el (gdb-server-prefix): New variable.
+	(gud-watch, gdb-send-item, gdb-breakpoints-mode, gdb-frames-mode)
+	(gdb-locals-mode, gdb-send-item, gdb-toggle-breakpoint)
+	(gdb-delete-breakpoint, gdb-frames-select, gdb-threads-buffer)
+	(gdb-registers-buffer, gdb-reset, gdb-assembler-buffer): Handle
+	new value for gud-minor-mode (gdbmi).
+	(gdb-buffer-type, gdb-input-queue, gdb-prompting)
+	(gdb-output-sink, gdb-current-item, gdb-pending-triggers): Change
+	from local to global gdb variable set.
+	(gdb-ann3): Initialise above gdb variable set.
+	(gdb-var-update, gdb-var-update-handler, gdb-enqueue-input)
+	(gdb-dequeue-input, gdb-source, gdb-pre-prompt, gdb-prompt)
+	(gdb-subprompt, gdb-starting, gdb-stopping, gdb-frame-begin)
+	(gdb-stopped, gdb-post-prompt, gdb-concat-output)
+	(def-gdb-auto-update-trigger, def-gdb-auto-update-handler)
+	(gdb-info-locals-handler, gdb-invalidate-assembler)
+	(gdb-get-current-frame, gdb-frame-handler): Handle gdb variable
+	set as global variables.
+	(gdb-get-create-buffer): Don't make gud-comint buffer-local.
+	Handle gdbmi.
+	(gdb-info-breakpoints-custom): Fix regexp.
+	(def-gdb-var): Delete.
+
+	* progmodes/gud.el (gud-menu-map, gud-speedbar-menu-items)
+	(gud-speedbar-buttons, gud-sentinel, gud-display-line)
+	(gud-basic-call): Handle new value for gud-minor-mode (gdbmi) for
+	a new mode.  The file (gdb-mi.el) for this mode will be included
+	with the GDB distribution (6.2 onwards) and will use GDB/MI as its
+	primary interface.
+
+2004-05-23  Jesper Harder  <harder@ifa.au.dk>
+
+	* progmodes/grep.el (grep-tree): Ensure that DIR argument is
+	interpreted as a directory.
+
 2004-05-22  Richard M. Stallman  <rms@gnu.org>
 
 	* textmodes/paragraphs.el (sentence-end): Match unicode curly quotes
@@ -5,9 +95,9 @@
 
 	* textmodes/bibtex.el: Use assoc-string, not assoc-ignore-case.
 
-	* progmodes/idlw-shell.el (idlwave-shell-get-object-class): 
+	* progmodes/idlw-shell.el (idlwave-shell-get-object-class):
 	Use assoc-string, not assoc-ignore-case.
-	
+
 	* progmodes/ada-mode.el: Use assoc-string, not assoc-ignore-case.
 
 	* emacs-lisp/lisp.el (mark-defun, narrow-to-defun):
@@ -2757,7 +2847,7 @@
 
 2004-03-21  Andre Spiegel  <spiegel@gnu.org>
 
-	* vc.el Add new optional BUFFER argument to vc-BACKEND-print-log
+	* vc.el: Add new optional BUFFER argument to vc-BACKEND-print-log
 	and vc-BACKEND-diff.
 	(vc-print-log): If the print-log implementation supports it, use
 	the new BUFFER argument to direct output to *vc-change-log*, not *vc*.
--- a/lisp/add-log.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/add-log.el	Mon May 24 23:42:52 2004 +0000
@@ -230,13 +230,13 @@
      ;; Possibly further names in a list:
      ("\\=, \\([^ ,:([\n]+\\)" nil nil (1 'change-log-file-face))
      ;; Possibly a parenthesized list of names:
-     ("\\= (\\([^) ,:\n]+\\)" nil nil (1 'change-log-list-face))
-     ("\\=, *\\([^) ,:\n]+\\)" nil nil (1 'change-log-list-face)))
+     ("\\= (\\([^) ,\n]+\\)" nil nil (1 'change-log-list-face))
+     ("\\=, *\\([^) ,\n]+\\)" nil nil (1 'change-log-list-face)))
     ;;
     ;; Function or variable names.
-    ("^\t(\\([^) ,:\n]+\\)"
+    ("^\t(\\([^) ,\n]+\\)"
      (1 'change-log-list-face)
-     ("\\=, *\\([^) ,:\n]+\\)" nil nil (1 'change-log-list-face)))
+     ("\\=, *\\([^) ,\n]+\\)" nil nil (1 'change-log-list-face)))
     ;;
     ;; Conditionals.
     ("\\[!?\\([^]\n]+\\)\\]\\(:\\| (\\)" (1 'change-log-conditionals-face))
--- a/lisp/descr-text.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/descr-text.el	Mon May 24 23:42:52 2004 +0000
@@ -111,7 +111,8 @@
 			 (setq key (pop properties)
 			       val (pop properties)
 			       len 0)
-			 (unless (or (memq key '(category face font-lock-face))
+			 (unless (or (memq key '(category face font-lock-face
+                                                 syntax-table))
 				     (widgetp val))
 			   (setq val (pp-to-string val)
 				 len (length val)))
@@ -134,7 +135,15 @@
 			    :notify `(lambda (&rest ignore)
 				       (describe-face ',value))
 			    (format "%S" value)))
-	    ((widgetp value)
+	    ((eq key 'syntax-table)
+	     (widget-create 'push-button
+                            :tag "show"
+                            :action (lambda (widget &optional event)
+                                      (with-output-to-temp-buffer
+                                          "*Pp Eval Output*"
+                                        (pp (widget-get widget :value))))
+                            value))
+            ((widgetp value)
 	     (describe-text-widget value))
 	    (t
 	     (widget-insert value))))
@@ -476,7 +485,7 @@
 			  (encode-char char 'ucs))))
     (setq item-list
 	  `(("character"
-	    ,(format "%s (0%o, %d, 0x%x%s)" 
+	    ,(format "%s (0%o, %d, 0x%x%s)"
 		     (apply 'propertize (if (not multibyte-p)
 					    (single-key-description char)
 					  (if (< char 128)
@@ -598,7 +607,7 @@
 
 	(save-excursion
 	  (goto-char (point-min))
-	  (search-forward "character: ")
+	  (re-search-forward "character:[ \t\n]+")
 	  (setq pos (point)))
 	(if overlays
 	    (mapc #'(lambda (props)
--- a/lisp/info.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/info.el	Mon May 24 23:42:52 2004 +0000
@@ -863,9 +863,17 @@
 	      (let ((pos (Info-find-node-in-buffer regexp)))
 		(when pos
 		  (goto-char pos)
-		  (throw 'foo t))
-                ;; No such anchor in tag table or node in tag table or file
-		(error "No such node or anchor: %s" nodename)))
+		  (throw 'foo t)))
+
+              (when (string-match "\\([^.]+\\)\\." nodename)
+                (let (Info-point-loc)
+                  (Info-find-node-2
+                   filename (match-string 1 nodename) no-going-back))
+                (widen)
+                (throw 'foo t))
+
+              ;; No such anchor in tag table or node in tag table or file
+              (error "No such node or anchor: %s" nodename))
 
 	    (Info-select-node)
 	    (goto-char (point-min))
@@ -1075,7 +1083,7 @@
     (goto-char (point-min))
     ;; Remove duplicate headings in the same menu.
     (while (search-forward "\n* Menu:" nil t)
-      (setq limit (save-excursion (search-forward "\n" nil t)))
+      (setq limit (save-excursion (search-forward "\n\^_" nil t)))
       ;; Look for the next heading to unify.
       (while (re-search-forward "^\\(\\w.*\\)\n\\*" limit t)
 	(let ((name (match-string 1))
@@ -1286,7 +1294,8 @@
 	(let ((new-history (list Info-current-file Info-current-node)))
 	  (setq Info-history-list
 		(cons new-history (delete new-history Info-history-list))))
-	(Info-fontify-node)
+	(if (not (eq Info-fontify-maximum-menu-size nil))
+            (Info-fontify-node))
 	(Info-display-images-node)
 	(Info-hide-cookies-node)
 	(run-hooks 'Info-selection-hook)))))
@@ -1646,7 +1655,7 @@
       (let ((inhibit-read-only t))
         (erase-buffer)
         (goto-char (point-min))
-        (insert "\n\nFile: history Node: Top, Up: (dir)\n\n")
+        (insert "\n\^_\nFile: history Node: Top, Up: (dir)\n\n")
         (insert "Recently Visited Nodes\n**********************\n\n")
         (insert "* Menu:\n\n")
         (let ((hl (delete '("history" "Top") Info-history-list)))
@@ -1673,7 +1682,7 @@
             (node-list (Info-build-toc curr-file)))
         (erase-buffer)
         (goto-char (point-min))
-        (insert "\n\nFile: toc Node: Top, Up: (dir)\n\n")
+        (insert "\n\^_\nFile: toc Node: Top, Up: (dir)\n\n")
         (insert "Table of Contents\n*****************\n\n")
         (insert "*Note Top::\n")
         (Info-insert-toc
@@ -1682,7 +1691,7 @@
       (if (not (bobp))
           (let ((Info-hide-note-references 'hide)
                 (Info-fontify-visited-nodes nil))
-            (setq Info-current-node "Top")
+            (setq Info-current-file "toc" Info-current-node "Top")
             (Info-fontify-node)))
       (goto-char (point-min))
       (if (setq p (search-forward (concat "*Note " curr-node ":") nil t))
@@ -1707,16 +1716,18 @@
   (if (equal file "dir")
       (error "Table of contents for Info directory is not supported yet"))
   (with-temp-buffer
-    (let ((default-directory (or (and (stringp file)
-                                      (file-name-directory
-                                       (setq file (Info-find-file file))))
-                                 default-directory))
-          (sections '(("Top" "Top")))
-          nodes subfiles)
-      (while (or file subfiles)
-        (or file (message "Searching subfile %s..." (car subfiles)))
+    (let* ((default-directory (or (and (stringp file)
+                                       (file-name-directory
+                                        (setq file (Info-find-file file))))
+                                  default-directory))
+           (main-file file)
+           (sections '(("Top" "Top")))
+           nodes subfiles)
+      (while (or main-file subfiles)
+        (or main-file (message "Searching subfile %s..." (car subfiles)))
         (erase-buffer)
-        (info-insert-file-contents (or file (car subfiles)))
+        (info-insert-file-contents (or main-file (car subfiles)))
+        (goto-char (point-min))
         (while (and (search-forward "\n\^_\nFile:" nil 'move)
                     (search-forward "Node: " nil 'move))
           (let ((nodename (substring-no-properties (Info-following-node-name)))
@@ -1724,7 +1735,7 @@
                               (point-max)) 2))
                 (section "Top")
                 menu-items)
-            (when (and (not (string-match "\\<index\\>" nodename))
+            (when (and (not (Info-index-node nodename file))
                        (re-search-forward "^\\* Menu:" bound t))
               (forward-line 1)
               (beginning-of-line)
@@ -1756,7 +1767,7 @@
                                     (nreverse menu-items))
                               nodes))
             (goto-char bound)))
-        (if file
+        (if main-file
             (save-excursion
               (goto-char (point-min))
               (if (search-forward "\n\^_\nIndirect:" nil t)
@@ -1765,7 +1776,7 @@
                       (setq subfiles (cons (match-string-no-properties 1)
                                            subfiles)))))
               (setq subfiles (nreverse subfiles)
-                    file nil))
+                    main-file nil))
           (setq subfiles (cdr subfiles))))
       (message "")
       (nreverse nodes))))
@@ -1907,6 +1918,7 @@
 
 (defvar Info-complete-menu-buffer)
 (defvar Info-complete-next-re nil)
+(defvar Info-complete-nodes nil)
 (defvar Info-complete-cache nil)
 
 (defconst Info-node-spec-re
@@ -1920,6 +1932,9 @@
   ;; - `Info-complete-next-re' which, if non-nil, indicates that we should
   ;; also look for menu items in subsequent nodes as long as those
   ;; nodes' names match `Info-complete-next-re'.  This feature is currently
+  ;; not used.
+  ;; - `Info-complete-nodes' which, if non-nil, indicates that we should
+  ;; also look for menu items in these nodes.  This feature is currently
   ;; only used for completion in Info-index.
 
   ;; Note that `Info-complete-menu-buffer' could be current already,
@@ -1943,6 +1958,7 @@
 	  (if (and (equal (nth 0 Info-complete-cache) Info-current-file)
 		   (equal (nth 1 Info-complete-cache) Info-current-node)
 		   (equal (nth 2 Info-complete-cache) Info-complete-next-re)
+		   (equal (nth 5 Info-complete-cache) Info-complete-nodes)
 		   (let ((prev (nth 3 Info-complete-cache)))
 		     (eq t (compare-strings string 0 (length prev)
 					    prev 0 nil t))))
@@ -1955,9 +1971,12 @@
 		    (push (match-string-no-properties 1)
 			  completions))
 		  ;; Check subsequent nodes if applicable.
-		  (and Info-complete-next-re
-		       (setq nextnode (Info-extract-pointer "next" t))
-		       (string-match Info-complete-next-re nextnode)))
+		  (or (and Info-complete-next-re
+		           (setq nextnode (Info-extract-pointer "next" t))
+		           (string-match Info-complete-next-re nextnode))
+		      (and Info-complete-nodes
+		           (setq Info-complete-nodes (cdr Info-complete-nodes)
+		                 nextnode (car Info-complete-nodes)))))
 	      (Info-goto-node nextnode))
 	    ;; Go back to the start node (for the next completion).
 	    (unless (equal Info-current-node orignode)
@@ -1965,7 +1984,8 @@
 	    ;; Update the cache.
 	    (set (make-local-variable 'Info-complete-cache)
 		 (list Info-current-file Info-current-node
-		       Info-complete-next-re string completions)))
+		       Info-complete-next-re string completions
+		       Info-complete-nodes)))
 	  (if action
 	      (all-completions string completions predicate)
 	    (try-completion string completions predicate)))))))
@@ -2034,7 +2054,7 @@
 	    (error "No such item in menu"))
 	(beginning-of-line)
 	(forward-char 2)
-	(Info-extract-menu-node-name)))))
+	(Info-extract-menu-node-name nil (Info-index-node))))))
 
 ;; If COUNT is nil, use the last item in the menu.
 (defun Info-extract-menu-counting (count)
@@ -2049,7 +2069,7 @@
 		(error "Too few items in menu"))
 	  (while (search-forward "\n* " nil t)
 	    nil))
-	(Info-extract-menu-node-name)))))
+	(Info-extract-menu-node-name nil (Info-index-node))))))
 
 (defun Info-nth-menu-item ()
   "Go to the node of the Nth menu item.
@@ -2076,7 +2096,7 @@
     ;; move forward until we can't go any farther.
     (while (Info-forward-node t t) nil)
     ;; Then keep moving down to last subnode, unless we reach an index.
-    (while (and (not (string-match "\\<index\\>" Info-current-node))
+    (while (and (not (Info-index-node))
 		(save-excursion (search-forward "\n* Menu:" nil t)))
       (Info-goto-node (Info-extract-menu-counting nil)))))
 
@@ -2092,7 +2112,7 @@
     ;;     3. next node is up and next
     (cond ((and (not not-down)
 		(save-excursion (search-forward "\n* menu:" nil t))
-		(not (string-match "\\<index\\>" Info-current-node)))
+		(not (Info-index-node)))
 	   (Info-goto-node (Info-extract-menu-counting 1))
 	   t)
 	  ((save-excursion (search-backward "next:" nil t))
@@ -2130,7 +2150,7 @@
 	   ;; go down to find the last subnode*.
 	   (Info-prev)
 	   (let (Info-history)
-	     (while (and (not (string-match "\\<index\\>" Info-current-node))
+	     (while (and (not (Info-index-node))
 			 (save-excursion (search-forward "\n* Menu:" nil t)))
 	       (Info-goto-node (Info-extract-menu-counting nil)))))
 	  (t
@@ -2321,24 +2341,96 @@
 	(if recur
 	    (error "No cross references in this node")
 	  (Info-prev-reference t)))))
+
+(defvar Info-index-nodes nil
+  "Alist of cached index node names of visited Info files.
+Each element has the form (INFO-FILE INDEX-NODE-NAMES-LIST).")
+
+(defun Info-index-nodes (&optional file)
+  "Return a list of names of all index nodes in Info FILE.
+If FILE is omitted, it defaults to the current Info file.
+First look in a list of cached index node names.  Then scan Info file
+and its subfiles for nodes with index cookie.  Then try index nodes
+starting from the first node in the top level menu whose name
+contains the word \"Index\", plus any immediately following nodes
+whose names also contain the word \"Index\"."
+  (or file (setq file Info-current-file))
+  (or (assoc file Info-index-nodes)
+      ;; Skip virtual Info files
+      (member file '("dir" "history" "toc" "apropos"))
+      ;; Find nodes with index cookie
+      (let* ((default-directory (or (and (stringp file)
+                                         (file-name-directory
+                                          (setq file (Info-find-file file))))
+                                    default-directory))
+             (main-file file)
+             (Info-fontify-maximum-menu-size nil)
+             subfiles nodes node Info-history Info-history-list)
+        (with-temp-buffer
+          (while (or main-file subfiles)
+            (erase-buffer)
+            (info-insert-file-contents (or main-file (car subfiles)))
+            (goto-char (point-min))
+            (while (search-forward "\0\10[index\0\10]" nil 'move)
+              (save-excursion
+                (re-search-backward "^\^_")
+                (search-forward "Node: ")
+                (setq nodes (cons (Info-following-node-name) nodes))))
+            (if main-file
+                (save-excursion
+                  (goto-char (point-min))
+                  (if (search-forward "\n\^_\nIndirect:" nil t)
+                      (let ((bound (save-excursion (search-forward "\n\^_" nil t))))
+                        (while (re-search-forward "^\\(.*\\): [0-9]+$" bound t)
+                          (setq subfiles (cons (match-string-no-properties 1)
+                                               subfiles)))))
+                  (setq subfiles (nreverse subfiles)
+                        main-file nil))
+              (setq subfiles (cdr subfiles)))))
+        (if nodes
+            (setq nodes (nreverse nodes)
+                  Info-index-nodes (cons (cons file nodes) Info-index-nodes)))
+        nodes)
+      ;; Find nodes with string "Index" in node names
+      (let ((Info-fontify-maximum-menu-size nil)
+            (case-fold-search t)
+            nodes node Info-history Info-history-list)
+        (with-temp-buffer
+          (Info-mode)
+          (Info-find-node file "Top")
+          (when (and (search-forward "\n* menu:" nil t)
+                     (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t))
+            (goto-char (match-beginning 1))
+            (setq nodes (list (Info-extract-menu-node-name)))
+            (Info-goto-node (car nodes))
+            (while (and (setq node (Info-extract-pointer "next" t))
+                        (string-match "\\<Index\\>" node))
+              (setq nodes (cons node nodes))
+              (Info-goto-node node))))
+        (if nodes
+            (setq nodes (nreverse nodes)
+                  Info-index-nodes (cons (cons file nodes) Info-index-nodes)))
+        nodes)
+      ;; Info file has no index nodes
+      (setq Info-index-nodes (cons (cons file nil)
+                                   Info-index-nodes)))
+  (cdr (assoc file Info-index-nodes)))
+
+(defun Info-index-node (&optional node file)
+  "Return non-nil value if NODE is an index node.
+If NODE is nil, check the current Info node.
+If FILE is nil, check the current Info file."
+  (member (or node Info-current-node) (Info-index-nodes file)))
 
 (defun Info-goto-index ()
-  (Info-goto-node "Top")
-  (or (search-forward "\n* menu:" nil t)
-      (error "No index"))
-  (or (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t)
-      (error "No index"))
-  (goto-char (match-beginning 1))
-  ;; Protect Info-history so that the current node (Top) is not added to it.
-  (let ((Info-history nil))
-    (Info-goto-node (Info-extract-menu-node-name))))
+  "Go to the first index node."
+  (let ((node (car (Info-index-nodes))))
+    (or node (error "No index"))
+    (Info-goto-node node)))
 
 ;;;###autoload
 (defun Info-index (topic)
   "Look up a string TOPIC in the index for this file.
-The index is defined as the first node in the top level menu whose
-name contains the word \"Index\", plus any immediately following
-nodes whose names also contain the word \"Index\".
 If there are no exact matches to the specified topic, this chooses
 the first match which is a case-insensitive substring of a topic.
 Use the \\<Info-mode-map>\\[Info-index-next] command to see the other matches.
@@ -2346,7 +2438,8 @@
   (interactive
    (list
     (let ((Info-complete-menu-buffer (clone-buffer))
-	  (Info-complete-next-re "\\<Index\\>"))
+	  (Info-complete-nodes (Info-index-nodes))
+	  (Info-history-list nil))
       (if (equal Info-current-file "dir")
 	  (error "The Info directory node has no index; use m to select a manual"))
       (unwind-protect
@@ -2359,7 +2452,8 @@
   (let ((orignode Info-current-node)
 	(pattern (format "\n\\* +\\([^\n]*%s[^\n]*\\):[ \t]+\\([^\n]*\\)\\.\\(?:[ \t\n]*(line +\\([0-9]+\\))\\)?"
 			 (regexp-quote topic)))
-	node
+	node (nodes (Info-index-nodes))
+	(ohist-list Info-history-list)
 	(case-fold-search t))
     (Info-goto-index)
     (or (equal topic "")
@@ -2381,8 +2475,7 @@
 			      (string-to-number (concat "0"
 							(match-string 3))))
 			matches))
-		(and (setq node (Info-extract-pointer "next" t))
-		     (string-match "\\<Index\\>" node)))
+		(setq nodes (cdr nodes) node (car nodes)))
 	    (Info-goto-node node))
 	  (or matches
 	      (progn
@@ -2392,6 +2485,7 @@
 	  (while (setq found (assoc topic matches))
 	    (setq exact (cons found exact)
 		  matches (delq found matches)))
+          (setq Info-history-list ohist-list)
 	  (setq Info-index-alternatives (nconc exact (nreverse matches)))
 	  (Info-index-next 0)))))
 
@@ -2454,10 +2548,8 @@
 	  (ohist-list Info-history-list)
 	  (current-node Info-current-node)
 	  (current-file Info-current-file)
-	  manuals matches node)
-      (let ((Info-fontify-maximum-menu-size 0)
-	    Info-use-header-lines
-	    Info-hide-note-references)
+	  manuals matches node nodes)
+      (let ((Info-fontify-maximum-menu-size nil))
 	(Info-directory)
 	(message "Searching indices...")
 	(goto-char (point-min))
@@ -2466,25 +2558,22 @@
 	  (add-to-list 'manuals (match-string 1)))
 	(dolist (manual manuals)
 	  (message "Searching %s" manual)
-	  (condition-case nil
-	      (save-excursion
-		(Info-find-node manual "Top")
-		(when (re-search-forward "\n\\* \\(.*\\<Index\\>\\)" nil t)
-		  (goto-char (match-beginning 1))
-		  (Info-goto-node (Info-extract-menu-node-name))
-		  (while
-		      (progn
-			(goto-char (point-min))
-			(while (re-search-forward pattern nil t)
-			  (add-to-list 'matches
-				       (list manual
-					     (match-string-no-properties 1)
-					     (match-string-no-properties 2)
-					     (match-string-no-properties 3))))
-			(and (setq node (Info-extract-pointer "next" t))
-			     (string-match "\\<Index\\>" node)))
-		    (Info-goto-node node))))
-	    (error nil))))
+	  (if (setq nodes (Info-index-nodes (Info-find-file manual)))
+              (condition-case nil
+                  (save-excursion
+                    (Info-find-node manual (car nodes))
+                    (while
+                        (progn
+                          (goto-char (point-min))
+                          (while (re-search-forward pattern nil t)
+                            (add-to-list 'matches
+                                         (list manual
+                                               (match-string-no-properties 1)
+                                               (match-string-no-properties 2)
+                                               (match-string-no-properties 3))))
+                          (setq nodes (cdr nodes) node (car nodes)))
+                      (Info-goto-node node)))
+                (error nil)))))
       (Info-goto-node (concat "(" current-file ")" current-node))
       (setq Info-history ohist
 	    Info-history-list ohist-list)
@@ -2493,7 +2582,7 @@
 	  (message "No matches found")
 	(with-current-buffer (get-buffer-create " *info-apropos*")
 	  (erase-buffer)
-	  (insert "\n\nFile: apropos, Node: Index, Up: (dir)\n")
+	  (insert "\n\^_\nFile: apropos, Node: Index, Up: (dir)\n")
 	  (insert "* Menu: \nNodes whose indices contain \"" string "\"\n\n")
 	  (dolist (entry matches)
 	    (insert
@@ -2629,8 +2718,7 @@
      ((Info-get-token (point) "\\* +" "\\* +\\(.*\\): ")
       (beginning-of-line)
       (forward-char 2)
-      (setq node (Info-extract-menu-node-name
-                  nil (string-match "\\<index\\>" Info-current-node)))
+      (setq node (Info-extract-menu-node-name nil (Info-index-node)))
       (Info-goto-node node fork))
      ((setq node (Info-get-token (point) "Up: " "Up: \\([^,\n\t]*\\)"))
       (Info-goto-node node fork))
@@ -3072,8 +3160,9 @@
     ;; Bind Info-history to nil, to prevent the index nodes from
     ;; getting into the node history.
     (let ((Info-history nil)
-	  node)
-      (Info-goto-node (Info-extract-menu-node-name))
+          (Info-history-list nil)
+	  node (nodes (Info-index-nodes)))
+      (Info-goto-node (car nodes))
       (while
 	  (progn
 	    (goto-char (point-min))
@@ -3083,8 +3172,7 @@
 				(match-string-no-properties 2)
 				0)
 			  where)))
-	    (and (setq node (Info-extract-pointer "next" t))
-		 (string-match "\\<Index\\>" node)))
+	    (and (setq nodes (cdr nodes) node (car nodes))))
 	(Info-goto-node node)))
     where))
 
@@ -3111,7 +3199,7 @@
 	  ;; Bind Info-history to nil, to prevent the last Index node
 	  ;; visited by Info-find-emacs-command-nodes from being
 	  ;; pushed onto the history.
-	  (let ((Info-history nil))
+	  (let ((Info-history nil) (Info-history-list nil))
 	    (Info-find-node (car (car where))
 			    (car (cdr (car where)))))
 	  (if (> num-matches 1)
@@ -3448,7 +3536,7 @@
       (goto-char (point-min))
       (when (and (or not-fontified-p fontify-visited-p)
                  (search-forward "\n* Menu:" nil t)
-                 (not (string-match "\\<Index\\>" Info-current-node))
+                 (not (Info-index-node))
                  ;; Don't take time to annotate huge menus
                  (< (- (point-max) (point)) Info-fontify-maximum-menu-size))
         (let ((n 0)
@@ -3537,7 +3625,7 @@
 
       ;; Hide index line numbers
       (goto-char (point-min))
-      (when (and not-fontified-p (string-match "\\<Index\\>" Info-current-node))
+      (when (and not-fontified-p (Info-index-node))
         (while (re-search-forward "[ \t\n]*(line +[0-9]+)" nil t)
           (put-text-property (match-beginning 0) (match-end 0)
                              'invisible t)))
--- a/lisp/net/browse-url.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/net/browse-url.el	Mon May 24 23:42:52 2004 +0000
@@ -577,13 +577,21 @@
 
 (defun browse-url-interactive-arg (prompt)
   "Read a URL from the minibuffer, prompting with PROMPT.
-Default to the URL at or before point.  If invoked with a mouse button,
-set point to the position clicked first.  Return a list for use in
-`interactive' containing the URL and `browse-url-new-window-flag' or its
+If `transient-mark-mode' is non-nil and the mark is active,
+defaults to the current region, else to the URL at or before
+point.  If invoked with a mouse button, set point to the
+position clicked first.  Return a list for use in `interactive'
+containing the URL and `browse-url-new-window-flag' or its
 negation if a prefix argument was given."
   (let ((event (elt (this-command-keys) 0)))
     (and (listp event) (mouse-set-point event)))
-  (list (read-string prompt (browse-url-url-at-point))
+  (list (read-string prompt (or (and transient-mark-mode mark-active
+				     ;; rfc2396 Appendix E.
+				     (replace-regexp-in-string
+				      "[\t\r\f\n ]+" ""
+				      (buffer-substring-no-properties
+				       (region-beginning) (region-end))))
+				(browse-url-url-at-point)))
 	(not (eq (null browse-url-new-window-flag)
 		 (null current-prefix-arg)))))
 
--- a/lisp/progmodes/gdb-ui.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/progmodes/gdb-ui.el	Mon May 24 23:42:52 2004 +0000
@@ -63,7 +63,8 @@
 (defvar gdb-overlay-arrow-position nil)
 (defvar gdb-variables '()
   "A list of variables that are local to the GUD buffer.")
-
+(defvar gdb-server-prefix nil)
+ 
 ;;;###autoload
 (defun gdba (command-line)
   "Run gdb on program FILE in buffer *gud-FILE*.
@@ -73,7 +74,7 @@
 If `gdb-many-windows' is nil (the default value) then gdb just
 pops up the GUD buffer unless `gdb-show-main' is t. In this case
 it starts with two windows: one displaying the GUD buffer and the
-other with the source file with the main routine of the debugee.
+other with the source file with the main routine of the inferior.
 
 If `gdb-many-windows' is t, regardless of the value of
 `gdb-show-main', the layout below will appear unless
@@ -100,7 +101,7 @@
                                   |
                                   |
 ---------------------------------------------------------------------
- Source buffer                    | Input/Output (of debugee) buffer
+ Source buffer                    | Input/Output (of inferior) buffer
                                   | (comint-mode)
                                   |
                                   |
@@ -180,6 +181,11 @@
   (setq gdb-var-list nil)
   (setq gdb-var-changed nil)
   (setq gdb-first-prompt nil)
+  (setq gdb-prompting nil)
+  (setq gdb-current-item nil)
+  (setq gdb-pending-triggers nil)
+  (setq gdb-output-sink 'user)
+  (setq gdb-server-prefix "server ")
   ;;
   (mapc 'make-local-variable gdb-variables)
   (setq gdb-buffer-type 'gdba)
@@ -215,7 +221,10 @@
 	(if (string-equal expr (car var)) (throw 'already-watched nil)))
       (set-text-properties 0 (length expr) nil expr)
       (gdb-enqueue-input
-       (list (concat "server interpreter mi \"-var-create - * "  expr "\"\n")
+       (list 
+	(if (eq gud-minor-mode 'gdba)
+	    (concat "server interpreter mi \"-var-create - * "  expr "\"\n")
+	  (concat"-var-create - * "  expr "\n"))
 	     `(lambda () (gdb-var-create-handler ,expr))))))
   (select-window (get-buffer-window gud-comint-buffer 'visible)))
 
@@ -308,12 +317,11 @@
        (setq gdb-var-list (nreverse var-list))))))
 
 (defun gdb-var-update ()
-  (if (not (member 'gdb-var-update (gdb-get-pending-triggers)))
+  (if (not (member 'gdb-var-update gdb-pending-triggers))
       (progn
 	(gdb-enqueue-input (list "server interpreter mi \"-var-update *\"\n"
 				 'gdb-var-update-handler))
-	(gdb-set-pending-triggers (cons 'gdb-var-update
-					(gdb-get-pending-triggers))))))
+	(push 'gdb-var-update gdb-pending-triggers))))
 
 (defconst gdb-var-update-regexp "name=\"\\(.*?\\)\"")
 
@@ -327,8 +335,8 @@
 			 varnum "\"\n")
 		     `(lambda () (gdb-var-evaluate-expression-handler
 				  ,varnum t)))))))
-  (gdb-set-pending-triggers
-   (delq 'gdb-var-update (gdb-get-pending-triggers))))
+  (setq gdb-pending-triggers
+   (delq 'gdb-var-update gdb-pending-triggers)))
 
 (defun gdb-var-delete ()
   "Delete watched expression from the speedbar."
@@ -378,43 +386,17 @@
 	   (if (string-match (concat token "\\.") (nth 1 var))
 	       (setq gdb-var-list (delq var gdb-var-list))))
 	 (setq gdb-var-changed t))))
-
 
-;; ======================================================================
-;;
-;; In this world, there are gdb variables (of unspecified
-;; representation) and buffers associated with those objects.
-;; The list of  variables is built up by the expansions of
-;; def-gdb-variable
-
-(defmacro def-gdb-var (root-symbol &optional default doc)
-  (let* ((root (symbol-name root-symbol))
-	 (accessor (intern (concat "gdb-get-" root)))
-	 (setter (intern (concat "gdb-set-" root)))
-	 (name (intern (concat "gdb-" root))))
-    `(progn
-       (defvar ,name ,default ,doc)
-       (if (not (memq ',name gdb-variables))
-	   (push ',name gdb-variables))
-       (defun ,accessor ()
-	 (buffer-local-value ',name gud-comint-buffer))
-       (defun ,setter (val)
-	 (with-current-buffer gud-comint-buffer
-	   (setq ,name val))))))
-
-(def-gdb-var buffer-type nil
+(defvar gdb-buffer-type nil
   "One of the symbols bound in `gdb-buffer-rules'.")
 
-(def-gdb-var burst ""
-  "A string of characters from gdb that have not yet been processed.")
-
-(def-gdb-var input-queue ()
+(defvar gdb-input-queue ()
   "A list of gdb command objects.")
 
-(def-gdb-var prompting nil
+(defvar gdb-prompting nil
   "True when gdb is idle with no pending input.")
 
-(def-gdb-var output-sink 'user
+(defvar gdb-output-sink 'user
   "The disposition of the output of the current gdb command.
 Possible values are these symbols:
 
@@ -432,12 +414,14 @@
 	     gdb mode sends to gdb on its own behalf.
     post-emacs -- ignore output until the prompt annotation is
 		  received, then go to USER disposition.
-")
 
-(def-gdb-var current-item nil
+gdba (gdb-ui.el) uses all five values,  gdbmi (gdb-mi.el) only two
+(user and emacs).")
+
+(defvar gdb-current-item nil
   "The most recent command item sent to gdb.")
 
-(def-gdb-var pending-triggers '()
+(defvar gdb-pending-triggers '()
   "A list of trigger functions that have run later than their output
 handlers.")
 
@@ -481,8 +465,8 @@
 	  (set (make-local-variable 'gdb-buffer-type) key)
 	  (if (cdr (cdr rules))
 	      (funcall (car (cdr (cdr rules)))))
-	  (set (make-local-variable 'gud-comint-buffer) gud-comint-buffer)
-	  (set (make-local-variable 'gud-minor-mode) 'gdba)
+	  (set (make-local-variable 'gud-minor-mode) 
+	       (with-current-buffer gud-comint-buffer gud-minor-mode))
 	  (set (make-local-variable 'tool-bar-map) gud-tool-bar-map)
 	  new))))
 
@@ -550,7 +534,7 @@
     (define-key map "\C-c\C-d" 'gdb-inferior-io-eof)
     map))
 
-(define-derived-mode gdb-inferior-io-mode comint-mode "Debuggee I/O"
+(define-derived-mode gdb-inferior-io-mode comint-mode "Inferior I/O"
   "Major mode for gdb inferior-io."
   :syntax-table nil :abbrev-table nil
   ;; We want to use comint because it has various nifty and familiar
@@ -622,20 +606,18 @@
 ;; is a query, or other non-top-level prompt.
 
 (defun gdb-enqueue-input (item)
-  (if (gdb-get-prompting)
+  (if gdb-prompting
       (progn
 	(gdb-send-item item)
-	(gdb-set-prompting nil))
-    (gdb-set-input-queue
-     (cons item (gdb-get-input-queue)))))
+	(setq gdb-prompting nil))
+    (push item gdb-input-queue)))
 
 (defun gdb-dequeue-input ()
-  (let ((queue (gdb-get-input-queue)))
+  (let ((queue gdb-input-queue))
     (and queue
 	 (let ((last (car (last queue))))
-	   (unless (nbutlast queue) (gdb-set-input-queue '()))
+	   (unless (nbutlast queue) (setq gdb-input-queue '()))
 	   last))))
-
 
 ;;
 ;; output -- things gdb prints to emacs
@@ -664,6 +646,7 @@
     ("commands" gdb-subprompt)
     ("overload-choice" gdb-subprompt)
     ("query" gdb-subprompt)
+    ;; Need this prompt for GDB 6.1
     ("nquery" gdb-subprompt)
     ("prompt-for-continue" gdb-subprompt)
     ("post-prompt" gdb-post-prompt)
@@ -693,87 +676,95 @@
   (setq gdb-view-source t)
   ;; cover for auto-display output which comes *before*
   ;; stopped annotation
-  (if (eq (gdb-get-output-sink) 'inferior) (gdb-set-output-sink 'user)))
+  (if (eq gdb-output-sink 'inferior) (setq gdb-output-sink 'user)))
 
 (defun gdb-send-item (item)
   (if gdb-enable-debug-log (push (cons 'send item) gdb-debug-log))
-  (gdb-set-current-item item)
-  (if (stringp item)
-      (progn
-	(gdb-set-output-sink 'user)
-	(process-send-string (get-buffer-process gud-comint-buffer) item))
-    (progn
+  (setq gdb-current-item item)
+  (with-current-buffer gud-comint-buffer
+    (if (eq gud-minor-mode 'gdba)
+	(progn
+	  (if (stringp item)
+	      (progn
+		(setq gdb-output-sink 'user)
+		(process-send-string (get-buffer-process gud-comint-buffer) item))
+	    (progn
+	      (gdb-clear-partial-output)
+	      (setq gdb-output-sink 'pre-emacs)
+	      (process-send-string (get-buffer-process gud-comint-buffer)
+				   (car item)))))
+      ; case: eq gud-minor-mode 'gdbmi
       (gdb-clear-partial-output)
-      (gdb-set-output-sink 'pre-emacs)
+      (setq gdb-output-sink 'emacs)
       (process-send-string (get-buffer-process gud-comint-buffer)
-			   (car item)))))
+			 (car item)))))
 
 (defun gdb-pre-prompt (ignored)
   "An annotation handler for `pre-prompt'. This terminates the collection of
 output from a previous command if that happens to be in effect."
-  (let ((sink (gdb-get-output-sink)))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'user) t)
      ((eq sink 'emacs)
-      (gdb-set-output-sink 'post-emacs))
+      (setq gdb-output-sink 'post-emacs))
      (t
-      (gdb-set-output-sink 'user)
+      (setq gdb-output-sink 'user)
       (error "Phase error in gdb-pre-prompt (got %s)" sink)))))
 
 (defun gdb-prompt (ignored)
   "An annotation handler for `prompt'.
 This sends the next command (if any) to gdb."
   (when gdb-first-prompt (gdb-ann3))
-  (let ((sink (gdb-get-output-sink)))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'user) t)
      ((eq sink 'post-emacs)
-      (gdb-set-output-sink 'user)
+      (setq gdb-output-sink 'user)
       (let ((handler
-	     (car (cdr (gdb-get-current-item)))))
+	     (car (cdr gdb-current-item))))
 	(with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
 	  (funcall handler))))
      (t
-      (gdb-set-output-sink 'user)
+      (setq gdb-output-sink 'user)
       (error "Phase error in gdb-prompt (got %s)" sink))))
   (let ((input (gdb-dequeue-input)))
     (if input
 	(gdb-send-item input)
       (progn
-	(gdb-set-prompting t)
+	(setq gdb-prompting t)
 	(gud-display-frame)))))
 
 (defun gdb-subprompt (ignored)
   "An annotation handler for non-top-level prompts."
-  (gdb-set-prompting t))
+  (setq gdb-prompting t))
 
 (defun gdb-starting (ignored)
   "An annotation handler for `starting'.  This says that I/O for the
 subprocess is now the program being debugged, not GDB."
-  (let ((sink (gdb-get-output-sink)))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'user)
       (progn
 	(setq gud-running t)
 	(if gdb-use-inferior-io-buffer
-	    (gdb-set-output-sink 'inferior))))
+	    (setq gdb-output-sink 'inferior))))
      (t (error "Unexpected `starting' annotation")))))
 
 (defun gdb-stopping (ignored)
   "An annotation handler for `exited' and other annotations which say that I/O
 for the subprocess is now GDB, not the program being debugged."
   (if gdb-use-inferior-io-buffer
-      (let ((sink (gdb-get-output-sink)))
+      (let ((sink gdb-output-sink))
 	(cond
 	 ((eq sink 'inferior)
-	  (gdb-set-output-sink 'user))
+	  (setq gdb-output-sink 'user))
 	 (t (error "Unexpected stopping annotation"))))))
 
 (defun gdb-frame-begin (ignored)
-  (let ((sink (gdb-get-output-sink)))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'inferior)
-      (gdb-set-output-sink 'user))
+      (setq gdb-output-sink 'user))
      ((eq sink 'user) t)
      ((eq sink 'emacs) t)
      (t (error "Unexpected frame-begin annotation (%S)" sink)))))
@@ -782,17 +773,17 @@
   "An annotation handler for `stopped'.  It is just like gdb-stopping, except
 that if we already set the output sink to 'user in gdb-stopping, that is fine."
   (setq gud-running nil)
-  (let ((sink (gdb-get-output-sink)))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'inferior)
-      (gdb-set-output-sink 'user))
+      (setq gdb-output-sink 'user))
      ((eq sink 'user) t)
      (t (error "Unexpected stopped annotation")))))
 
 (defun gdb-post-prompt (ignored)
   "An annotation handler for `post-prompt'. This begins the collection of
 output from the current command if that happens to be appropriate."
-  (if (not (gdb-get-pending-triggers))
+  (if (not gdb-pending-triggers)
       (progn
 	(gdb-get-current-frame)
 	(gdb-invalidate-frames)
@@ -809,13 +800,13 @@
 	      (dolist (var gdb-var-list)
 		(setcar (nthcdr 5 var) nil))))
 	  (gdb-var-update))))
-  (let ((sink (gdb-get-output-sink)))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'user) t)
      ((eq sink 'pre-emacs)
-      (gdb-set-output-sink 'emacs))
+      (setq gdb-output-sink 'emacs))
      (t
-      (gdb-set-output-sink 'user)
+      (setq gdb-output-sink 'user)
       (error "Phase error in gdb-post-prompt (got %s)" sink)))))
 
 (defun gud-gdba-marker-filter (string)
@@ -877,7 +868,7 @@
     output))
 
 (defun gdb-concat-output (so-far new)
-  (let ((sink (gdb-get-output-sink )))
+  (let ((sink gdb-output-sink))
     (cond
      ((eq sink 'user) (concat so-far new))
      ((or (eq sink 'pre-emacs) (eq sink 'post-emacs)) so-far)
@@ -939,19 +930,17 @@
   `(defun ,name (&optional ignored)
      (if (and (,demand-predicate)
 	      (not (member ',name
-			   (gdb-get-pending-triggers))))
+			   gdb-pending-triggers)))
 	 (progn
 	   (gdb-enqueue-input
 	    (list ,gdb-command ',output-handler))
-	   (gdb-set-pending-triggers
-	    (cons ',name
-		  (gdb-get-pending-triggers)))))))
+	   (push ',name gdb-pending-triggers)))))
 
 (defmacro def-gdb-auto-update-handler (name trigger buf-key custom-defun)
   `(defun ,name ()
-     (gdb-set-pending-triggers
+     (setq gdb-pending-triggers
       (delq ',trigger
-	    (gdb-get-pending-triggers)))
+	    gdb-pending-triggers))
      (let ((buf (gdb-get-buffer ',buf-key)))
        (and buf
 	    (with-current-buffer buf
@@ -1083,7 +1072,7 @@
     (dolist (buffer (buffer-list))
       (with-current-buffer buffer
 	(if (and (eq gud-minor-mode 'gdba)
-		 (not (string-match "^\*" (buffer-name))))
+		 (not (string-match "\\`\\*.+\\*\\'" (buffer-name))))
 	    (gdb-remove-breakpoint-icons (point-min) (point-max)))))
     (with-current-buffer (gdb-get-buffer 'gdb-breakpoints-buffer)
       (save-excursion
@@ -1181,7 +1170,9 @@
   (setq mode-name "Breakpoints")
   (use-local-map gdb-breakpoints-mode-map)
   (setq buffer-read-only t)
-  (gdb-invalidate-breakpoints))
+  (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+      (gdb-invalidate-breakpoints)
+    (gdbmi-invalidate-breakpoints)))
 
 (defun gdb-toggle-breakpoint ()
   "Enable/disable the breakpoint at current line."
@@ -1194,8 +1185,8 @@
        (list
 	(concat
 	 (if (eq ?y (char-after (match-beginning 2)))
-	     "server disable "
-	   "server enable ")
+	     gdb-server-prefix "disable "
+	   gdb-server-prefix "enable ")
 	 (match-string 1) "\n")
 	'ignore)))))
 
@@ -1206,7 +1197,7 @@
   (if (not (looking-at "\\([0-9]+\\).*point\\s-*\\S-*\\s-*\\(.\\)"))
       (error "Not recognized as break/watchpoint line")
     (gdb-enqueue-input
-     (list (concat "server delete " (match-string 1) "\n") 'ignore))))
+     (list (concat gdb-server-prefix "delete " (match-string 1) "\n") 'ignore))))
 
 (defun gdb-goto-breakpoint ()
   "Display the breakpoint location specified at current line."
@@ -1299,7 +1290,9 @@
   (setq buffer-read-only t)
   (use-local-map gdb-frames-mode-map)
   (font-lock-mode -1)
-  (gdb-invalidate-frames))
+  (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+      (gdb-invalidate-frames)
+    (gdbmi-invalidate-frames)))
 
 (defun gdb-get-frame-number ()
   (save-excursion
@@ -1311,7 +1304,7 @@
   "Select the frame and display the relevant source."
   (interactive)
   (gdb-enqueue-input
-   (list (concat "server frame " (gdb-get-frame-number) "\n") 'ignore))
+   (list (concat gdb-server-prefix "frame " (gdb-get-frame-number) "\n") 'ignore))
   (gud-display-frame))
 
 (defun gdb-frames-mouse-select (event)
@@ -1329,7 +1322,7 @@
 
 (def-gdb-auto-updated-buffer gdb-threads-buffer
   gdb-invalidate-threads
-  "server info threads\n"
+  (concat gdb-server-prefix "info threads\n")
   gdb-info-threads-handler
   gdb-info-threads-custom)
 
@@ -1370,7 +1363,7 @@
 (defun gdb-threads-mode ()
   "Major mode for gdb frames.
 
-\\{gdb-frames-mode-map}"
+\\{gdb-threads-mode-map}"
   (setq major-mode 'gdb-threads-mode)
   (setq mode-name "Threads")
   (setq buffer-read-only t)
@@ -1404,7 +1397,7 @@
 
 (def-gdb-auto-updated-buffer gdb-registers-buffer
   gdb-invalidate-registers
-  "server info registers\n"
+  (concat gdb-server-prefix "info registers\n")
   gdb-info-registers-handler
   gdb-info-registers-custom)
 
@@ -1458,8 +1451,8 @@
 ;; Abbreviate for arrays and structures.
 ;; These can be expanded using gud-display.
 (defun gdb-info-locals-handler nil
-  (gdb-set-pending-triggers (delq 'gdb-invalidate-locals
-				  (gdb-get-pending-triggers)))
+  (setq gdb-pending-triggers (delq 'gdb-invalidate-locals
+				  gdb-pending-triggers))
   (let ((buf (gdb-get-buffer 'gdb-partial-output-buffer)))
     (with-current-buffer buf
       (goto-char (point-min))
@@ -1497,7 +1490,9 @@
   (setq mode-name "Locals")
   (setq buffer-read-only t)
   (use-local-map gdb-locals-mode-map)
-  (gdb-invalidate-locals))
+  (if (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))
+      (gdb-invalidate-locals)
+    (gdbmi-invalidate-locals)))
 
 (defun gdb-locals-buffer-name ()
   (with-current-buffer gud-comint-buffer
@@ -1567,24 +1562,22 @@
     `(menu-item "GDB-Frames" ,menu :visible (eq gud-minor-mode 'gdba)))
   (define-key menu [gdb] '("Gdb" . gdb-frame-gdb-buffer))
   (define-key menu [threads] '("Threads" . gdb-frame-threads-buffer))
+  (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer))
   (define-key menu [registers] '("Registers" . gdb-frame-registers-buffer))
   (define-key menu [locals] '("Locals" . gdb-frame-locals-buffer))
   (define-key menu [frames] '("Stack" . gdb-frame-stack-buffer))
-  (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer))
-;  (define-key menu [assembler] '("Machine" . gdb-frame-assembler-buffer))
-)
+  (define-key menu [breakpoints] '("Breakpoints" . gdb-frame-breakpoints-buffer)))
 
 (let ((menu (make-sparse-keymap "GDB-Windows")))
   (define-key gud-menu-map [displays]
     `(menu-item "GDB-Windows" ,menu :visible (eq gud-minor-mode 'gdba)))
   (define-key menu [gdb] '("Gdb" . gdb-display-gdb-buffer))
+  (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer))
   (define-key menu [threads] '("Threads" . gdb-display-threads-buffer))
   (define-key menu [registers] '("Registers" . gdb-display-registers-buffer))
   (define-key menu [locals] '("Locals" . gdb-display-locals-buffer))
   (define-key menu [frames] '("Stack" . gdb-display-stack-buffer))
-  (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer))
-;  (define-key menu [assembler] '("Machine" . gdb-display-assembler-buffer))
-)
+  (define-key menu [breakpoints] '("Breakpoints" . gdb-display-breakpoints-buffer)))
 
 (let ((menu (make-sparse-keymap "View")))
    (define-key gud-menu-map [view]
@@ -1686,7 +1679,7 @@
   "Nil (the default value) means just pop up the GUD buffer
 unless `gdb-show-main' is t. In this case it starts with two
 windows: one displaying the GUD buffer and the other with the
-source file with the main routine of the debugee. Non-nil means
+source file with the main routine of the inferior. Non-nil means
 display the layout shown for `gdba'."
   :type 'boolean
   :group 'gud)
@@ -1730,7 +1723,7 @@
   (dolist (buffer (buffer-list))
     (unless (eq buffer gud-comint-buffer)
       (with-current-buffer buffer
-	(if (memq gud-minor-mode '(gdba pdb))
+	(if (memq gud-minor-mode '(gdbmi gdba))
 	    (if (string-match "\\`\\*.+\\*\\'" (buffer-name))
 		(kill-buffer nil)
 	      (gdb-remove-breakpoint-icons (point-min) (point-max) t)
@@ -1872,7 +1865,7 @@
 
 (def-gdb-auto-updated-buffer gdb-assembler-buffer
   gdb-invalidate-assembler
-  (concat "server disassemble " gdb-current-address "\n")
+  (concat gdb-server-prefix "disassemble " gdb-current-address "\n")
   gdb-assembler-handler
   gdb-assembler-custom)
 
@@ -1956,38 +1949,35 @@
       (progn
 	(unless (string-equal gdb-current-frame gdb-previous-frame)
 	  (if (or (not (member 'gdb-invalidate-assembler
-			       (gdb-get-pending-triggers)))
+			       gdb-pending-triggers))
 		  (not (string-equal gdb-current-address
 				     gdb-previous-address)))
 	  (progn
 	    ;; take previous disassemble command off the queue
 	    (with-current-buffer gud-comint-buffer
-	      (let ((queue (gdb-get-input-queue)) (item))
+	      (let ((queue gdb-input-queue) (item))
 		(dolist (item queue)
 		  (if (equal (cdr item) '(gdb-assembler-handler))
-		      (gdb-set-input-queue
-		       (delete item (gdb-get-input-queue)))))))
+		      (setq gdb-input-queue
+			    (delete item gdb-input-queue))))))
 	    (gdb-enqueue-input
-	     (list (concat "server disassemble " gdb-current-address "\n")
+	     (list (concat gdb-server-prefix "disassemble " gdb-current-address "\n")
 		   'gdb-assembler-handler))
-	    (gdb-set-pending-triggers
-	     (cons 'gdb-invalidate-assembler
-		   (gdb-get-pending-triggers)))
+	    (push 'gdb-invalidate-assembler gdb-pending-triggers)
 	    (setq gdb-previous-address gdb-current-address)
 	    (setq gdb-previous-frame gdb-current-frame)))))))
 
 (defun gdb-get-current-frame ()
-  (if (not (member 'gdb-get-current-frame (gdb-get-pending-triggers)))
+  (if (not (member 'gdb-get-current-frame gdb-pending-triggers))
       (progn
 	(gdb-enqueue-input
-	 (list (concat "server info frame\n") 'gdb-frame-handler))
-	(gdb-set-pending-triggers
-	 (cons 'gdb-get-current-frame
-	       (gdb-get-pending-triggers))))))
+	 (list (concat gdb-server-prefix "info frame\n") 'gdb-frame-handler))
+	(push 'gdb-get-current-frame
+	       gdb-pending-triggers))))
 
 (defun gdb-frame-handler ()
-  (gdb-set-pending-triggers
-   (delq 'gdb-get-current-frame (gdb-get-pending-triggers)))
+  (setq gdb-pending-triggers
+   (delq 'gdb-get-current-frame gdb-pending-triggers))
   (with-current-buffer (gdb-get-create-buffer 'gdb-partial-output-buffer)
     (goto-char (point-min))
     (forward-line)
--- a/lisp/progmodes/grep.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/progmodes/grep.el	Mon May 24 23:42:52 2004 +0000
@@ -533,7 +533,8 @@
 	  (files
 	   (read-string (concat "Search for \"" regexp "\" in files (default "   grep-tree-last-files  "): ")))
 	  (dir
-	   (read-directory-name "Base directory: " nil default-directory t)))
+	   (file-name-as-directory
+	    (read-directory-name "Base directory: " nil default-directory t))))
      (list regexp files dir)))
   (unless grep-tree-command
     (grep-compute-defaults))
--- a/lisp/progmodes/gud.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/progmodes/gud.el	Mon May 24 23:42:52 2004 +0000
@@ -93,42 +93,43 @@
 
 (easy-mmode-defmap gud-menu-map
   '(([help]     menu-item "Help" gdb-goto-info
-                     :enable (eq gud-minor-mode 'gdba))
+                  :enable (memq gud-minor-mode '(gdbmi gdba)))
     ([refresh]	"Refresh" . gud-refresh)
     ([run]	menu-item "Run" gud-run
-                     :enable (and (not gud-running)
-				  (memq gud-minor-mode '(gdba gdb dbx jdb))))
+                  :enable (and (not gud-running)
+			       (memq gud-minor-mode '(gdbmi gdba gdb dbx jdb))))
     ([until]	menu-item "Continue to selection" gud-until
-                     :enable (and (not gud-running)
-				  (memq gud-minor-mode '(gdba gdb perldb))))
+                  :enable (and (not gud-running)
+			       (memq gud-minor-mode '(gdbmi gdba gdb perldb))))
     ([remove]	menu-item "Remove Breakpoint" gud-remove
-                     :enable (not gud-running))
+                  :enable (not gud-running))
     ([tbreak]	menu-item "Temporary Breakpoint" gud-tbreak
-		     :enable (memq gud-minor-mode '(gdba gdb sdb xdb bashdb)))
+		  :enable (memq gud-minor-mode '(gdbmi gdba gdb sdb xdb bashdb)))
     ([break]	menu-item "Set Breakpoint" gud-break
-                     :enable (not gud-running))
+                  :enable (not gud-running))
     ([up]	menu-item "Up Stack" gud-up
-		     :enable (and (not gud-running)
-				  (memq gud-minor-mode
-					'(gdba gdb dbx xdb jdb pdb bashdb))))
+		  :enable (and (not gud-running)
+			       (memq gud-minor-mode
+				     '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
     ([down]	menu-item "Down Stack" gud-down
-		     :enable (and (not gud-running)
-				  (memq gud-minor-mode
-					'(gdba gdb dbx xdb jdb pdb bashdb))))
+		  :enable (and (not gud-running)
+			       (memq gud-minor-mode
+				     '(gdbmi gdba gdb dbx xdb jdb pdb bashdb))))
     ([print]	menu-item "Print Expression" gud-print
                      :enable (not gud-running))
     ([watch]	menu-item "Watch Expression" gud-watch
-		     :enable (and (not gud-running) (eq gud-minor-mode 'gdba)))
+		     :enable (and (not gud-running)
+				  (memq gud-minor-mode '(gdbmi gdba))))
     ([finish]	menu-item "Finish Function" gud-finish
 		     :enable (and (not gud-running)
 				  (memq gud-minor-mode
-					'(gdba gdb xdb jdb pdb bashdb))))
+					'(gdbmi gdba gdb xdb jdb pdb bashdb))))
     ([stepi]	menu-item "Step Instruction" gud-stepi
                      :enable (and (not gud-running)
-				  (memq gud-minor-mode '(gdba gdb dbx))))
+				  (memq gud-minor-mode '(gdbmi gdba gdb dbx))))
     ([nexti]	menu-item "Next Instruction" gud-nexti
                      :enable (and (not gud-running)
-				  (memq gud-minor-mode '(gdba gdb dbx))))
+				  (memq gud-minor-mode '(gdbmi gdba gdb dbx))))
     ([step]	menu-item "Step Line" gud-step
                      :enable (not gud-running))
     ([next]	menu-item "Next Line" gud-next
@@ -312,11 +313,14 @@
 (defvar gud-speedbar-menu-items
   ;; Note to self.  Add expand, and turn off items when not available.
   '(["Jump to stack frame" speedbar-edit-line 
-     (with-current-buffer gud-comint-buffer (not (eq gud-minor-mode 'gdba)))]
+     (with-current-buffer gud-comint-buffer
+       (not (memq gud-minor-mode '(gdbmi gdba))))]
     ["Edit value" speedbar-edit-line 
-     (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))]
+     (with-current-buffer gud-comint-buffer
+       (not (memq gud-minor-mode '(gdbmi gdba))))]
     ["Delete expression" gdb-var-delete 
-     (with-current-buffer gud-comint-buffer (eq gud-minor-mode 'gdba))])
+     (with-current-buffer gud-comint-buffer
+       (not (memq gud-minor-mode '(gdbmi gdba))))])
   "Additional menu items to add to the speedbar frame.")
 
 ;; Make sure our special speedbar mode is loaded
@@ -330,7 +334,7 @@
 off the specialized speedbar mode."
   (let ((minor-mode (with-current-buffer buffer gud-minor-mode)))
     (cond
-     ((eq minor-mode 'gdba)
+     ((memq minor-mode '(gdbmi gdba))
       (when (or gdb-var-changed
 		(not (save-excursion
 		       (goto-char (point-min))
@@ -397,7 +401,7 @@
 	      (speedbar-insert-button (car frame)
 				      'speedbar-file-face
 				      'speedbar-highlight-face
-				      (cond ((memq minor-mode '(gdba gdb))
+				      (cond ((memq minor-mode '(gdbmi gdba gdb))
 					     'gud-gdb-goto-stackframe)
 					    (t (error "Should never be here")))
 					frame t)))
@@ -2511,14 +2515,14 @@
 	 ;; Stop displaying an arrow in a source file.
 	 (setq overlay-arrow-position nil)
 	 (set-process-buffer proc nil)
-	 (if (eq gud-minor-mode-type 'gdba)
+	 (if (memq gud-minor-mode-type '(gdbmi gdba))
 	     (gdb-reset)
 	   (gud-reset)))
 	((memq (process-status proc) '(signal exit))
 	 ;; Stop displaying an arrow in a source file.
 	 (setq overlay-arrow-position nil)
 	 (with-current-buffer gud-comint-buffer
-	   (if (eq gud-minor-mode 'gdba)
+	   (if (memq gud-minor-mode-type '(gdbmi gdba))
 	       (gdb-reset)
 	     (gud-reset)))
 	 (let* ((obuf (current-buffer)))
@@ -2583,7 +2587,7 @@
 	  (with-current-buffer gud-comint-buffer
 	    (gud-find-file true-file)))
 	 (window (and buffer (or (get-buffer-window buffer)
-				 (if (eq gud-minor-mode 'gdba)
+				 (if (memq gud-minor-mode '(gdbmi gdba))
 				     (gdb-display-source-buffer buffer)
 				   (display-buffer buffer)))))
 	 (pos))
@@ -2707,7 +2711,7 @@
 	(forward-line 0)
 	(if (looking-at comint-prompt-regexp)
 	    (set-marker gud-delete-prompt-marker (point)))
-	(if (eq gud-minor-mode 'gdba)
+	(if (memq gud-minor-mode '(gdbmi gdba))
 	    (apply comint-input-sender (list proc command))
 	  (process-send-string proc (concat command "\n")))))))
 
--- a/lisp/simple.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/simple.el	Mon May 24 23:42:52 2004 +0000
@@ -91,36 +91,49 @@
     (or (and extra-test (funcall extra-test))
 	next-error-function)))
 
-;; Return a next-error capable buffer.
-;; If the current buffer is such, return it.
-;; If next-error-last-buffer is set to a live buffer, use that.
-;; Otherwise, look for a next-error capable buffer and signal an error
-;; if there are none.
+;; Return a next-error capable buffer according to the following rules:
+;; 1. If the current buffer is a next-error capable buffer, return it.
+;; 2. If one window on the selected frame displays such buffer, return it.
+;; 3. If next-error-last-buffer is set to a live buffer, use that.
+;; 4. Otherwise, look for a next-error capable buffer in a buffer list.
+;; 5. Signal an error if there are none.
 (defun next-error-find-buffer (&optional other-buffer extra-test)
   (if (and (not other-buffer)
 	   (next-error-buffer-p (current-buffer) extra-test))
       ;; The current buffer is a next-error capable buffer.
       (current-buffer)
-    (if (and next-error-last-buffer (buffer-name next-error-last-buffer)
-	     (next-error-buffer-p next-error-last-buffer extra-test)
-	     (or (not other-buffer) (not (eq next-error-last-buffer
-					     (current-buffer)))))
-	next-error-last-buffer
-      (let ((buffers (buffer-list)))
-	(while (and buffers (or (not (next-error-buffer-p (car buffers) extra-test))
-				(and other-buffer
-				     (eq (car buffers) (current-buffer)))))
-	  (setq buffers (cdr buffers)))
-	(if buffers
-	    (car buffers)
-	  (or (and other-buffer
-		   (next-error-buffer-p (current-buffer) extra-test)
-		   ;; The current buffer is a next-error capable buffer.
-		   (progn
-		     (if other-buffer
-			 (message "This is the only next-error capable buffer."))
-		     (current-buffer)))
-	      (error "No next-error capable buffer found!")))))))
+    (or
+     (let ((window-buffers
+            (delete-dups
+             (delq nil
+              (mapcar (lambda (w)
+                        (and (next-error-buffer-p (window-buffer w) extra-test)
+                             (window-buffer w)))
+                      (window-list))))))
+       (if other-buffer
+           (setq window-buffers (delq (current-buffer) window-buffers)))
+       (if (eq (length window-buffers) 1)
+           (car window-buffers)))
+     (if (and next-error-last-buffer (buffer-name next-error-last-buffer)
+              (next-error-buffer-p next-error-last-buffer extra-test)
+              (or (not other-buffer) (not (eq next-error-last-buffer
+                                              (current-buffer)))))
+         next-error-last-buffer
+       (let ((buffers (buffer-list)))
+         (while (and buffers (or (not (next-error-buffer-p (car buffers) extra-test))
+                                 (and other-buffer
+                                      (eq (car buffers) (current-buffer)))))
+           (setq buffers (cdr buffers)))
+         (if buffers
+             (car buffers)
+           (or (and other-buffer
+                    (next-error-buffer-p (current-buffer) extra-test)
+                    ;; The current buffer is a next-error capable buffer.
+                    (progn
+                      (if other-buffer
+                          (message "This is the only next-error capable buffer."))
+                      (current-buffer)))
+               (error "No next-error capable buffer found!"))))))))
 
 (defun next-error (arg &optional reset)
   "Visit next next-error message and corresponding source code.
--- a/lisp/textmodes/texinfmt.el	Sun May 23 05:08:13 2004 +0000
+++ b/lisp/textmodes/texinfmt.el	Mon May 24 23:42:52 2004 +0000
@@ -3032,7 +3032,7 @@
           (indent-to 54)
           (insert
            (if (nth 2 (car indexelts))
-               (format "  %d." (nth 2 (car indexelts)))
+               (format "  (line %3d)" (1+ (nth 2 (car indexelts))))
              "")
            "\n"))
       ;; index entries from @include'd file
--- a/src/ChangeLog	Sun May 23 05:08:13 2004 +0000
+++ b/src/ChangeLog	Mon May 24 23:42:52 2004 +0000
@@ -1,3 +1,8 @@
+2004-05-23  K,Ba(Broly L,Bu(Brentey  <lorentey@elte.hu>  (tiny change)
+
+	* coding.c (Fset_safe_terminal_coding_system_internal): Set
+	suppress_error in safe_terminal_coding, not terminal_coding.
+
 2004-05-22  Richard M. Stallman  <rms@gnu.org>
 
 	* alloc.c (Fmake_string): Doc fix.