aboutsummaryrefslogtreecommitdiffstats
path: root/lisp
diff options
context:
space:
mode:
authorKaroly Lorentey2004-11-13 18:21:48 +0000
committerKaroly Lorentey2004-11-13 18:21:48 +0000
commitf590a2a442d19f3a74d7bbd02bbcb4e3239f2327 (patch)
tree0ea1998c7a87cdc3faa9d00d3ea71b981cc1153a /lisp
parent050ddd28da8d0bb44f06575e93c6bd7feb758829 (diff)
parentc37ee7cb84b11bf38e1f391b2015a2ec74e5c4e1 (diff)
downloademacs-f590a2a442d19f3a74d7bbd02bbcb4e3239f2327.tar.gz
emacs-f590a2a442d19f3a74d7bbd02bbcb4e3239f2327.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-672 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-266
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog51
-rw-r--r--lisp/align.el8
-rw-r--r--lisp/emacs-lisp/easymenu.el73
-rw-r--r--lisp/macros.el9
-rw-r--r--lisp/net/tramp.el7
-rw-r--r--lisp/outline.el5
-rw-r--r--lisp/recentf.el2
-rw-r--r--lisp/tempo.el6
8 files changed, 123 insertions, 38 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 8e55dcd6270..6fc7796f339 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,54 @@
12004-11-06 Kai Grossjohann <kai.grossjohann@gmx.net>
2
3 * net/tramp.el (tramp-coding-commands): Additionally try "uudecode
4 -o /dev/stdout" before trying "uudecode -o -". Suggested by Han
5 Boetes.
6 (tramp-uudecode): Mention `uudecode -o /dev/stdout'.
7
82004-11-06 David Ponce <david@dponce.com>
9
10 * recentf.el (recentf-menu-path): Use menu item name.
11
122004-11-06 Eli Zaretskii <eliz@gnu.org>
13
14 * progmodes/gdb-ui.el: Don't call define-fringe-bitmap if the
15 display doesn't support images.
16
172004-11-06 Andreas Schwab <schwab@suse.de>
18
19 * tempo.el (tempo-match-finder): Doc fix.
20
21 * emacs-lisp/easymenu.el (easy-menu-get-map): Fix last change.
22
232004-11-06 Stefan Monnier <monnier@iro.umontreal.ca>
24
25 * emacs-lisp/easymenu.el (easy-menu-get-map-look-for-name): Remove.
26 (easy-menu-lookup-name): New fun to replace it.
27 (easy-menu-get-map): Use it to obey menu item names (rather than just
28 keys) when looking up `path'.
29 (easy-menu-always-true-p): Rename from easy-menu-always-true.
30 (easy-menu-convert-item-1): Adjust to new name.
31
322004-11-06 Peter Heslin <pj@heslin.eclipse.co.uk> (tiny change)
33
34 * outline.el (hide-body): Don't hide lines at the top of the file
35 that precede the first header line.
36
372004-11-06 Paul Pogonyshev <pogonyshev@gmx.net>
38
39 * align.el (align-areas): Delete whitespace before reindenting, so
40 that tabs are never placed after spaces.
41
422004-11-06 Alan Shutko <ats@acm.org>
43
44 * macros.el (insert-kbd-macro): Do completions based on macros,
45 rather than all commands.
46
472004-11-06 David Hansen <david.hansen@gmx.net> (tiny change)
48
49 * tempo.el (tempo-match-finder): Use [:word:] instead of "^\\b",
50 to solve a bug whereby tags with 'b' don't match.
51
12004-11-05 Juri Linkov <juri@jurta.org> 522004-11-05 Juri Linkov <juri@jurta.org>
2 53
3 * info.el (Info-search): Don't search in node header lines 54 * info.el (Info-search): Don't search in node header lines
diff --git a/lisp/align.el b/lisp/align.el
index bae09d749db..5e739c8f7c0 100644
--- a/lisp/align.el
+++ b/lisp/align.el
@@ -1212,6 +1212,14 @@ have been aligned. No changes will be made to the buffer."
1212 (cond ((< gocol 0) t) ; don't do anything 1212 (cond ((< gocol 0) t) ; don't do anything
1213 ((= cur gocol) t) ; don't need to 1213 ((= cur gocol) t) ; don't need to
1214 ((< cur gocol) ; just add space 1214 ((< cur gocol) ; just add space
1215 ;; FIXME: It is stated above that "...the
1216 ;; whitespace to be modified was already
1217 ;; deleted by `align-region', all we have
1218 ;; to do here is indent." However, this
1219 ;; doesn't seem to be true, so we first
1220 ;; delete the whitespace to avoid tabs
1221 ;; after spaces.
1222 (delete-horizontal-space t)
1215 (indent-to gocol)) 1223 (indent-to gocol))
1216 (t 1224 (t
1217 ;; This code works around an oddity in the 1225 ;; This code works around an oddity in the
diff --git a/lisp/emacs-lisp/easymenu.el b/lisp/emacs-lisp/easymenu.el
index e039b80aee5..7b18756fd7e 100644
--- a/lisp/emacs-lisp/easymenu.el
+++ b/lisp/emacs-lisp/easymenu.el
@@ -242,9 +242,9 @@ possibly preceded by keyword pairs as described in `easy-menu-define'."
242 (setq visible (or arg ''nil))))) 242 (setq visible (or arg ''nil)))))
243 (if (equal visible ''nil) 243 (if (equal visible ''nil)
244 nil ; Invisible menu entry, return nil. 244 nil ; Invisible menu entry, return nil.
245 (if (and visible (not (easy-menu-always-true visible))) 245 (if (and visible (not (easy-menu-always-true-p visible)))
246 (setq prop (cons :visible (cons visible prop)))) 246 (setq prop (cons :visible (cons visible prop))))
247 (if (and enable (not (easy-menu-always-true enable))) 247 (if (and enable (not (easy-menu-always-true-p enable)))
248 (setq prop (cons :enable (cons enable prop)))) 248 (setq prop (cons :enable (cons enable prop))))
249 (if filter (setq prop (cons :filter (cons filter prop)))) 249 (if filter (setq prop (cons :filter (cons filter prop))))
250 (if help (setq prop (cons :help (cons help prop)))) 250 (if help (setq prop (cons :help (cons help prop))))
@@ -363,12 +363,12 @@ ITEM defines an item as in `easy-menu-define'."
363 (cons cmd keys)))) 363 (cons cmd keys))))
364 (setq cache-specified nil)) 364 (setq cache-specified nil))
365 (if keys (setq prop (cons :keys (cons keys prop))))) 365 (if keys (setq prop (cons :keys (cons keys prop)))))
366 (if (and visible (not (easy-menu-always-true visible))) 366 (if (and visible (not (easy-menu-always-true-p visible)))
367 (if (equal visible ''nil) 367 (if (equal visible ''nil)
368 ;; Invisible menu item. Don't insert into keymap. 368 ;; Invisible menu item. Don't insert into keymap.
369 (setq remove t) 369 (setq remove t)
370 (setq prop (cons :visible (cons visible prop))))))) 370 (setq prop (cons :visible (cons visible prop)))))))
371 (if (and active (not (easy-menu-always-true active))) 371 (if (and active (not (easy-menu-always-true-p active)))
372 (setq prop (cons :enable (cons active prop)))) 372 (setq prop (cons :enable (cons active prop))))
373 (if (and (or no-name cache-specified) 373 (if (and (or no-name cache-specified)
374 (or (null cache) (stringp cache) (vectorp cache))) 374 (or (null cache) (stringp cache) (vectorp cache)))
@@ -426,7 +426,8 @@ KEY does not have to be a symbol, and comparison is done with equal."
426 426
427(defun easy-menu-name-match (name item) 427(defun easy-menu-name-match (name item)
428 "Return t if NAME is the name of menu item ITEM. 428 "Return t if NAME is the name of menu item ITEM.
429NAME can be either a string, or a symbol." 429NAME can be either a string, or a symbol.
430ITEM should be a keymap binding of the form (KEY . MENU-ITEM)."
430 (if (consp item) 431 (if (consp item)
431 (if (symbolp name) 432 (if (symbolp name)
432 (eq (car-safe item) name) 433 (eq (car-safe item) name)
@@ -439,7 +440,7 @@ NAME can be either a string, or a symbol."
439 (eq (car-safe item) (intern name)) 440 (eq (car-safe item) (intern name))
440 (eq (car-safe item) (easy-menu-intern name))))))) 441 (eq (car-safe item) (easy-menu-intern name)))))))
441 442
442(defun easy-menu-always-true (x) 443(defun easy-menu-always-true-p (x)
443 "Return true if form X never evaluates to nil." 444 "Return true if form X never evaluates to nil."
444 (if (consp x) (and (eq (car x) 'quote) (cadr x)) 445 (if (consp x) (and (eq (car x) 'quote) (cadr x))
445 (or (eq x t) (not (symbolp x))))) 446 (or (eq x t) (not (symbolp x)))))
@@ -591,10 +592,24 @@ If item is an old format item, a new format item is returned."
591 (cons name item)) ; Keymap or new menu format 592 (cons name item)) ; Keymap or new menu format
592 ))) 593 )))
593 594
594(defun easy-menu-get-map-look-for-name (name submap) 595(defun easy-menu-lookup-name (map name)
595 (while (and submap (not (easy-menu-name-match name (car submap)))) 596 "Lookup menu item NAME in keymap MAP.
596 (setq submap (cdr submap))) 597Like `lookup-key' except that NAME is not an array but just a single key
597 submap) 598and that NAME can be a string representing the menu item's name."
599 (or (lookup-key map (vector (easy-menu-intern name)))
600 (when (stringp name)
601 ;; `lookup-key' failed and we have a menu item name: look at the
602 ;; actual menu entries's names.
603 (catch 'found
604 (map-keymap (lambda (key item)
605 (if (condition-case nil (member name item)
606 (error nil))
607 ;; Found it!! Look for it again with
608 ;; `lookup-key' so as to handle inheritance and
609 ;; to extract the actual command/keymap bound to
610 ;; `name' from the item (via get_keyelt).
611 (throw 'found (lookup-key map (vector key)))))
612 map)))))
598 613
599(defun easy-menu-get-map (map path &optional to-modify) 614(defun easy-menu-get-map (map path &optional to-modify)
600 "Return a sparse keymap in which to add or remove an item. 615 "Return a sparse keymap in which to add or remove an item.
@@ -605,34 +620,34 @@ wants to modify in the map that we return.
605In some cases we use that to select between the local and global maps." 620In some cases we use that to select between the local and global maps."
606 (setq map 621 (setq map
607 (catch 'found 622 (catch 'found
608 (let* ((key (vconcat (unless map '(menu-bar)) 623 (if (and map (symbolp map) (not (keymapp map)))
609 (mapcar 'easy-menu-intern path))) 624 (setq map (symbol-value map)))
610 (maps (mapcar (lambda (map) 625 (let ((maps (if map (list map) (current-active-maps))))
611 (setq map (lookup-key map key)) 626 ;; Look for PATH in each map.
612 (while (and (symbolp map) (keymapp map)) 627 (unless map (push 'menu-bar path))
613 (setq map (symbol-function map))) 628 (dolist (name path)
614 map) 629 (setq maps
615 (if map 630 (delq nil (mapcar (lambda (map)
616 (list (if (and (symbolp map) 631 (setq map (easy-menu-lookup-name
617 (not (keymapp map))) 632 map name))
618 (symbol-value map) map)) 633 (and (keymapp map) map))
619 (current-active-maps))))) 634 maps))))
635
620 ;; Prefer a map that already contains the to-be-modified entry. 636 ;; Prefer a map that already contains the to-be-modified entry.
621 (when to-modify 637 (when to-modify
622 (dolist (map maps) 638 (dolist (map maps)
623 (when (and (keymapp map) 639 (when (easy-menu-lookup-name map to-modify)
624 (easy-menu-get-map-look-for-name to-modify map))
625 (throw 'found map)))) 640 (throw 'found map))))
626 ;; Use the first valid map. 641 ;; Use the first valid map.
627 (dolist (map maps) 642 (when maps (throw 'found (car maps)))
628 (when (keymapp map) 643
629 (throw 'found map)))
630 ;; Otherwise, make one up. 644 ;; Otherwise, make one up.
631 ;; Hardcoding current-local-map is lame, but it's difficult 645 ;; Hardcoding current-local-map is lame, but it's difficult
632 ;; to know what the caller intended for us to do ;-( 646 ;; to know what the caller intended for us to do ;-(
633 (let* ((name (if path (format "%s" (car (reverse path))))) 647 (let* ((name (if path (format "%s" (car (reverse path)))))
634 (newmap (make-sparse-keymap name))) 648 (newmap (make-sparse-keymap name)))
635 (define-key (or map (current-local-map)) key 649 (define-key (or map (current-local-map))
650 (apply 'vector (mapcar 'easy-menu-intern path))
636 (if name (cons name newmap) newmap)) 651 (if name (cons name newmap) newmap))
637 newmap)))) 652 newmap))))
638 (or (keymapp map) (error "Malformed menu in easy-menu: (%s)" map)) 653 (or (keymapp map) (error "Malformed menu in easy-menu: (%s)" map))
@@ -640,5 +655,5 @@ In some cases we use that to select between the local and global maps."
640 655
641(provide 'easymenu) 656(provide 'easymenu)
642 657
643;;; arch-tag: 2a04020d-90d2-476d-a7c6-71e072007a4a 658;; arch-tag: 2a04020d-90d2-476d-a7c6-71e072007a4a
644;;; easymenu.el ends here 659;;; easymenu.el ends here
diff --git a/lisp/macros.el b/lisp/macros.el
index 0de5d223ee0..bb9fda41a45 100644
--- a/lisp/macros.el
+++ b/lisp/macros.el
@@ -63,7 +63,14 @@ bindings.
63 63
64To save a kbd macro, visit a file of Lisp code such as your `~/.emacs', 64To save a kbd macro, visit a file of Lisp code such as your `~/.emacs',
65use this command, and then save the file." 65use this command, and then save the file."
66 (interactive "CInsert kbd macro (name): \nP") 66 (interactive (list (intern (completing-read "Insert kbd macro (name): "
67 obarray
68 (lambda (elt)
69 (and (fboundp elt)
70 (or (stringp (symbol-function elt))
71 (vectorp (symbol-function elt)))))
72 t))
73 current-prefix-arg))
67 (let (definition) 74 (let (definition)
68 (if (string= (symbol-name macroname) "") 75 (if (string= (symbol-name macroname) "")
69 (progn 76 (progn
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el
index 5a71a50c5db..e153ab3341f 100644
--- a/lisp/net/tramp.el
+++ b/lisp/net/tramp.el
@@ -1535,8 +1535,9 @@ cat /tmp/tramp.$$
1535rm -f /tmp/tramp.$$ 1535rm -f /tmp/tramp.$$
1536}" 1536}"
1537 "Shell function to implement `uudecode' to standard output. 1537 "Shell function to implement `uudecode' to standard output.
1538Many systems support `uudecode -o -' for this or `uudecode -p', but 1538Many systems support `uudecode -o /dev/stdout' for this or
1539some systems don't, and for them we have this shell function.") 1539`uudecode -o -' or `uudecode -p', but some systems don't, and for
1540them we have this shell function.")
1540 1541
1541;; Perl script to implement `file-attributes' in a Lisp `read'able 1542;; Perl script to implement `file-attributes' in a Lisp `read'able
1542;; output. If you are hacking on this, note that you get *no* output 1543;; output. If you are hacking on this, note that you get *no* output
@@ -5970,6 +5971,8 @@ locale to C and sets up the remote shell search path."
5970 base64-encode-region base64-decode-region) 5971 base64-encode-region base64-decode-region)
5971 ("recode data..base64" "recode base64..data" 5972 ("recode data..base64" "recode base64..data"
5972 base64-encode-region base64-decode-region) 5973 base64-encode-region base64-decode-region)
5974 ("uuencode xxx" "uudecode -o /dev/stdout"
5975 tramp-uuencode-region uudecode-decode-region)
5973 ("uuencode xxx" "uudecode -o -" 5976 ("uuencode xxx" "uudecode -o -"
5974 tramp-uuencode-region uudecode-decode-region) 5977 tramp-uuencode-region uudecode-decode-region)
5975 ("uuencode xxx" "uudecode -p" 5978 ("uuencode xxx" "uudecode -p"
diff --git a/lisp/outline.el b/lisp/outline.el
index 2d2663b12f2..89e9e193e9c 100644
--- a/lisp/outline.el
+++ b/lisp/outline.el
@@ -723,7 +723,7 @@ Show the heading too, if it is currently invisible."
723 (progn (outline-next-preface) (point)) nil))) 723 (progn (outline-next-preface) (point)) nil)))
724 724
725(defun hide-body () 725(defun hide-body ()
726 "Hide all of buffer except headings." 726 "Hide all body lines in buffer, leaving all headings visible."
727 (interactive) 727 (interactive)
728 (hide-region-body (point-min) (point-max))) 728 (hide-region-body (point-min) (point-max)))
729 729
@@ -738,7 +738,8 @@ Show the heading too, if it is currently invisible."
738 (narrow-to-region start end) 738 (narrow-to-region start end)
739 (goto-char (point-min)) 739 (goto-char (point-min))
740 (if (outline-on-heading-p) 740 (if (outline-on-heading-p)
741 (outline-end-of-heading)) 741 (outline-end-of-heading)
742 (outline-next-preface))
742 (while (not (eobp)) 743 (while (not (eobp))
743 (outline-flag-region (point) 744 (outline-flag-region (point)
744 (progn (outline-next-preface) (point)) t) 745 (progn (outline-next-preface) (point)) t)
diff --git a/lisp/recentf.el b/lisp/recentf.el
index 4ef55d4e1bf..2fee8e637a8 100644
--- a/lisp/recentf.el
+++ b/lisp/recentf.el
@@ -98,7 +98,7 @@ Set VARIABLE with VALUE, and force a rebuild of the recentf menu."
98 :type 'string 98 :type 'string
99 :set 'recentf-menu-customization-changed) 99 :set 'recentf-menu-customization-changed)
100 100
101(defcustom recentf-menu-path '("files") 101(defcustom recentf-menu-path '("File")
102 "*Path where to add the recentf menu. 102 "*Path where to add the recentf menu.
103If nil add it at top level (see also `easy-menu-add-item')." 103If nil add it at top level (see also `easy-menu-add-item')."
104 :group 'recentf 104 :group 'recentf
diff --git a/lisp/tempo.el b/lisp/tempo.el
index 3ceb3e271f4..43f90b64766 100644
--- a/lisp/tempo.el
+++ b/lisp/tempo.el
@@ -1,6 +1,6 @@
1;;; tempo.el --- Flexible template insertion 1;;; tempo.el --- Flexible template insertion
2 2
3;; Copyright (C) 1994, 1995 Free Software Foundation, Inc. 3;; Copyright (C) 1994, 1995, 2004 Free Software Foundation, Inc.
4 4
5;; Author: David K}gedal <davidk@lysator.liu.se> 5;; Author: David K}gedal <davidk@lysator.liu.se>
6;; Created: 16 Feb 1994 6;; Created: 16 Feb 1994
@@ -172,7 +172,7 @@ documentation for the function `tempo-complete-tag' for more info.
172(defvar tempo-marks nil 172(defvar tempo-marks nil
173 "A list of marks to jump to with `\\[tempo-forward-mark]' and `\\[tempo-backward-mark]'.") 173 "A list of marks to jump to with `\\[tempo-forward-mark]' and `\\[tempo-backward-mark]'.")
174 174
175(defvar tempo-match-finder "\\b\\([^\\b]+\\)\\=" 175(defvar tempo-match-finder "\\b\\([[:word:]]+\\)\\="
176 "The regexp or function used to find the string to match against tags. 176 "The regexp or function used to find the string to match against tags.
177 177
178If `tempo-match-finder is a string, it should contain a regular 178If `tempo-match-finder is a string, it should contain a regular
@@ -182,7 +182,7 @@ the string between the first \\( and \\) is used for matching against
182each string in the tag list. If one is found, the whole text between 182each string in the tag list. If one is found, the whole text between
183the first \\( and the point is replaced with the inserted template. 183the first \\( and the point is replaced with the inserted template.
184 184
185You will probably want to include \\ \= at the end of the regexp to 185You will probably want to include \\=\\= at the end of the regexp to
186make sure that the string is matched only against text adjacent to the 186make sure that the string is matched only against text adjacent to the
187point. 187point.
188 188