aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-11-13 18:21:48 +0000
committerKaroly Lorentey2004-11-13 18:21:48 +0000
commitf590a2a442d19f3a74d7bbd02bbcb4e3239f2327 (patch)
tree0ea1998c7a87cdc3faa9d00d3ea71b981cc1153a
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
-rw-r--r--ChangeLog5
-rwxr-xr-xconfigure3
-rw-r--r--configure.in2
-rw-r--r--etc/NEWS7
-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
-rw-r--r--lispref/ChangeLog17
-rw-r--r--lispref/Makefile.in6
-rw-r--r--lispref/commands.texi9
-rw-r--r--lispref/os.texi23
-rw-r--r--src/ChangeLog26
-rw-r--r--src/config.in3
-rw-r--r--src/editfns.c46
-rw-r--r--src/eval.c2
-rw-r--r--src/fns.c9
-rw-r--r--src/frame.c2
-rw-r--r--src/macros.c4
-rw-r--r--src/print.c9
-rw-r--r--src/xmenu.c23
25 files changed, 292 insertions, 65 deletions
diff --git a/ChangeLog b/ChangeLog
index fea2ce35e64..8fbd47889c3 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,8 @@
12004-11-06 Lars Brinkhoff <lars@nocrew.org>
2
3 * configure.in: Add check for getrusage.
4 * configure: Regenerate.
5
12004-11-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> 62004-11-02 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
2 7
3 * configure.in (HAVE_GTK_FILE_CHOOSER, $HAVE_GTK_FILE_SELECTION): New 8 * configure.in (HAVE_GTK_FILE_CHOOSER, $HAVE_GTK_FILE_SELECTION): New
diff --git a/configure b/configure
index c776e1fd633..d4c7ae27f4c 100755
--- a/configure
+++ b/configure
@@ -13704,8 +13704,9 @@ done
13704 13704
13705 13705
13706 13706
13707
13707for ac_func in gethostname getdomainname dup2 \ 13708for ac_func in gethostname getdomainname dup2 \
13708rename closedir mkdir rmdir sysinfo \ 13709rename closedir mkdir rmdir sysinfo getrusage \
13709random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ 13710random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
13710strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ 13711strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
13711utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ 13712utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
diff --git a/configure.in b/configure.in
index 1478d4d4b5d..5a02beda097 100644
--- a/configure.in
+++ b/configure.in
@@ -2370,7 +2370,7 @@ AC_CHECK_FUNCS(touchlock)
2370AC_CHECK_HEADERS(maillock.h) 2370AC_CHECK_HEADERS(maillock.h)
2371 2371
2372AC_CHECK_FUNCS(gethostname getdomainname dup2 \ 2372AC_CHECK_FUNCS(gethostname getdomainname dup2 \
2373rename closedir mkdir rmdir sysinfo \ 2373rename closedir mkdir rmdir sysinfo getrusage \
2374random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \ 2374random lrand48 bcopy bcmp logb frexp fmod rint cbrt ftime res_init setsid \
2375strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \ 2375strerror fpathconf select mktime euidaccess getpagesize tzset setlocale \
2376utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \ 2376utimes setrlimit setpgid getcwd getwd shutdown getaddrinfo \
diff --git a/etc/NEWS b/etc/NEWS
index 5d08bd4d030..726eac5afdb 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -98,6 +98,9 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types.
98 98
99* Changes in Emacs 21.4 99* Changes in Emacs 21.4
100 100
101** In Outline mode, hide-body no longer hides lines at the top
102of the file that precede the first header line.
103
101+++ 104+++
102** `set-auto-mode' now gives the interpreter magic line (if present) 105** `set-auto-mode' now gives the interpreter magic line (if present)
103precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration 106precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration
@@ -2324,6 +2327,10 @@ configuration files.
2324* Lisp Changes in Emacs 21.4 2327* Lisp Changes in Emacs 21.4
2325 2328
2326+++ 2329+++
2330** The new primitive `get-internal-run-time' returns the processor
2331run time used by Emacs since start-up.
2332
2333+++
2327** The new function `called-interactively-p' does what many people 2334** The new function `called-interactively-p' does what many people
2328have mistakenly believed `interactively-p' did: it returns t if the 2335have mistakenly believed `interactively-p' did: it returns t if the
2329calling function was called through `call-interactively'. 2336calling function was called through `call-interactively'.
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
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index d1bb65d3358..197c7217785 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,20 @@
12004-11-06 Lars Brinkhoff <lars@nocrew.org>
2
3 * os.texi (Processor Run Time): New section documenting
4 get-internal-run-time.
5
62004-11-06 Eli Zaretskii <eliz@gnu.org>
7
8 * Makefile.in (install, maintainer-clean): Don't use "elisp-*" as
9 it nukes elisp-cover.texi.
10 (dist): Change elisp-[0-9] to elisp-[1-9], as there could be no
11 elisp-0 etc.
12
132004-11-05 Luc Teirlinck <teirllm@auburn.edu>
14
15 * commands.texi (Keyboard Macros): Document `append' return value
16 of `defining-kbd-macro'.
17
12004-11-01 Richard M. Stallman <rms@gnu.org> 182004-11-01 Richard M. Stallman <rms@gnu.org>
2 19
3 * commands.texi (Interactive Call): Add called-interactively-p. 20 * commands.texi (Interactive Call): Add called-interactively-p.
diff --git a/lispref/Makefile.in b/lispref/Makefile.in
index e9d99de7d6a..252ab1aaaed 100644
--- a/lispref/Makefile.in
+++ b/lispref/Makefile.in
@@ -108,7 +108,7 @@ elisp.dvi: $(srcs)
108 108
109install: elisp 109install: elisp
110 $(srcdir)/mkinstalldirs $(infodir) 110 $(srcdir)/mkinstalldirs $(infodir)
111 cp elisp elisp-* $(infodir) 111 cp elisp elisp-[1-9] elisp-[1-9][0-9] $(infodir)
112 ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/elisp 112 ${INSTALL_INFO} --info-dir=${infodir} ${infodir}/elisp
113 113
114clean: 114clean:
@@ -119,7 +119,7 @@ clean:
119distclean: clean 119distclean: clean
120 120
121maintainer-clean: clean 121maintainer-clean: clean
122 rm -f elisp elisp-* elisp.dvi elisp.oaux 122 rm -f elisp elisp-[1-9] elisp-[1-9][0-9] elisp.dvi elisp.oaux
123 123
124dist: elisp elisp.dvi 124dist: elisp elisp.dvi
125 -rm -rf temp 125 -rm -rf temp
@@ -128,7 +128,7 @@ dist: elisp elisp.dvi
128 -ln $(srcdir)/README $(srcdir)/configure.in $(srcdir)/configure \ 128 -ln $(srcdir)/README $(srcdir)/configure.in $(srcdir)/configure \
129 $(srcdir)/Makefile.in $(srcs) \ 129 $(srcdir)/Makefile.in $(srcs) \
130 $(srcdir)/../man/texinfo.tex \ 130 $(srcdir)/../man/texinfo.tex \
131 elisp.dvi elisp.aux elisp.??s elisp elisp-[0-9] elisp-[0-9][0-9] \ 131 elisp.dvi elisp.aux elisp.??s elisp elisp-[1-9] elisp-[1-9][0-9] \
132 temp/$(manual) 132 temp/$(manual)
133 -(cd temp/$(manual); rm -f mkinstalldirs) 133 -(cd temp/$(manual); rm -f mkinstalldirs)
134 cp $(srcdir)/mkinstalldirs temp/$(manual) 134 cp $(srcdir)/mkinstalldirs temp/$(manual)
diff --git a/lispref/commands.texi b/lispref/commands.texi
index 3c9612e5186..0144123ecb5 100644
--- a/lispref/commands.texi
+++ b/lispref/commands.texi
@@ -420,7 +420,7 @@ the string.) Other characters that normally terminate a symbol (e.g.,
420parentheses and brackets) do not do so here. Prompt. 420parentheses and brackets) do not do so here. Prompt.
421 421
422@item U 422@item U
423A key sequence or nil. May be used after a @code{k} or @code{K} 423A key sequence or @code{nil}. May be used after a @code{k} or @code{K}
424argument to get the up-event that was discarded in case the key 424argument to get the up-event that was discarded in case the key
425sequence read for that argument was a down-event. No I/O. 425sequence read for that argument was a down-event. No I/O.
426 426
@@ -3023,9 +3023,10 @@ yourself.
3023@defvar defining-kbd-macro 3023@defvar defining-kbd-macro
3024This variable is non-@code{nil} if and only if a keyboard macro is 3024This variable is non-@code{nil} if and only if a keyboard macro is
3025being defined. A command can test this variable so as to behave 3025being defined. A command can test this variable so as to behave
3026differently while a macro is being defined. The commands 3026differently while a macro is being defined. The value is
3027@code{start-kbd-macro} and @code{end-kbd-macro} set this variable---do 3027@code{append} while appending to the definition of an existing macro.
3028not set it yourself. 3028The commands @code{start-kbd-macro}, @code{kmacro-start-macro} and
3029@code{end-kbd-macro} set this variable---do not set it yourself.
3029 3030
3030The variable is always local to the current terminal and cannot be 3031The variable is always local to the current terminal and cannot be
3031buffer-local. @xref{Multiple Displays}. 3032buffer-local. @xref{Multiple Displays}.
diff --git a/lispref/os.texi b/lispref/os.texi
index 42a0613bfec..90fba8975e2 100644
--- a/lispref/os.texi
+++ b/lispref/os.texi
@@ -23,6 +23,7 @@ pertaining to the terminal and the screen.
23* Time of Day:: Getting the current time. 23* Time of Day:: Getting the current time.
24* Time Conversion:: Converting a time from numeric form to a string, or 24* Time Conversion:: Converting a time from numeric form to a string, or
25 to calendrical data (or vice versa). 25 to calendrical data (or vice versa).
26* Processor Run Time:: Getting the run time used by Emacs.
26* Time Calculations:: Adding, subtracting, comparing times, etc. 27* Time Calculations:: Adding, subtracting, comparing times, etc.
27* Timers:: Setting a timer to call a function at a certain time. 28* Timers:: Setting a timer to call a function at a certain time.
28* Terminal Input:: Recording terminal input for debugging. 29* Terminal Input:: Recording terminal input for debugging.
@@ -1285,6 +1286,28 @@ For instance, years before 1970 do not work on some systems;
1285on others, years as early as 1901 do work. 1286on others, years as early as 1901 do work.
1286@end defun 1287@end defun
1287 1288
1289@node Processor Run Time
1290@section Processor Run time
1291
1292@defun get-internal-run-time
1293This function returns the processor run time used by Emacs as a list
1294of three integers: @code{(@var{high} @var{low} @var{microsec})}. The
1295integers @var{high} and @var{low} combine to give the number of
1296seconds, which is
1297@ifnottex
1298@var{high} * 2**16 + @var{low}.
1299@end ifnottex
1300@tex
1301$high*2^{16}+low$.
1302@end tex
1303
1304The third element, @var{microsec}, gives the microseconds (or 0 for
1305systems that return time with the resolution of only one second).
1306
1307If the system doesn't provide a way to determine the processor run
1308time, get-internal-run-time returns the same time as current-time.
1309@end defun
1310
1288@node Time Calculations 1311@node Time Calculations
1289@section Time Calculations 1312@section Time Calculations
1290 1313
diff --git a/src/ChangeLog b/src/ChangeLog
index a38c3f7baeb..b65bb2d5714 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,5 +1,31 @@
12004-11-06 Lars Brinkhoff <lars@nocrew.org>
2
3 * config.in: Regenerate (add HAVE_GETRUSAGE).
4 * editfns.c (Fget_internal_run_time): New function.
5 (syms_of_data): Defsubr it.
6 * fns.c (sxhash): As far as possible, merge calculation of
7 hash code for symbols and strings.
8
92004-11-06 Eli Zaretskii <eliz@gnu.org>
10
11 * frame.c (syms_of_frame): Fix the example in the doc string.
12
132004-11-06 Jan Dj,Ad(Brv <jan.h.d@swipnet.se>
14
15 * eval.c (Feval): Remove check for INPUT_BLOCKED_P.
16
17 * xmenu.c (popup_get_selection, create_and_show_popup_menu)
18 (create_and_show_dialog): Revert change from 2004-10-31.
19
20
212004-11-05 Luc Teirlinck <teirllm@auburn.edu>
22
23 * macros.c (syms_of_macros) <defining-kbd-macro>: Doc fix.
24
12004-11-05 Kim F. Storm <storm@cua.dk> 252004-11-05 Kim F. Storm <storm@cua.dk>
2 26
27 * print.c (print_object): Print Lisp_Misc_Save_Value objects.
28
3 * fileio.c (Ffile_modes): Doc fix. 29 * fileio.c (Ffile_modes): Doc fix.
4 (auto_save_1): Check for Ffile_modes nil value. 30 (auto_save_1): Check for Ffile_modes nil value.
5 31
diff --git a/src/config.in b/src/config.in
index a2087b98b1f..c253f0c411b 100644
--- a/src/config.in
+++ b/src/config.in
@@ -196,6 +196,9 @@ Boston, MA 02111-1307, USA. */
196/* Define to 1 if you have the `getpt' function. */ 196/* Define to 1 if you have the `getpt' function. */
197#undef HAVE_GETPT 197#undef HAVE_GETPT
198 198
199/* Define to 1 if you have the `getrusage' function. */
200#undef HAVE_GETRUSAGE
201
199/* Define to 1 if you have the `getsockname' function. */ 202/* Define to 1 if you have the `getsockname' function. */
200#undef HAVE_GETSOCKNAME 203#undef HAVE_GETSOCKNAME
201 204
diff --git a/src/editfns.c b/src/editfns.c
index e83e53e9d24..2e8134d4495 100644
--- a/src/editfns.c
+++ b/src/editfns.c
@@ -39,6 +39,10 @@ Boston, MA 02111-1307, USA. */
39#include <stdio.h> 39#include <stdio.h>
40#endif 40#endif
41 41
42#if defined HAVE_SYS_RESOURCE_H
43#include <sys/resource.h>
44#endif
45
42#include <ctype.h> 46#include <ctype.h>
43 47
44#include "lisp.h" 48#include "lisp.h"
@@ -1375,6 +1379,47 @@ resolution finer than a second. */)
1375 1379
1376 return Flist (3, result); 1380 return Flist (3, result);
1377} 1381}
1382
1383DEFUN ("get-internal-run-time", Fget_internal_run_time, Sget_internal_run_time,
1384 0, 0, 0,
1385 doc: /* Return the current run time used by Emacs.
1386The time is returned as a list of three integers. The first has the
1387most significant 16 bits of the seconds, while the second has the
1388least significant 16 bits. The third integer gives the microsecond
1389count.
1390
1391On systems that can't determine the run time, get-internal-run-time
1392does the same thing as current-time. The microsecond count is zero on
1393systems that do not provide resolution finer than a second. */)
1394 ()
1395{
1396#ifdef HAVE_GETRUSAGE
1397 struct rusage usage;
1398 Lisp_Object result[3];
1399 int secs, usecs;
1400
1401 if (getrusage (RUSAGE_SELF, &usage) < 0)
1402 /* This shouldn't happen. What action is appropriate? */
1403 Fsignal (Qerror, Qnil);
1404
1405 /* Sum up user time and system time. */
1406 secs = usage.ru_utime.tv_sec + usage.ru_stime.tv_sec;
1407 usecs = usage.ru_utime.tv_usec + usage.ru_stime.tv_usec;
1408 if (usecs >= 1000000)
1409 {
1410 usecs -= 1000000;
1411 secs++;
1412 }
1413
1414 XSETINT (result[0], (secs >> 16) & 0xffff);
1415 XSETINT (result[1], (secs >> 0) & 0xffff);
1416 XSETINT (result[2], usecs);
1417
1418 return Flist (3, result);
1419#else
1420 return Fcurrent_time ();
1421#endif
1422}
1378 1423
1379 1424
1380int 1425int
@@ -4315,6 +4360,7 @@ functions if all the text being accessed has this property. */);
4315 defsubr (&Suser_full_name); 4360 defsubr (&Suser_full_name);
4316 defsubr (&Semacs_pid); 4361 defsubr (&Semacs_pid);
4317 defsubr (&Scurrent_time); 4362 defsubr (&Scurrent_time);
4363 defsubr (&Sget_internal_run_time);
4318 defsubr (&Sformat_time_string); 4364 defsubr (&Sformat_time_string);
4319 defsubr (&Sfloat_time); 4365 defsubr (&Sfloat_time);
4320 defsubr (&Sdecode_time); 4366 defsubr (&Sdecode_time);
diff --git a/src/eval.c b/src/eval.c
index 5fb35cee58b..d1d5d195762 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -1996,7 +1996,7 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0,
1996 struct backtrace backtrace; 1996 struct backtrace backtrace;
1997 struct gcpro gcpro1, gcpro2, gcpro3; 1997 struct gcpro gcpro1, gcpro2, gcpro3;
1998 1998
1999 if (handling_signal || INPUT_BLOCKED_P) 1999 if (handling_signal)
2000 abort (); 2000 abort ();
2001 2001
2002 if (SYMBOLP (form)) 2002 if (SYMBOLP (form))
diff --git a/src/fns.c b/src/fns.c
index b366cab196a..e0167ebf990 100644
--- a/src/fns.c
+++ b/src/fns.c
@@ -5007,15 +5007,14 @@ sxhash (obj, depth)
5007 hash = XUINT (obj); 5007 hash = XUINT (obj);
5008 break; 5008 break;
5009 5009
5010 case Lisp_Symbol:
5011 hash = sxhash_string (SDATA (SYMBOL_NAME (obj)),
5012 SCHARS (SYMBOL_NAME (obj)));
5013 break;
5014
5015 case Lisp_Misc: 5010 case Lisp_Misc:
5016 hash = XUINT (obj); 5011 hash = XUINT (obj);
5017 break; 5012 break;
5018 5013
5014 case Lisp_Symbol:
5015 obj = SYMBOL_NAME (obj);
5016 /* Fall through. */
5017
5019 case Lisp_String: 5018 case Lisp_String:
5020 hash = sxhash_string (SDATA (obj), SCHARS (obj)); 5019 hash = sxhash_string (SDATA (obj), SCHARS (obj));
5021 break; 5020 break;
diff --git a/src/frame.c b/src/frame.c
index 1935df35508..80d1876ef11 100644
--- a/src/frame.c
+++ b/src/frame.c
@@ -4285,7 +4285,7 @@ is a reasonable practice. See also the variable `x-resource-name'. */);
4285 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist, 4285 DEFVAR_LISP ("default-frame-alist", &Vdefault_frame_alist,
4286 doc: /* Alist of default values for frame creation. 4286 doc: /* Alist of default values for frame creation.
4287These may be set in your init file, like this: 4287These may be set in your init file, like this:
4288 (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1)) 4288 (setq default-frame-alist '((width . 80) (height . 55) (menu-bar-lines . 1)))
4289These override values given in window system configuration data, 4289These override values given in window system configuration data,
4290 including X Windows' defaults database. 4290 including X Windows' defaults database.
4291For values specific to the first Emacs frame, see `initial-frame-alist'. 4291For values specific to the first Emacs frame, see `initial-frame-alist'.
diff --git a/src/macros.c b/src/macros.c
index d0219a3be04..09ae87b0a59 100644
--- a/src/macros.c
+++ b/src/macros.c
@@ -392,7 +392,9 @@ syms_of_macros ()
392 defsubr (&Sstore_kbd_macro_event); 392 defsubr (&Sstore_kbd_macro_event);
393 393
394 DEFVAR_KBOARD ("defining-kbd-macro", defining_kbd_macro, 394 DEFVAR_KBOARD ("defining-kbd-macro", defining_kbd_macro,
395 doc: /* Non-nil while a keyboard macro is being defined. Don't set this! */); 395 doc: /* Non-nil while a keyboard macro is being defined. Don't set this!
396The value is the symbol `append' while appending to the definition of
397an existing macro. */);
396 398
397 DEFVAR_LISP ("executing-macro", &Vexecuting_macro, 399 DEFVAR_LISP ("executing-macro", &Vexecuting_macro,
398 doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */); 400 doc: /* Currently executing keyboard macro (string or vector); nil if none executing. */);
diff --git a/src/print.c b/src/print.c
index 5a0f7fe6220..76c648b9a2e 100644
--- a/src/print.c
+++ b/src/print.c
@@ -2085,6 +2085,15 @@ print_object (obj, printcharfun, escapeflag)
2085 PRINTCHAR ('>'); 2085 PRINTCHAR ('>');
2086 break; 2086 break;
2087 2087
2088 case Lisp_Misc_Save_Value:
2089 strout ("#<save_value ", -1, -1, printcharfun, 0);
2090 sprintf(buf, "ptr=0x%08x int=%d",
2091 (unsigned long) XSAVE_VALUE (obj)->pointer,
2092 XSAVE_VALUE (obj)->integer);
2093 strout (buf, -1, -1, printcharfun, 0);
2094 PRINTCHAR ('>');
2095 break;
2096
2088 default: 2097 default:
2089 goto badtype; 2098 goto badtype;
2090 } 2099 }
diff --git a/src/xmenu.c b/src/xmenu.c
index 145e4f70b9c..a08f4610101 100644
--- a/src/xmenu.c
+++ b/src/xmenu.c
@@ -115,7 +115,7 @@ extern XtAppContext Xt_app_con;
115 115
116static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **)); 116static Lisp_Object xdialog_show P_ ((FRAME_PTR, int, Lisp_Object, char **));
117static void popup_get_selection P_ ((XEvent *, struct x_display_info *, 117static void popup_get_selection P_ ((XEvent *, struct x_display_info *,
118 LWLIB_ID, int)); 118 LWLIB_ID, int, int));
119 119
120/* Define HAVE_BOXES if menus can handle radio and toggle buttons. */ 120/* Define HAVE_BOXES if menus can handle radio and toggle buttons. */
121 121
@@ -157,6 +157,8 @@ static void single_keymap_panes P_ ((Lisp_Object, Lisp_Object, Lisp_Object,
157static void list_of_panes P_ ((Lisp_Object)); 157static void list_of_panes P_ ((Lisp_Object));
158static void list_of_items P_ ((Lisp_Object)); 158static void list_of_items P_ ((Lisp_Object));
159 159
160extern EMACS_TIME timer_check P_ ((int));
161
160 162
161/* This holds a Lisp vector that holds the results of decoding 163/* This holds a Lisp vector that holds the results of decoding
162 the keymaps or alist-of-alists that specify a menu. 164 the keymaps or alist-of-alists that specify a menu.
@@ -1122,27 +1124,27 @@ on the left of the dialog box and all following items on the right.
1122 1124
1123 If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed. 1125 If DOWN_ON_KEYPRESS is nonzero, pop down if a key is pressed.
1124 1126
1125 This function used to have a DO_TIMERS argument which was
1126 1 in the dialog case, and caused it to run Lisp-level timers.
1127 That was unsafe so we removed it, but does anyone remember
1128 why menus and dialogs were treated differently?
1129
1130 NOTE: All calls to popup_get_selection should be protected 1127 NOTE: All calls to popup_get_selection should be protected
1131 with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */ 1128 with BLOCK_INPUT, UNBLOCK_INPUT wrappers. */
1132 1129
1133#ifdef USE_X_TOOLKIT 1130#ifdef USE_X_TOOLKIT
1134static void 1131static void
1135popup_get_selection (initial_event, dpyinfo, id, down_on_keypress) 1132popup_get_selection (initial_event, dpyinfo, id, do_timers, down_on_keypress)
1136 XEvent *initial_event; 1133 XEvent *initial_event;
1137 struct x_display_info *dpyinfo; 1134 struct x_display_info *dpyinfo;
1138 LWLIB_ID id; 1135 LWLIB_ID id;
1136 int do_timers;
1139 int down_on_keypress; 1137 int down_on_keypress;
1140{ 1138{
1141 XEvent event; 1139 XEvent event;
1142 1140
1143 while (popup_activated_flag) 1141 while (popup_activated_flag)
1144 { 1142 {
1145 if (initial_event) 1143 /* If we have no events to run, consider timers. */
1144 if (do_timers && !XtAppPending (Xt_app_con))
1145 timer_check (1);
1146
1147 if (initial_event)
1146 { 1148 {
1147 event = *initial_event; 1149 event = *initial_event;
1148 initial_event = 0; 1150 initial_event = 0;
@@ -2488,7 +2490,7 @@ create_and_show_popup_menu (f, first_wv, x, y, for_click)
2488 popup_activated_flag = 1; 2490 popup_activated_flag = 1;
2489 2491
2490 /* Process events that apply to the menu. */ 2492 /* Process events that apply to the menu. */
2491 popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0); 2493 popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), menu_id, 0, 0);
2492 2494
2493 /* fp turned off the following statement and wrote a comment 2495 /* fp turned off the following statement and wrote a comment
2494 that it is unnecessary--that the menu has already disappeared. 2496 that it is unnecessary--that the menu has already disappeared.
@@ -2882,7 +2884,8 @@ create_and_show_dialog (f, first_wv)
2882 Fcons (make_number (dialog_id >> (fact)), 2884 Fcons (make_number (dialog_id >> (fact)),
2883 make_number (dialog_id & ~(-1 << (fact))))); 2885 make_number (dialog_id & ~(-1 << (fact)))));
2884 2886
2885 popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f), dialog_id, 1); 2887 popup_get_selection ((XEvent *) 0, FRAME_X_DISPLAY_INFO (f),
2888 dialog_id, 1, 1);
2886 2889
2887 unbind_to (count, Qnil); 2890 unbind_to (count, Qnil);
2888 } 2891 }