aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-05-23 05:08:13 +0000
committerKaroly Lorentey2004-05-23 05:08:13 +0000
commit2d2884b5c5f2e1ce27e30123111536f9db8ddfc7 (patch)
treed429cc1578b1d8bcb8d9f0a9d161d8f2361d8ae3
parentd4d89d3741e8cfd34f7db695bf2a801e5584f9a7 (diff)
parent71d5a208a41e0982a9565d8cc215bd110fcac864 (diff)
downloademacs-2d2884b5c5f2e1ce27e30123111536f9db8ddfc7.tar.gz
emacs-2d2884b5c5f2e1ce27e30123111536f9db8ddfc7.zip
Merged in changes from CVS trunk.
Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-330 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-331 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-332 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-333 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-334 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-335 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-336 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-337 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-338 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-173
-rw-r--r--lisp/ChangeLog90
-rw-r--r--lisp/allout.el193
-rw-r--r--lisp/compare-w.el10
-rw-r--r--lisp/emacs-lisp/lisp.el61
-rw-r--r--lisp/facemenu.el28
-rw-r--r--lisp/files.el77
-rw-r--r--lisp/gnus/ChangeLog4
-rw-r--r--lisp/gs.el3
-rw-r--r--lisp/help-fns.el5
-rw-r--r--lisp/international/characters.el2
-rw-r--r--lisp/locate.el8
-rw-r--r--lisp/progmodes/ada-mode.el16
-rw-r--r--lisp/progmodes/etags.el19
-rw-r--r--lisp/progmodes/idlw-shell.el4
-rw-r--r--lisp/textmodes/bibtex.el54
-rw-r--r--lisp/textmodes/flyspell.el1
-rw-r--r--lisp/textmodes/paragraphs.el2
-rw-r--r--lispref/ChangeLog19
-rw-r--r--lispref/compile.texi34
-rw-r--r--lispref/eval.texi9
-rw-r--r--lispref/lists.texi42
-rw-r--r--lispref/searching.texi16
-rw-r--r--lispref/streams.texi11
-rw-r--r--lispref/syntax.texi8
-rw-r--r--src/ChangeLog138
-rw-r--r--src/alloc.c74
-rw-r--r--src/buffer.c10
-rw-r--r--src/casefiddle.c6
-rw-r--r--src/emacs.c2
-rw-r--r--src/fileio.c9
-rw-r--r--src/insdel.c4
-rw-r--r--src/intervals.c12
-rw-r--r--src/keyboard.c3
-rw-r--r--src/keymap.c8
-rw-r--r--src/xdisp.c14
35 files changed, 656 insertions, 340 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 81da604aea5..aea6e7d6d10 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,87 @@
12004-05-22 Richard M. Stallman <rms@gnu.org>
2
3 * textmodes/paragraphs.el (sentence-end): Match unicode curly quotes
4 as a close quote.
5
6 * textmodes/bibtex.el: Use assoc-string, not assoc-ignore-case.
7
8 * progmodes/idlw-shell.el (idlwave-shell-get-object-class):
9 Use assoc-string, not assoc-ignore-case.
10
11 * progmodes/ada-mode.el: Use assoc-string, not assoc-ignore-case.
12
13 * emacs-lisp/lisp.el (mark-defun, narrow-to-defun):
14 If moving back then fwd gets a defun that ends before point,
15 try again moving fwd then back.
16
17 * files.el (file-name-non-special): Allow t in file-arg-indices
18 to mean requote the return value. Use `identity' as an element
19 rather than as the whole value.
20
21 * gs.el (gs-options): Add -dSAFER. Mark it risky.
22
232004-05-22 Juanma Barranquero <lektu@terra.es>
24
25 * help-fns.el (help-add-fundoc-usage): Use %S only for output of
26 `help-make-usage'.
27 (help-highlight-arguments): Skip function name before searching
28 for arguments.
29
302004-05-21 Juanma Barranquero <lektu@terra.es>
31
32 * allout.el (allout-chart-subtree, allout-rebullet-topic-grunt):
33 Don't mention in the docstring these arguments meant for
34 internal (recursive) use only.
35 (allout-char-spec): Comment out (it's not implemented).
36 (allout-old-expose-topic, allout-exposure): Fix docstring and add
37 obsolescence declaration.
38 (allout-flatten-exposed-to-buffer)
39 (allout-indented-exposed-to-buffer): Fix typos in docstring.
40 (my-mark-marker): Doc fix.
41 (produce-allout-mode-map, allout-sibling-index)
42 (allout-isearch-expose, allout-distinctive-bullet)
43 (allout-open-topic, allout-reindent-body)
44 (allout-rebullet-heading, allout-process-exposed)
45 (allout-insert-listified, allout-latex-verb-quote)
46 (allout-insert-latex-header, allout-insert-latex-trailer):
47 Make arguments match their use in docstring.
48 (allout-primary-bullet, allout-old-style-prefixes)
49 (allout-inhibit-protection, allout-init, allout-mode)
50 (allout-before-change-protect, allout-flag-region):
51 Use "Emacs" instead of "emacs" in docstrings.
52
532004-05-21 Masayuki Ataka <ataka@milk.freemail.ne.jp> (tiny change)
54
55 * international/characters.el: Modify syntax of more characters.
56
572004-05-21 Masatake YAMATO <jet@gyve.org>
58
59 * progmodes/etags.el (tags-apropos, list-tags): Require
60 apropos.
61 (etags-tags-completion-table): Show parsing progress.
62
632004-05-20 Luc Teirlinck <teirllm@auburn.edu>
64
65 * locate.el (locate-prompt-for-command): Shorten first line of
66 docstring.
67 (locate-mode): Expand docstring and include keymap summary.
68
69 * files.el (find-file-noselect-1): Limit the scope of the
70 `inhibit-read-only' binding. Make sure that `inhibit-read-only'
71 is, by default, nil during the execution of
72 `find-file-not-found-functions' and `find-file-hook'.
73
742004-05-20 Michael Mauger <mmaug@yahoo.com>
75
76 * facemenu.el (facemenu-color-name-equal): New function.
77 (list-colors-display): Use it to compare colors instead of
78 facemenu-color-equal.
79
802004-05-20 Dan Nicolaescu <dann@ics.uci.edu>
81
82 * compare-w.el (compare-windows-face): Use min-colors instead of
83 checking for tty or pc types.
84
12004-05-19 Stefan Monnier <monnier@iro.umontreal.ca> 852004-05-19 Stefan Monnier <monnier@iro.umontreal.ca>
2 86
3 * simple.el (do-auto-fill): Remove unused vars `bol' and `opoint'. 87 * simple.el (do-auto-fill): Remove unused vars `bol' and `opoint'.
@@ -23,7 +107,7 @@
232004-05-19 Masatake YAMATO <jet@gyve.org> 1072004-05-19 Masatake YAMATO <jet@gyve.org>
24 108
25 * wid-edit.el (widget-radio-button-notify): Revert my last 109 * wid-edit.el (widget-radio-button-notify): Revert my last
26 change. Reported by Katsumi Yamaoka <yamaoka@jpl.org>. 110 change. Reported by Katsumi Yamaoka <yamaoka@jpl.org>.
27 111
282004-05-19 Kenichi Handa <handa@m17n.org> 1122004-05-19 Kenichi Handa <handa@m17n.org>
29 113
@@ -598,7 +682,7 @@
598 list of arguments in a string. 682 list of arguments in a string.
599 (help-highlight-arguments): Highlight the function arguments and 683 (help-highlight-arguments): Highlight the function arguments and
600 all uses of them in the docstring. 684 all uses of them in the docstring.
601 (describe-function-1): Use it. Do docstring output via `insert', 685 (describe-function-1): Use it. Do docstring output via `insert',
602 not 'princ', so text attributes are preserved. 686 not 'princ', so text attributes are preserved.
603 687
604 * winner.el (winner-mode-map): Move `winner-undo' and 688 * winner.el (winner-mode-map): Move `winner-undo' and
@@ -623,7 +707,7 @@
623 (bibtex-parse-entry): Fix docstring. 707 (bibtex-parse-entry): Fix docstring.
624 (bibtex-print-help-message): Use bibtex-field-list. 708 (bibtex-print-help-message): Use bibtex-field-list.
625 (bibtex-make-field): Use bibtex-field-list. 709 (bibtex-make-field): Use bibtex-field-list.
626 (bibtex-entry-index): Bugfix. Return crossref key if required. 710 (bibtex-entry-index): Bugfix. Return crossref key if required.
627 (bibtex-lessp): Fix docstring. 711 (bibtex-lessp): Fix docstring.
628 712
6292004-05-03 Luc Teirlinck <teirllm@auburn.edu> 7132004-05-03 Luc Teirlinck <teirllm@auburn.edu>
diff --git a/lisp/allout.el b/lisp/allout.el
index 458db865535..dd4495cfa84 100644
--- a/lisp/allout.el
+++ b/lisp/allout.el
@@ -1,6 +1,6 @@
1;;; allout.el --- extensive outline mode for use alone and with other modes 1;;; allout.el --- extensive outline mode for use alone and with other modes
2 2
3;; Copyright (C) 1992, 1993, 1994, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 93, 94, 2001, 02, 2004 Free Software Foundation, Inc.
4 4
5;; Author: Ken Manheimer <klm@zope.com> 5;; Author: Ken Manheimer <klm@zope.com>
6;; Maintainer: Ken Manheimer <klm@zope.com> 6;; Maintainer: Ken Manheimer <klm@zope.com>
@@ -46,7 +46,7 @@
46;; 46;;
47;; The outline menubar additions provide quick reference to many of 47;; The outline menubar additions provide quick reference to many of
48;; the features, and see the docstring of the function `allout-init' 48;; the features, and see the docstring of the function `allout-init'
49;; for instructions on priming your emacs session for automatic 49;; for instructions on priming your Emacs session for automatic
50;; activation of `allout-mode'. 50;; activation of `allout-mode'.
51;; 51;;
52;; See the docstring of the variables `allout-layout' and 52;; See the docstring of the variables `allout-layout' and
@@ -162,7 +162,7 @@ prefix, which is concluded by bullets that includes the value of this
162var and the respective allout-*-bullets-string vars. 162var and the respective allout-*-bullets-string vars.
163 163
164The value of an asterisk (`*') provides for backwards compatibility 164The value of an asterisk (`*') provides for backwards compatibility
165with the original emacs outline mode. See `allout-plain-bullets-string' 165with the original Emacs outline mode. See `allout-plain-bullets-string'
166and `allout-distinctive-bullets-string' for the range of available 166and `allout-distinctive-bullets-string' for the range of available
167bullets." 167bullets."
168 :type 'string 168 :type 'string
@@ -263,7 +263,7 @@ from regular comments that start at bol.")
263 263
264Non-nil restricts the topic creation and modification 264Non-nil restricts the topic creation and modification
265functions to asterix-padded prefixes, so they look exactly 265functions to asterix-padded prefixes, so they look exactly
266like the original emacs-outline style prefixes. 266like the original Emacs-outline style prefixes.
267 267
268Whatever the setting of this variable, both old and new style prefixes 268Whatever the setting of this variable, both old and new style prefixes
269are always respected by the topic maneuvering functions." 269are always respected by the topic maneuvering functions."
@@ -491,7 +491,7 @@ those that do not have the variable `comment-start' set. A value of
491(defcustom allout-inhibit-protection nil 491(defcustom allout-inhibit-protection nil
492 "*Non-nil disables warnings and confirmation-checks for concealed-text edits. 492 "*Non-nil disables warnings and confirmation-checks for concealed-text edits.
493 493
494Outline mode uses emacs change-triggered functions to detect unruly 494Outline mode uses Emacs change-triggered functions to detect unruly
495changes to concealed regions. Set this var non-nil to disable the 495changes to concealed regions. Set this var non-nil to disable the
496protection, potentially increasing text-entry responsiveness a bit. 496protection, potentially increasing text-entry responsiveness a bit.
497 497
@@ -708,7 +708,7 @@ Works with respect to `allout-plain-bullets-string' and
708(defvar allout-mode-map nil "Keybindings for (allout) outline minor mode.") 708(defvar allout-mode-map nil "Keybindings for (allout) outline minor mode.")
709;;;_ > produce-allout-mode-map (keymap-alist &optional base-map) 709;;;_ > produce-allout-mode-map (keymap-alist &optional base-map)
710(defun produce-allout-mode-map (keymap-list &optional base-map) 710(defun produce-allout-mode-map (keymap-list &optional base-map)
711 "Produce keymap for use as allout-mode-map, from keymap-list. 711 "Produce keymap for use as allout-mode-map, from KEYMAP-LIST.
712 712
713Built on top of optional BASE-MAP, or empty sparse map if none specified. 713Built on top of optional BASE-MAP, or empty sparse map if none specified.
714See doc string for allout-keybindings-list for format of binding list." 714See doc string for allout-keybindings-list for format of binding list."
@@ -939,7 +939,7 @@ MODE is one of the following symbols:
939 - anything else \(eg, t) for auto-activation and auto-layout, without 939 - anything else \(eg, t) for auto-activation and auto-layout, without
940 any confirmation check. 940 any confirmation check.
941 941
942Use this function to setup your emacs session for automatic activation 942Use this function to setup your Emacs session for automatic activation
943of allout outline mode, contingent to the buffer-specific setting of 943of allout outline mode, contingent to the buffer-specific setting of
944the `allout-layout' variable. (See `allout-layout' and 944the `allout-layout' variable. (See `allout-layout' and
945`allout-expose-topic' docstrings for more details on auto layout). 945`allout-expose-topic' docstrings for more details on auto layout).
@@ -948,8 +948,8 @@ the `allout-layout' variable. (See `allout-layout' and
948`allout-find-file-hook' in `find-file-hook', and giving 948`allout-find-file-hook' in `find-file-hook', and giving
949`allout-auto-activation' a suitable setting. 949`allout-auto-activation' a suitable setting.
950 950
951To prime your emacs session for full auto-outline operation, include 951To prime your Emacs session for full auto-outline operation, include
952the following two lines in your emacs init file: 952the following two lines in your Emacs init file:
953 953
954\(require 'allout) 954\(require 'allout)
955\(allout-init t)" 955\(allout-init t)"
@@ -1044,7 +1044,7 @@ Below is a description of the bindings, and then explanation of
1044special `allout-mode' features and terminology. See also the outline 1044special `allout-mode' features and terminology. See also the outline
1045menubar additions for quick reference to many of the features, and see 1045menubar additions for quick reference to many of the features, and see
1046the docstring of the function `allout-init' for instructions on 1046the docstring of the function `allout-init' for instructions on
1047priming your emacs session for automatic activation of `allout-mode'. 1047priming your Emacs session for automatic activation of `allout-mode'.
1048 1048
1049 1049
1050The bindings are dictated by the `allout-keybindings-list' and 1050The bindings are dictated by the `allout-keybindings-list' and
@@ -1102,7 +1102,7 @@ C-c = p allout-flatten-exposed-to-buffer
1102 Like above 'copy-exposed', but convert topic 1102 Like above 'copy-exposed', but convert topic
1103 prefixes to section.subsection... numeric 1103 prefixes to section.subsection... numeric
1104 format. 1104 format.
1105ESC ESC (allout-init t) Setup emacs session for outline mode 1105ESC ESC (allout-init t) Setup Emacs session for outline mode
1106 auto-activation. 1106 auto-activation.
1107 1107
1108 HOT-SPOT Operation 1108 HOT-SPOT Operation
@@ -1132,7 +1132,7 @@ twice in a row to get to the hot-spot.
1132 1132
1133Topic hierarchy constituents - TOPICS and SUBTOPICS: 1133Topic hierarchy constituents - TOPICS and SUBTOPICS:
1134 1134
1135TOPIC: A basic, coherent component of an emacs outline. It can 1135TOPIC: A basic, coherent component of an Emacs outline. It can
1136 contain other topics, and it can be subsumed by other topics, 1136 contain other topics, and it can be subsumed by other topics,
1137CURRENT topic: 1137CURRENT topic:
1138 The visible topic most immediately containing the cursor. 1138 The visible topic most immediately containing the cursor.
@@ -1303,7 +1303,7 @@ OPEN: A topic that is not closed, though its offspring or body may be."
1303 ) 1303 )
1304 1304
1305 ; selective-display is the 1305 ; selective-display is the
1306 ; emacs conditional exposure 1306 ; Emacs conditional exposure
1307 ; mechanism: 1307 ; mechanism:
1308 (allout-resumptions 'selective-display '(t)) 1308 (allout-resumptions 'selective-display '(t))
1309 (if allout-inhibit-protection 1309 (if allout-inhibit-protection
@@ -1537,7 +1537,7 @@ Actually, returns prefix beginning point."
1537(defun allout-sibling-index (&optional depth) 1537(defun allout-sibling-index (&optional depth)
1538 "Item number of this prospective topic among its siblings. 1538 "Item number of this prospective topic among its siblings.
1539 1539
1540If optional arg depth is greater than current depth, then we're 1540If optional arg DEPTH is greater than current depth, then we're
1541opening a new level, and return 0. 1541opening a new level, and return 0.
1542 1542
1543If less than this depth, ascend to that depth and count..." 1543If less than this depth, ascend to that depth and count..."
@@ -1622,8 +1622,7 @@ Return the location of the beginning of the heading, or nil if not found."
1622 "Produce a location \"chart\" of subtopics of the containing topic. 1622 "Produce a location \"chart\" of subtopics of the containing topic.
1623 1623
1624Optional argument LEVELS specifies the depth \(relative to start 1624Optional argument LEVELS specifies the depth \(relative to start
1625depth) for the chart. Subsequent optional args are not for public 1625depth) for the chart.
1626use.
1627 1626
1628Charts are used to capture outline structure, so that outline altering 1627Charts are used to capture outline structure, so that outline altering
1629routines need assess the structure only once, and then use the chart 1628routines need assess the structure only once, and then use the chart
@@ -1636,9 +1635,11 @@ list containing, recursively, the charts for the respective subtopics.
1636The chart for a topics' offspring precedes the entry for the topic 1635The chart for a topics' offspring precedes the entry for the topic
1637itself. 1636itself.
1638 1637
1639The other function parameters are for internal recursion, and should 1638\(fn &optional levels)"
1640not be specified by external callers. ORIG-DEPTH is depth of topic at 1639
1641starting point, and PREV-DEPTH is depth of prior topic." 1640 ;; The other function parameters are for internal recursion, and should
1641 ;; not be specified by external callers. ORIG-DEPTH is depth of topic at
1642 ;; starting point, and PREV-DEPTH is depth of prior topic."
1642 1643
1643 (let ((original (not orig-depth)) ; `orig-depth' set only in recursion. 1644 (let ((original (not orig-depth)) ; `orig-depth' set only in recursion.
1644 chart curr-depth) 1645 chart curr-depth)
@@ -1652,7 +1653,7 @@ starting point, and PREV-DEPTH is depth of prior topic."
1652 1653
1653 ;; Loop over the current levels' siblings. Besides being more 1654 ;; Loop over the current levels' siblings. Besides being more
1654 ;; efficient than tail-recursing over a level, it avoids exceeding 1655 ;; efficient than tail-recursing over a level, it avoids exceeding
1655 ;; the typically quite constrained emacs max-lisp-eval-depth. 1656 ;; the typically quite constrained Emacs max-lisp-eval-depth.
1656 ;; 1657 ;;
1657 ;; Probably would speed things up to implement loop-based stack 1658 ;; Probably would speed things up to implement loop-based stack
1658 ;; operation rather than recursing for lower levels. Bah. 1659 ;; operation rather than recursing for lower levels. Bah.
@@ -1741,36 +1742,36 @@ start point."
1741 (setq chart (cdr chart)))) 1742 (setq chart (cdr chart))))
1742 result)) 1743 result))
1743;;;_ X allout-chart-spec (chart spec &optional exposing) 1744;;;_ X allout-chart-spec (chart spec &optional exposing)
1744(defun allout-chart-spec (chart spec &optional exposing) 1745;; (defun allout-chart-spec (chart spec &optional exposing)
1745 "Not yet \(if ever) implemented. 1746;; "Not yet \(if ever) implemented.
1746 1747
1747Produce exposure directives given topic/subtree CHART and an exposure SPEC. 1748;; Produce exposure directives given topic/subtree CHART and an exposure SPEC.
1748 1749
1749Exposure spec indicates the locations to be exposed and the prescribed 1750;; Exposure spec indicates the locations to be exposed and the prescribed
1750exposure status. Optional arg EXPOSING is an integer, with 0 1751;; exposure status. Optional arg EXPOSING is an integer, with 0
1751indicating pending concealment, anything higher indicating depth to 1752;; indicating pending concealment, anything higher indicating depth to
1752which subtopic headers should be exposed, and negative numbers 1753;; which subtopic headers should be exposed, and negative numbers
1753indicating (negative of) the depth to which subtopic headers and 1754;; indicating (negative of) the depth to which subtopic headers and
1754bodies should be exposed. 1755;; bodies should be exposed.
1755 1756
1756The produced list can have two types of entries. Bare numbers 1757;; The produced list can have two types of entries. Bare numbers
1757indicate points in the buffer where topic headers that should be 1758;; indicate points in the buffer where topic headers that should be
1758exposed reside. 1759;; exposed reside.
1759 1760
1760 - bare negative numbers indicates that the topic starting at the 1761;; - bare negative numbers indicates that the topic starting at the
1761 point which is the negative of the number should be opened, 1762;; point which is the negative of the number should be opened,
1762 including their entries. 1763;; including their entries.
1763 - bare positive values indicate that this topic header should be 1764;; - bare positive values indicate that this topic header should be
1764 opened. 1765;; opened.
1765 - Lists signify the beginning and end points of regions that should 1766;; - Lists signify the beginning and end points of regions that should
1766 be flagged, and the flag to employ. (For concealment: `\(\?r\)', and 1767;; be flagged, and the flag to employ. (For concealment: `\(\?r\)', and
1767 exposure:" 1768;; exposure:"
1768 (while spec 1769;; (while spec
1769 (cond ((listp spec) 1770;; (cond ((listp spec)
1770 ) 1771;; )
1771 ) 1772;; )
1772 (setq spec (cdr spec))) 1773;; (setq spec (cdr spec)))
1773 ) 1774;; )
1774 1775
1775;;;_ - Within Topic 1776;;;_ - Within Topic
1776;;;_ > allout-goto-prefix () 1777;;;_ > allout-goto-prefix ()
@@ -2138,7 +2139,7 @@ Changes to concealed regions are ignored while file is being written.
2138writes, like crypt and zip modes.) 2139writes, like crypt and zip modes.)
2139 2140
2140Locally bound in outline buffers to `before-change-functions', which 2141Locally bound in outline buffers to `before-change-functions', which
2141in emacs 19 is run before any change to the buffer. 2142in Emacs 19 is run before any change to the buffer.
2142 2143
2143Any functions which set [`this-command' to `undo', or which set] 2144Any functions which set [`this-command' to `undo', or which set]
2144`allout-override-protect' non-nil (as does, eg, allout-flag-chars) 2145`allout-override-protect' non-nil (as does, eg, allout-flag-chars)
@@ -2153,7 +2154,7 @@ are exempt from this restriction."
2153 ; Both beginning and end chars must 2154 ; Both beginning and end chars must
2154 ; be exposed: 2155 ; be exposed:
2155 (save-excursion (if (memq this-command '(newline open-line)) 2156 (save-excursion (if (memq this-command '(newline open-line))
2156 ;; Compensate for stupid emacs {new, 2157 ;; Compensate for stupid Emacs {new,
2157 ;; open-}line display optimization: 2158 ;; open-}line display optimization:
2158 (setq beg (1+ beg) 2159 (setq beg (1+ beg)
2159 end (1+ end))) 2160 end (1+ end)))
@@ -2165,7 +2166,7 @@ are exempt from this restriction."
2165 (save-match-data 2166 (save-match-data
2166 (if (equal this-command 'undo) 2167 (if (equal this-command 'undo)
2167 ;; Allow undo without inhibition. 2168 ;; Allow undo without inhibition.
2168 ;; - Undoing new and open-line hits stupid emacs redisplay 2169 ;; - Undoing new and open-line hits stupid Emacs redisplay
2169 ;; optimization (em 19 cmds.c, ~ line 200). 2170 ;; optimization (em 19 cmds.c, ~ line 200).
2170 ;; - Presumably, undoing what was properly protected when 2171 ;; - Presumably, undoing what was properly protected when
2171 ;; done. 2172 ;; done.
@@ -2331,7 +2332,7 @@ return to regular interpretation of self-insert characters."
2331 (let* ((this-key-num (cond 2332 (let* ((this-key-num (cond
2332 ((numberp last-command-char) 2333 ((numberp last-command-char)
2333 last-command-char) 2334 last-command-char)
2334 ;; XXX Only xemacs has characterp. 2335 ;; XXX Only XEmacs has characterp.
2335 ((and (fboundp 'characterp) 2336 ((and (fboundp 'characterp)
2336 (characterp last-command-char)) 2337 (characterp last-command-char))
2337 (char-to-int last-command-char)) 2338 (char-to-int last-command-char))
@@ -2385,7 +2386,7 @@ Called as part of `allout-post-command-business'."
2385 2386
2386;;;_ > allout-flag-region (from to flag) 2387;;;_ > allout-flag-region (from to flag)
2387(defmacro allout-flag-region (from to flag) 2388(defmacro allout-flag-region (from to flag)
2388 "Hide or show lines from FROM to TO, via emacs selective-display FLAG char. 2389 "Hide or show lines from FROM to TO, via Emacs selective-display FLAG char.
2389Ie, text following flag C-m \(carriage-return) is hidden until the 2390Ie, text following flag C-m \(carriage-return) is hidden until the
2390next C-j (newline) char. 2391next C-j (newline) char.
2391 2392
@@ -2398,7 +2399,7 @@ Returns the endpoint of the region."
2398 2399
2399;;;_ > allout-isearch-expose (mode) 2400;;;_ > allout-isearch-expose (mode)
2400(defun allout-isearch-expose (mode) 2401(defun allout-isearch-expose (mode)
2401 "Mode is either 'clear, 'start, 'continue, or 'final." 2402 "MODE is either 'clear, 'start, 'continue, or 'final."
2402 ;; allout-isearch-prior-pos encodes exposure status of prior pos: 2403 ;; allout-isearch-prior-pos encodes exposure status of prior pos:
2403 ;; (pos was-vis header-pos end-pos) 2404 ;; (pos was-vis header-pos end-pos)
2404 ;; pos - point of concern 2405 ;; pos - point of concern
@@ -2507,7 +2508,7 @@ Offer one suitable for current depth DEPTH as default."
2507 ) 2508 )
2508;;;_ > allout-distinctive-bullet (bullet) 2509;;;_ > allout-distinctive-bullet (bullet)
2509(defun allout-distinctive-bullet (bullet) 2510(defun allout-distinctive-bullet (bullet)
2510 "True if bullet is one of those on `allout-distinctive-bullets-string'." 2511 "True if BULLET is one of those on `allout-distinctive-bullets-string'."
2511 (string-match (regexp-quote bullet) allout-distinctive-bullets-string)) 2512 (string-match (regexp-quote bullet) allout-distinctive-bullets-string))
2512;;;_ > allout-numbered-type-prefix (&optional prefix) 2513;;;_ > allout-numbered-type-prefix (&optional prefix)
2513(defun allout-numbered-type-prefix (&optional prefix) 2514(defun allout-numbered-type-prefix (&optional prefix)
@@ -2679,7 +2680,7 @@ index for each successive sibling)."
2679 ) 2680 )
2680;;;_ > allout-open-topic (relative-depth &optional before use_sib_bullet) 2681;;;_ > allout-open-topic (relative-depth &optional before use_sib_bullet)
2681(defun allout-open-topic (relative-depth &optional before use_sib_bullet) 2682(defun allout-open-topic (relative-depth &optional before use_sib_bullet)
2682 "Open a new topic at depth DEPTH. 2683 "Open a new topic at depth RELATIVE-DEPTH.
2683 2684
2684New topic is situated after current one, unless optional flag BEFORE 2685New topic is situated after current one, unless optional flag BEFORE
2685is non-nil, or unless current line is complete empty (not even 2686is non-nil, or unless current line is complete empty (not even
@@ -2900,7 +2901,7 @@ Maintains outline hanging topic indentation if
2900 (do-auto-fill)))) 2901 (do-auto-fill))))
2901;;;_ > allout-reindent-body (old-depth new-depth &optional number) 2902;;;_ > allout-reindent-body (old-depth new-depth &optional number)
2902(defun allout-reindent-body (old-depth new-depth &optional number) 2903(defun allout-reindent-body (old-depth new-depth &optional number)
2903 "Reindent body lines which were indented at old-depth to new-depth. 2904 "Reindent body lines which were indented at OLD-DEPTH to NEW-DEPTH.
2904 2905
2905Optional arg NUMBER indicates numbering is being added, and it must 2906Optional arg NUMBER indicates numbering is being added, and it must
2906be accommodated. 2907be accommodated.
@@ -2974,15 +2975,13 @@ Note that refill of indented paragraphs is not done."
2974 2975
2975 "Adjust bullet of current topic prefix. 2976 "Adjust bullet of current topic prefix.
2976 2977
2977All args are optional.
2978
2979If SOLICIT is non-nil, then the choice of bullet is solicited from 2978If SOLICIT is non-nil, then the choice of bullet is solicited from
2980user. If it's a character, then that character is offered as the 2979user. If it's a character, then that character is offered as the
2981default, otherwise the one suited to the context \(according to 2980default, otherwise the one suited to the context \(according to
2982distinction or depth) is offered. If non-nil, then the 2981distinction or depth) is offered. If non-nil, then the
2983context-specific bullet is just used. 2982context-specific bullet is just used.
2984 2983
2985Second arg DEPTH forces the topic prefix to that depth, regardless 2984Second arg NEW-DEPTH forces the topic prefix to that depth, regardless
2986of the topic's current depth. 2985of the topic's current depth.
2987 2986
2988Third arg NUMBER-CONTROL can force the prefix to or away from 2987Third arg NUMBER-CONTROL can force the prefix to or away from
@@ -3095,13 +3094,13 @@ With repeat count, shift topic depth by that amount."
3095contained subtopics. See `allout-rebullet-heading' for rebulleting 3094contained subtopics. See `allout-rebullet-heading' for rebulleting
3096behavior. 3095behavior.
3097 3096
3098All arguments are optional. 3097Arg RELATIVE-DEPTH means to shift the depth of the entire
3099
3100First arg RELATIVE-DEPTH means to shift the depth of the entire
3101topic that amount. 3098topic that amount.
3102 3099
3103The rest of the args are for internal recursive use by the function 3100\(fn &optional RELATIVE-DEPTH)"
3104itself. The are STARTING-DEPTH, STARTING-POINT, and INDEX." 3101
3102 ;; All args except the first one are for internal recursive use by the
3103 ;; function itself.
3105 3104
3106 (let* ((relative-depth (or relative-depth 0)) 3105 (let* ((relative-depth (or relative-depth 0))
3107 (new-depth (allout-depth)) 3106 (new-depth (allout-depth))
@@ -3900,11 +3899,7 @@ Examples:
3900 max-pos))) 3899 max-pos)))
3901;;;_ > allout-old-expose-topic (spec &rest followers) 3900;;;_ > allout-old-expose-topic (spec &rest followers)
3902(defun allout-old-expose-topic (spec &rest followers) 3901(defun allout-old-expose-topic (spec &rest followers)
3903 3902 "Dictate wholesale exposure scheme for current topic, according to SPEC.
3904 "Deprecated. Use `allout-expose-topic' \(with different schema
3905format) instead.
3906
3907Dictate wholesale exposure scheme for current topic, according to SPEC.
3908 3903
3909SPEC is either a number or a list. Optional successive args 3904SPEC is either a number or a list. Optional successive args
3910dictate exposure for subsequent siblings of current topic. 3905dictate exposure for subsequent siblings of current topic.
@@ -3931,7 +3926,7 @@ dictates the exposure depth of the topic as a whole. Subsequent
3931elements of the list are nested SPECs, dictating the specific exposure 3926elements of the list are nested SPECs, dictating the specific exposure
3932for the corresponding offspring of the topic. 3927for the corresponding offspring of the topic.
3933 3928
3934Optional FOLLOWER arguments dictate exposure for succeeding siblings." 3929Optional FOLLOWERS arguments dictate exposure for succeeding siblings."
3935 3930
3936 (interactive "xExposure spec: ") 3931 (interactive "xExposure spec: ")
3937 (let ((depth (allout-current-depth)) 3932 (let ((depth (allout-current-depth))
@@ -3976,6 +3971,9 @@ Optional FOLLOWER arguments dictate exposure for succeeding siblings."
3976 (allout-old-expose-topic (car followers)) 3971 (allout-old-expose-topic (car followers))
3977 (setq followers (cdr followers))) 3972 (setq followers (cdr followers)))
3978 max-pos)) 3973 max-pos))
3974(make-obsolete 'allout-old-expose-topic
3975 "use `allout-expose-topic' (with different schema format) instead."
3976 "19.23")
3979;;;_ > allout-new-exposure '() 3977;;;_ > allout-new-exposure '()
3980(defmacro allout-new-exposure (&rest spec) 3978(defmacro allout-new-exposure (&rest spec)
3981 "Literal frontend for `allout-expose-topic', doesn't evaluate arguments. 3979 "Literal frontend for `allout-expose-topic', doesn't evaluate arguments.
@@ -4006,9 +4004,7 @@ Examples:
4006 (list 'allout-expose-topic (list 'quote spec)))) 4004 (list 'allout-expose-topic (list 'quote spec))))
4007;;;_ > allout-exposure '() 4005;;;_ > allout-exposure '()
4008(defmacro allout-exposure (&rest spec) 4006(defmacro allout-exposure (&rest spec)
4009 "Being deprecated - use more recent `allout-new-exposure' instead. 4007 "Literal frontend for `allout-old-expose-topic', doesn't evaluate arguments
4010
4011Literal frontend for `allout-old-expose-topic', doesn't evaluate arguments
4012and retains start position." 4008and retains start position."
4013 (list 'save-excursion 4009 (list 'save-excursion
4014 '(if (not (or (allout-goto-prefix) 4010 '(if (not (or (allout-goto-prefix)
@@ -4016,6 +4012,7 @@ and retains start position."
4016 (error "Can't find any outline topics")) 4012 (error "Can't find any outline topics"))
4017 (cons 'allout-old-expose-topic 4013 (cons 'allout-old-expose-topic
4018 (mapcar (function (lambda (x) (list 'quote x))) spec)))) 4014 (mapcar (function (lambda (x) (list 'quote x))) spec))))
4015(make-obsolete 'allout-exposure 'allout-new-exposure "19.23")
4019 4016
4020;;;_ #7 Systematic outline presentation - copying, printing, flattening 4017;;;_ #7 Systematic outline presentation - copying, printing, flattening
4021 4018
@@ -4223,12 +4220,10 @@ header and body. The elements of that list are:
4223;;;_ > allout-process-exposed (&optional func from to frombuf 4220;;;_ > allout-process-exposed (&optional func from to frombuf
4224;;; tobuf format) 4221;;; tobuf format)
4225(defun allout-process-exposed (&optional func from to frombuf tobuf 4222(defun allout-process-exposed (&optional func from to frombuf tobuf
4226 format &optional start-num) 4223 format start-num)
4227 "Map function on exposed parts of current topic; results to another buffer. 4224 "Map function on exposed parts of current topic; results to another buffer.
4228 4225
4229All args are options; default values itemized below. 4226Apply FUNC to exposed portions FROM position TO position in buffer
4230
4231Apply FUNCTION to exposed portions FROM position TO position in buffer
4232FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an 4227FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an
4233alternate presentation form: 4228alternate presentation form:
4234 4229
@@ -4241,7 +4236,7 @@ alternate presentation form:
4241 except for distinctive bullets. 4236 except for distinctive bullets.
4242 4237
4243Defaults: 4238Defaults:
4244 FUNCTION: `allout-insert-listified' 4239 FUNC: `allout-insert-listified'
4245 FROM: region start, if region active, else start of buffer 4240 FROM: region start, if region active, else start of buffer
4246 TO: region end, if region active, else end of buffer 4241 TO: region end, if region active, else end of buffer
4247 FROMBUF: current buffer 4242 FROMBUF: current buffer
@@ -4286,11 +4281,13 @@ Defaults:
4286(defun allout-insert-listified (listified) 4281(defun allout-insert-listified (listified)
4287 "Insert contents of listified outline portion in current buffer. 4282 "Insert contents of listified outline portion in current buffer.
4288 4283
4289Listified is a list representing each topic header and body: 4284LISTIFIED is a list representing each topic header and body:
4290 4285
4291 \`(depth prefix text)' 4286 \`(depth prefix text)'
4292 4287
4293or \`(depth prefix text bullet-plus)' 4288or
4289
4290 \`(depth prefix text bullet-plus)'
4294 4291
4295If `bullet-plus' is specified, it is inserted just after the entire prefix." 4292If `bullet-plus' is specified, it is inserted just after the entire prefix."
4296 (setq listified (cdr listified)) 4293 (setq listified (cdr listified))
@@ -4356,14 +4353,14 @@ alternate presentation format for the outline:
4356(defun allout-flatten-exposed-to-buffer (&optional arg tobuf) 4353(defun allout-flatten-exposed-to-buffer (&optional arg tobuf)
4357 "Present numeric outline of outline's exposed portions in another buffer. 4354 "Present numeric outline of outline's exposed portions in another buffer.
4358 4355
4359The resulting outline is not compatable with outline mode - use 4356The resulting outline is not compatible with outline mode - use
4360`allout-copy-exposed-to-buffer' if you want that. 4357`allout-copy-exposed-to-buffer' if you want that.
4361 4358
4362Use `allout-indented-exposed-to-buffer' for indented presentation. 4359Use `allout-indented-exposed-to-buffer' for indented presentation.
4363 4360
4364With repeat count, copy the exposed portions of only current topic. 4361With repeat count, copy the exposed portions of only current topic.
4365 4362
4366Other buffer has current buffers name with \" exposed\" appended to 4363Other buffer has current buffer's name with \" exposed\" appended to
4367it, unless optional second arg TOBUF is specified, in which case it is 4364it, unless optional second arg TOBUF is specified, in which case it is
4368used verbatim." 4365used verbatim."
4369 (interactive "P") 4366 (interactive "P")
@@ -4372,22 +4369,22 @@ used verbatim."
4372(defun allout-indented-exposed-to-buffer (&optional arg tobuf) 4369(defun allout-indented-exposed-to-buffer (&optional arg tobuf)
4373 "Present indented outline of outline's exposed portions in another buffer. 4370 "Present indented outline of outline's exposed portions in another buffer.
4374 4371
4375The resulting outline is not compatable with outline mode - use 4372The resulting outline is not compatible with outline mode - use
4376`allout-copy-exposed-to-buffer' if you want that. 4373`allout-copy-exposed-to-buffer' if you want that.
4377 4374
4378Use `allout-flatten-exposed-to-buffer' for numeric sectional presentation. 4375Use `allout-flatten-exposed-to-buffer' for numeric sectional presentation.
4379 4376
4380With repeat count, copy the exposed portions of only current topic. 4377With repeat count, copy the exposed portions of only current topic.
4381 4378
4382Other buffer has current buffers name with \" exposed\" appended to 4379Other buffer has current buffer's name with \" exposed\" appended to
4383it, unless optional second arg TOBUF is specified, in which case it is 4380it, unless optional second arg TOBUF is specified, in which case it is
4384used verbatim." 4381used verbatim."
4385 (interactive "P") 4382 (interactive "P")
4386 (allout-copy-exposed-to-buffer arg tobuf 'indent)) 4383 (allout-copy-exposed-to-buffer arg tobuf 'indent))
4387 4384
4388;;;_ - LaTeX formatting 4385;;;_ - LaTeX formatting
4389;;;_ > allout-latex-verb-quote (str &optional flow) 4386;;;_ > allout-latex-verb-quote (string &optional flow)
4390(defun allout-latex-verb-quote (str &optional flow) 4387(defun allout-latex-verb-quote (string &optional flow)
4391 "Return copy of STRING for literal reproduction across latex processing. 4388 "Return copy of STRING for literal reproduction across latex processing.
4392Expresses the original characters \(including carriage returns) of the 4389Expresses the original characters \(including carriage returns) of the
4393string across latex processing." 4390string across latex processing."
@@ -4397,7 +4394,7 @@ string across latex processing."
4397 (concat "\\char" (number-to-string char) "{}")) 4394 (concat "\\char" (number-to-string char) "{}"))
4398 ((= char ?\n) "\\\\") 4395 ((= char ?\n) "\\\\")
4399 (t (char-to-string char))))) 4396 (t (char-to-string char)))))
4400 str 4397 string
4401 "")) 4398 ""))
4402;;;_ > allout-latex-verbatim-quote-curr-line () 4399;;;_ > allout-latex-verbatim-quote-curr-line ()
4403(defun allout-latex-verbatim-quote-curr-line () 4400(defun allout-latex-verbatim-quote-curr-line ()
@@ -4418,12 +4415,12 @@ environment. Leaves point at the end of the line."
4418 (insert "\\") 4415 (insert "\\")
4419 (setq end (1+ end)) 4416 (setq end (1+ end))
4420 (goto-char (1+ (match-end 0)))))) 4417 (goto-char (1+ (match-end 0))))))
4421;;;_ > allout-insert-latex-header (buf) 4418;;;_ > allout-insert-latex-header (buffer)
4422(defun allout-insert-latex-header (buf) 4419(defun allout-insert-latex-header (buffer)
4423 "Insert initial latex commands at point in BUFFER." 4420 "Insert initial latex commands at point in BUFFER."
4424 ;; Much of this is being derived from the stuff in appendix of E in 4421 ;; Much of this is being derived from the stuff in appendix of E in
4425 ;; the TeXBook, pg 421. 4422 ;; the TeXBook, pg 421.
4426 (set-buffer buf) 4423 (set-buffer buffer)
4427 (let ((doc-style (format "\n\\documentstyle{%s}\n" 4424 (let ((doc-style (format "\n\\documentstyle{%s}\n"
4428 "report")) 4425 "report"))
4429 (page-numbering (if allout-number-pages 4426 (page-numbering (if allout-number-pages
@@ -4492,10 +4489,10 @@ environment. Leaves point at the end of the line."
4492 hoffset 4489 hoffset
4493 vspace) 4490 vspace)
4494 ))) 4491 )))
4495;;;_ > allout-insert-latex-trailer (buf) 4492;;;_ > allout-insert-latex-trailer (buffer)
4496(defun allout-insert-latex-trailer (buf) 4493(defun allout-insert-latex-trailer (buffer)
4497 "Insert concluding latex commands at point in BUFFER." 4494 "Insert concluding latex commands at point in BUFFER."
4498 (set-buffer buf) 4495 (set-buffer buffer)
4499 (insert "\n\\end{document}\n")) 4496 (insert "\n\\end{document}\n"))
4500;;;_ > allout-latexify-one-item (depth prefix bullet text) 4497;;;_ > allout-latexify-one-item (depth prefix bullet text)
4501(defun allout-latexify-one-item (depth prefix bullet text) 4498(defun allout-latexify-one-item (depth prefix bullet text)
@@ -4706,9 +4703,9 @@ function. If HOOK is void, it is first set to nil."
4706 (cons function (symbol-value hook))))))) 4703 (cons function (symbol-value hook)))))))
4707;;;_ : my-mark-marker to accommodate divergent emacsen: 4704;;;_ : my-mark-marker to accommodate divergent emacsen:
4708(defun my-mark-marker (&optional force buffer) 4705(defun my-mark-marker (&optional force buffer)
4709 "Accommodate the different signature for mark-marker across emacsen. 4706 "Accommodate the different signature for mark-marker across Emacsen.
4710 4707
4711GNU XEmacs takes two optional args, while mainline GNU Emacs does not, 4708XEmacs takes two optional args, while GNU Emacs does not,
4712so pass them along when appropriate." 4709so pass them along when appropriate."
4713 (if (featurep 'xemacs) 4710 (if (featurep 'xemacs)
4714 (mark-marker force buffer) 4711 (mark-marker force buffer)
diff --git a/lisp/compare-w.el b/lisp/compare-w.el
index d283016750f..7e23c9efedf 100644
--- a/lisp/compare-w.el
+++ b/lisp/compare-w.el
@@ -1,6 +1,6 @@
1;;; compare-w.el --- compare text between windows for Emacs 1;;; compare-w.el --- compare text between windows for Emacs
2 2
3;; Copyright (C) 1986, 1989, 1993, 1997, 2003 Free Software Foundation, Inc. 3;; Copyright (C) 1986,1989,1993,1997,2003,2004 Free Software Foundation, Inc.
4 4
5;; Maintainer: FSF 5;; Maintainer: FSF
6;; Keywords: convenience files 6;; Keywords: convenience files
@@ -117,12 +117,12 @@ and the value `((4) (4))' for horizontally split windows."
117 :group 'compare-w) 117 :group 'compare-w)
118 118
119(defface compare-windows-face 119(defface compare-windows-face
120 '((((type tty pc) (class color)) 120 '((((class color) (min-colors 88) (background light))
121 (:background "turquoise3"))
122 (((class color) (background light))
123 (:background "paleturquoise")) 121 (:background "paleturquoise"))
124 (((class color) (background dark)) 122 (((class color) (min-colors 88) (background dark))
125 (:background "paleturquoise4")) 123 (:background "paleturquoise4"))
124 (((class color))
125 (:background "turquoise3"))
126 (t (:underline t))) 126 (t (:underline t)))
127 "Face for highlighting of compare-windows difference regions." 127 "Face for highlighting of compare-windows difference regions."
128 :group 'compare-w) 128 :group 'compare-w)
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el
index 8fe839b474d..53b9e7507ef 100644
--- a/lisp/emacs-lisp/lisp.el
+++ b/lisp/emacs-lisp/lisp.el
@@ -281,15 +281,31 @@ already marked."
281 (end-of-defun) 281 (end-of-defun)
282 (point)))) 282 (point))))
283 (t 283 (t
284 ;; Do it in this order for the sake of languages with nested 284 (let ((opoint (point))
285 ;; functions where several can end at the same place as with 285 beg end)
286 ;; the offside rule, e.g. Python. 286 (push-mark opoint)
287 (push-mark (point)) 287 ;; Try first in this order for the sake of languages with nested
288 (beginning-of-defun) 288 ;; functions where several can end at the same place as with
289 (push-mark (point) nil t) 289 ;; the offside rule, e.g. Python.
290 (end-of-defun) 290 (beginning-of-defun)
291 (exchange-point-and-mark) 291 (setq beg (point))
292 (re-search-backward "^\n" (- (point) 1) t)))) 292 (end-of-defun)
293 (setq end (point))
294 (while (looking-at "^\n")
295 (forward-line 1))
296 (if (> (point) opoint)
297 (progn
298 ;; We got the right defun.
299 (push-mark beg nil t)
300 (goto-char end)
301 (exchange-point-and-mark))
302 ;; beginning-of-defun moved back one defun
303 ;; so we got the wrong one.
304 (goto-char opoint)
305 (end-of-defun)
306 (push-mark (point) nil t)
307 (beginning-of-defun))
308 (re-search-backward "^\n" (- (point) 1) t)))))
293 309
294(defun narrow-to-defun (&optional arg) 310(defun narrow-to-defun (&optional arg)
295 "Make text outside current defun invisible. 311 "Make text outside current defun invisible.
@@ -298,13 +314,28 @@ Optional ARG is ignored."
298 (interactive) 314 (interactive)
299 (save-excursion 315 (save-excursion
300 (widen) 316 (widen)
301 ;; Do it in this order for the sake of languages with nested 317 (let ((opoint (point))
302 ;; functions where several can end at the same place as with the 318 beg end)
303 ;; offside rule, e.g. Python. 319 ;; Try first in this order for the sake of languages with nested
304 (beginning-of-defun) 320 ;; functions where several can end at the same place as with
305 (let ((beg (point))) 321 ;; the offside rule, e.g. Python.
322 (beginning-of-defun)
323 (setq beg (point))
306 (end-of-defun) 324 (end-of-defun)
307 (narrow-to-region beg (point))))) 325 (setq end (point))
326 (while (looking-at "^\n")
327 (forward-line 1))
328 (unless (> (point) opoint)
329 ;; beginning-of-defun moved back one defun
330 ;; so we got the wrong one.
331 (goto-char opoint)
332 (end-of-defun)
333 (setq end (point))
334 (beginning-of-defun)
335 (setq beg (point)))
336 (goto-char end)
337 (re-search-backward "^\n" (- (point) 1) t)
338 (narrow-to-region beg end))))
308 339
309(defun insert-pair (arg &optional open close) 340(defun insert-pair (arg &optional open close)
310 "Enclose following ARG sexps in a pair of OPEN and CLOSE characters. 341 "Enclose following ARG sexps in a pair of OPEN and CLOSE characters.
diff --git a/lisp/facemenu.el b/lisp/facemenu.el
index 3893e320655..e9af58fc73d 100644
--- a/lisp/facemenu.el
+++ b/lisp/facemenu.el
@@ -480,9 +480,19 @@ of colors that the current display can handle."
480 (when (and (null list) (> (display-color-cells) 0)) 480 (when (and (null list) (> (display-color-cells) 0))
481 (setq list (defined-colors)) 481 (setq list (defined-colors))
482 ;; Delete duplicate colors. 482 ;; Delete duplicate colors.
483
484 ;; Identify duplicate colors by the name rather than the color
485 ;; value. For example, on MS-Windows, logical colors are added to
486 ;; the list that might have the same value but have different
487 ;; names and meanings. For example, `SystemMenuText' (the color
488 ;; w32 uses for the text in menu entries) and `SystemWindowText'
489 ;; (the default color w32 uses for the text in windows and
490 ;; dialogs) may be the same display color and be adjacent in the
491 ;; list. Detecting duplicates by name insures that both of these
492 ;; colors remain despite identical color values.
483 (let ((l list)) 493 (let ((l list))
484 (while (cdr l) 494 (while (cdr l)
485 (if (facemenu-color-equal (car l) (car (cdr l))) 495 (if (facemenu-color-name-equal (car l) (car (cdr l)))
486 (setcdr l (cdr (cdr l))) 496 (setcdr l (cdr (cdr l)))
487 (setq l (cdr l))))) 497 (setq l (cdr l)))))
488 (when (memq (display-visual-class) '(gray-scale pseudo-color direct-color)) 498 (when (memq (display-visual-class) '(gray-scale pseudo-color direct-color))
@@ -515,6 +525,22 @@ determine the correct answer."
515 (cond ((equal a b) t) 525 (cond ((equal a b) t)
516 ((equal (color-values a) (color-values b))))) 526 ((equal (color-values a) (color-values b)))))
517 527
528(defun facemenu-color-name-equal (a b)
529 "Return t if colors A and B are the same color.
530A and B should be strings naming colors. These names are
531downcased, stripped of spaces and the string `grey' is turned
532into `gray'. This accommodates alternative spellings of colors
533found commonly in the list. It returns nil if the colors differ."
534 (progn
535 (setq a (replace-regexp-in-string "grey" "gray"
536 (replace-regexp-in-string " " ""
537 (downcase a)))
538 b (replace-regexp-in-string "grey" "gray"
539 (replace-regexp-in-string " " ""
540 (downcase b))))
541
542 (equal a b)))
543
518(defun facemenu-add-face (face &optional start end) 544(defun facemenu-add-face (face &optional start end)
519 "Add FACE to text between START and END. 545 "Add FACE to text between START and END.
520If START is nil or START to END is empty, add FACE to next typed character 546If START is nil or START to END is empty, add FACE to next typed character
diff --git a/lisp/files.el b/lisp/files.el
index 99cad16cf5b..ccd30a4de30 100644
--- a/lisp/files.el
+++ b/lisp/files.el
@@ -1357,41 +1357,42 @@ that are visiting the various files."
1357 rawfile truename number)))))) 1357 rawfile truename number))))))
1358 1358
1359(defun find-file-noselect-1 (buf filename nowarn rawfile truename number) 1359(defun find-file-noselect-1 (buf filename nowarn rawfile truename number)
1360 (let ((inhibit-read-only t) 1360 (let (error)
1361 error)
1362 (with-current-buffer buf 1361 (with-current-buffer buf
1363 (kill-local-variable 'find-file-literally) 1362 (kill-local-variable 'find-file-literally)
1364 ;; Needed in case we are re-visiting the file with a different 1363 ;; Needed in case we are re-visiting the file with a different
1365 ;; text representation. 1364 ;; text representation.
1366 (kill-local-variable 'buffer-file-coding-system) 1365 (kill-local-variable 'buffer-file-coding-system)
1367 (kill-local-variable 'cursor-type) 1366 (kill-local-variable 'cursor-type)
1368 (erase-buffer) 1367 (let ((inhibit-read-only t))
1369 (and (default-value 'enable-multibyte-characters) 1368 (erase-buffer)
1370 (not rawfile) 1369 (and (default-value 'enable-multibyte-characters)
1371 (set-buffer-multibyte t)) 1370 (not rawfile)
1372 (if rawfile 1371 (set-buffer-multibyte t))
1373 (condition-case () 1372 (if rawfile
1374 (insert-file-contents-literally filename t) 1373 (condition-case ()
1375 (file-error 1374 (insert-file-contents-literally filename t)
1376 (when (and (file-exists-p filename) 1375 (file-error
1377 (not (file-readable-p filename))) 1376 (when (and (file-exists-p filename)
1378 (kill-buffer buf) 1377 (not (file-readable-p filename)))
1379 (signal 'file-error (list "File is not readable" 1378 (kill-buffer buf)
1380 filename))) 1379 (signal 'file-error (list "File is not readable"
1381 ;; Unconditionally set error 1380 filename)))
1382 (setq error t))) 1381 ;; Unconditionally set error
1383 (condition-case ()
1384 (insert-file-contents filename t)
1385 (file-error
1386 (when (and (file-exists-p filename)
1387 (not (file-readable-p filename)))
1388 (kill-buffer buf)
1389 (signal 'file-error (list "File is not readable"
1390 filename)))
1391 ;; Run find-file-not-found-hooks until one returns non-nil.
1392 (or (run-hook-with-args-until-success 'find-file-not-found-functions)
1393 ;; If they fail too, set error.
1394 (setq error t))))) 1382 (setq error t)))))
1383 (condition-case ()
1384 (let ((inhibit-read-only t))
1385 (insert-file-contents filename t))
1386 (file-error
1387 (when (and (file-exists-p filename)
1388 (not (file-readable-p filename)))
1389 (kill-buffer buf)
1390 (signal 'file-error (list "File is not readable"
1391 filename)))
1392 ;; Run find-file-not-found-hooks until one returns non-nil.
1393 (or (run-hook-with-args-until-success 'find-file-not-found-functions)
1394 ;; If they fail too, set error.
1395 (setq error t))))
1395 ;; Record the file's truename, and maybe use that as visited name. 1396 ;; Record the file's truename, and maybe use that as visited name.
1396 (if (equal filename buffer-file-name) 1397 (if (equal filename buffer-file-name)
1397 (setq buffer-file-truename truename) 1398 (setq buffer-file-truename truename)
@@ -4486,10 +4487,12 @@ With prefix arg, silently save all file-visiting buffers, then kill."
4486 (directory-file-name . nil) 4487 (directory-file-name . nil)
4487 (file-name-sans-versions . nil) 4488 (file-name-sans-versions . nil)
4488 ;; `identity' means just return the first arg 4489 ;; `identity' means just return the first arg
4489 ;; as stripped of its quoting. 4490 ;; not stripped of its quoting.
4490 (substitute-in-file-name . identity) 4491 (substitute-in-file-name identity)
4491 (file-name-completion 1) 4492 (file-name-completion 1)
4492 (file-name-all-completions 1) 4493 (file-name-all-completions 1)
4494 ;; t means add "/:" to the result.
4495 (file-truename t 0)
4493 (rename-file 0 1) 4496 (rename-file 0 1)
4494 (copy-file 0 1) 4497 (copy-file 0 1)
4495 (make-symbolic-link 0 1) 4498 (make-symbolic-link 0 1)
@@ -4497,9 +4500,12 @@ With prefix arg, silently save all file-visiting buffers, then kill."
4497 ;; For all other operations, treat the first argument only 4500 ;; For all other operations, treat the first argument only
4498 ;; as the file name. 4501 ;; as the file name.
4499 '(nil 0)))) 4502 '(nil 0))))
4503 method
4500 ;; Copy ARGUMENTS so we can replace elements in it. 4504 ;; Copy ARGUMENTS so we can replace elements in it.
4501 (arguments (copy-sequence arguments))) 4505 (arguments (copy-sequence arguments)))
4502 ;; Strip off the /: from the file names that have this handler. 4506 (if (symbolp (car file-arg-indices))
4507 (setq method (pop file-arg-indices)))
4508 ;; Strip off the /: from the file names that have it.
4503 (save-match-data 4509 (save-match-data
4504 (while (consp file-arg-indices) 4510 (while (consp file-arg-indices)
4505 (let ((pair (nthcdr (car file-arg-indices) arguments))) 4511 (let ((pair (nthcdr (car file-arg-indices) arguments)))
@@ -4510,9 +4516,12 @@ With prefix arg, silently save all file-visiting buffers, then kill."
4510 "/" 4516 "/"
4511 (substring (car pair) 2))))) 4517 (substring (car pair) 2)))))
4512 (setq file-arg-indices (cdr file-arg-indices)))) 4518 (setq file-arg-indices (cdr file-arg-indices))))
4513 (if (eq file-arg-indices 'identity) 4519 (cond ((eq method 'identity)
4514 (car arguments) 4520 (car arguments))
4515 (apply operation arguments)))) 4521 (method
4522 (concat "/:" (apply operation arguments)))
4523 (t
4524 (apply operation arguments)))))
4516 4525
4517(define-key ctl-x-map "\C-f" 'find-file) 4526(define-key ctl-x-map "\C-f" 'find-file)
4518(define-key ctl-x-map "\C-r" 'find-file-read-only) 4527(define-key ctl-x-map "\C-r" 'find-file-read-only)
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog
index 68df8d0941e..78c9f15f912 100644
--- a/lisp/gnus/ChangeLog
+++ b/lisp/gnus/ChangeLog
@@ -14,6 +14,10 @@
14 14
15 * nnimap.el (nnimap-demule): Avoid string-as-multibyte. 15 * nnimap.el (nnimap-demule): Avoid string-as-multibyte.
16 16
172004-04-21 Richard M. Stallman <rms@gnu.org>
18
19 * mailcap.el (mailcap-mime-data): Mark as risky.
20
172004-03-27 Juanma Barranquero <lektu@terra.es> 212004-03-27 Juanma Barranquero <lektu@terra.es>
18 22
19 * gnus-srvr.el (gnus-server-prepare): Remove spurious call to `cdr'. 23 * gnus-srvr.el (gnus-server-prepare): Remove spurious call to `cdr'.
diff --git a/lisp/gs.el b/lisp/gs.el
index f160dca197a..284b18251ec 100644
--- a/lisp/gs.el
+++ b/lisp/gs.el
@@ -39,12 +39,14 @@
39(defvar gs-options 39(defvar gs-options
40 '("-q" 40 '("-q"
41 ;"-dNOPAUSE" 41 ;"-dNOPAUSE"
42 "-dSAFER"
42 "-dBATCH" 43 "-dBATCH"
43 "-sDEVICE=<device>" 44 "-sDEVICE=<device>"
44 "<file>") 45 "<file>")
45 "List of command line arguments to pass to Ghostscript. 46 "List of command line arguments to pass to Ghostscript.
46Arguments may contain place-holders `<file>' for the name of the 47Arguments may contain place-holders `<file>' for the name of the
47input file, and `<device>' for the device to use.") 48input file, and `<device>' for the device to use.")
49(put 'gs-options 'risky-local-variable t)
48 50
49(defun gs-options (device file) 51(defun gs-options (device file)
50 "Return a list of command line options with place-holders replaced. 52 "Return a list of command line options with place-holders replaced.
@@ -55,7 +57,6 @@ FILE is the value to substitute for the place-holder `<file>'."
55 option (replace-regexp-in-string "<file>" file option))) 57 option (replace-regexp-in-string "<file>" file option)))
56 gs-options)) 58 gs-options))
57 59
58
59;; The GHOSTVIEW property (taken from gv 3.5.8). 60;; The GHOSTVIEW property (taken from gv 3.5.8).
60;; 61;;
61;; Type: 62;; Type:
diff --git a/lisp/help-fns.el b/lisp/help-fns.el
index e0692119a21..e7e09a431bd 100644
--- a/lisp/help-fns.el
+++ b/lisp/help-fns.el
@@ -181,14 +181,14 @@ ARGLIST can also be t or a string of the form \"(FUN ARG1 ARG2 ...)\"."
181 (unless (stringp docstring) (setq docstring "Not documented")) 181 (unless (stringp docstring) (setq docstring "Not documented"))
182 (if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring) (eq arglist t)) 182 (if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring) (eq arglist t))
183 docstring 183 docstring
184 (format "%s%s%S" docstring 184 (concat docstring
185 (if (string-match "\n?\n\\'" docstring) 185 (if (string-match "\n?\n\\'" docstring)
186 (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") 186 (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "")
187 "\n\n") 187 "\n\n")
188 (if (and (stringp arglist) 188 (if (and (stringp arglist)
189 (string-match "\\`([^ ]+\\(.*\\))\\'" arglist)) 189 (string-match "\\`([^ ]+\\(.*\\))\\'" arglist))
190 (concat "(fn" (match-string 1 arglist) ")") 190 (concat "(fn" (match-string 1 arglist) ")")
191 (help-make-usage 'fn arglist))))) 191 (format "%S" (help-make-usage 'fn arglist))))))
192 192
193(defun help-function-arglist (def) 193(defun help-function-arglist (def)
194 ;; Handle symbols aliased to other symbols. 194 ;; Handle symbols aliased to other symbols.
@@ -275,6 +275,7 @@ else ARG is returned in uppercase normal."
275 (next (not (or args (looking-at "\\[")))) 275 (next (not (or args (looking-at "\\["))))
276 (opt nil)) 276 (opt nil))
277 ;; Make a list of all arguments 277 ;; Make a list of all arguments
278 (skip-chars-forward "^ ")
278 (while next 279 (while next
279 (or opt (not (looking-at " &")) (setq opt t)) 280 (or opt (not (looking-at " &")) (setq opt t))
280 (if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t)) 281 (if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t))
diff --git a/lisp/international/characters.el b/lisp/international/characters.el
index ebf2a3af27d..809c457c6e1 100644
--- a/lisp/international/characters.el
+++ b/lisp/international/characters.el
@@ -657,7 +657,7 @@
657(modify-category-entry (make-char 'korean-ksc5601 43) ?K) 657(modify-category-entry (make-char 'korean-ksc5601 43) ?K)
658(modify-category-entry (make-char 'korean-ksc5601 44) ?Y) 658(modify-category-entry (make-char 'korean-ksc5601 44) ?Y)
659 659
660(let ((parens "$(C!2!3!4!5!6!7!8!9!:!;!<!=(B" ) 660(let ((parens "$(C!2!3!4!5!6!7!8!9!:!;!<!=#(#)#[#]#{#}(B" )
661 open close) 661 open close)
662 (dotimes (i (/ (length parens) 2)) 662 (dotimes (i (/ (length parens) 2))
663 (setq open (aref parens (* i 2)) 663 (setq open (aref parens (* i 2))
diff --git a/lisp/locate.el b/lisp/locate.el
index eb8074c9f6c..e61ec87d4e4 100644
--- a/lisp/locate.el
+++ b/lisp/locate.el
@@ -160,7 +160,7 @@
160 :group 'locate) 160 :group 'locate)
161 161
162(defcustom locate-prompt-for-command nil 162(defcustom locate-prompt-for-command nil
163 "If non-nil, the default behavior of the locate command is to prompt for a command to run. 163 "If non-nil, the locate command prompts for a command to run.
164Otherwise, that behavior is invoked via a prefix argument." 164Otherwise, that behavior is invoked via a prefix argument."
165 :group 'locate 165 :group 'locate
166 :type 'boolean 166 :type 'boolean
@@ -329,7 +329,11 @@ shown; this is often useful to constrain a big search."
329;; Default directory is set to "/" so that dired commands, which 329;; Default directory is set to "/" so that dired commands, which
330;; expect to be in a tree, will work properly 330;; expect to be in a tree, will work properly
331(defun locate-mode () 331(defun locate-mode ()
332 "Major mode for the `*Locate*' buffer made by \\[locate]." 332 "Major mode for the `*Locate*' buffer made by \\[locate].
333In that buffer, you can use almost all the usual dired bindings.
334\\[locate-find-directory] visits the directory of the file on the current line.
335
336\\{locate-mode-map}"
333 (kill-all-local-variables) 337 (kill-all-local-variables)
334 ;; Avoid clobbering this variables 338 ;; Avoid clobbering this variables
335 (make-local-variable 'dired-subdir-alist) 339 (make-local-variable 'dired-subdir-alist)
diff --git a/lisp/progmodes/ada-mode.el b/lisp/progmodes/ada-mode.el
index abc8db6d2c3..f7688e24069 100644
--- a/lisp/progmodes/ada-mode.el
+++ b/lisp/progmodes/ada-mode.el
@@ -1466,8 +1466,8 @@ The standard casing rules will no longer apply to this word."
1466 ;; If the word is already in the list, even with a different casing 1466 ;; If the word is already in the list, even with a different casing
1467 ;; we simply want to replace it. 1467 ;; we simply want to replace it.
1468 (if (and (not (equal ada-case-exception '())) 1468 (if (and (not (equal ada-case-exception '()))
1469 (assoc-ignore-case word ada-case-exception)) 1469 (assoc-string word ada-case-exception t))
1470 (setcar (assoc-ignore-case word ada-case-exception) word) 1470 (setcar (assoc-string word ada-case-exception t) word)
1471 (add-to-list 'ada-case-exception (cons word t)) 1471 (add-to-list 'ada-case-exception (cons word t))
1472 ) 1472 )
1473 1473
@@ -1519,8 +1519,8 @@ word itself has a special casing."
1519 ;; If the word is already in the list, even with a different casing 1519 ;; If the word is already in the list, even with a different casing
1520 ;; we simply want to replace it. 1520 ;; we simply want to replace it.
1521 (if (and (not (equal ada-case-exception-substring '())) 1521 (if (and (not (equal ada-case-exception-substring '()))
1522 (assoc-ignore-case word ada-case-exception-substring)) 1522 (assoc-string word ada-case-exception-substring t))
1523 (setcar (assoc-ignore-case word ada-case-exception-substring) word) 1523 (setcar (assoc-string word ada-case-exception-substring t) word)
1524 (add-to-list 'ada-case-exception-substring (cons word t)) 1524 (add-to-list 'ada-case-exception-substring (cons word t))
1525 ) 1525 )
1526 1526
@@ -1548,9 +1548,9 @@ word itself has a special casing."
1548 (if (char-equal (string-to-char word) ?*) 1548 (if (char-equal (string-to-char word) ?*)
1549 (progn 1549 (progn
1550 (setq word (substring word 1)) 1550 (setq word (substring word 1))
1551 (unless (assoc-ignore-case word ada-case-exception-substring) 1551 (unless (assoc-string word ada-case-exception-substring t)
1552 (add-to-list 'ada-case-exception-substring (cons word t)))) 1552 (add-to-list 'ada-case-exception-substring (cons word t))))
1553 (unless (assoc-ignore-case word ada-case-exception) 1553 (unless (assoc-string word ada-case-exception t)
1554 (add-to-list 'ada-case-exception (cons word t))))) 1554 (add-to-list 'ada-case-exception (cons word t)))))
1555 1555
1556 (forward-line 1)) 1556 (forward-line 1))
@@ -1618,8 +1618,8 @@ the exceptions defined in `ada-case-exception-file'."
1618 (point))) 1618 (point)))
1619 match) 1619 match)
1620 ;; If we have an exception, replace the word by the correct casing 1620 ;; If we have an exception, replace the word by the correct casing
1621 (if (setq match (assoc-ignore-case (buffer-substring start end) 1621 (if (setq match (assoc-string (buffer-substring start end)
1622 ada-case-exception)) 1622 ada-case-exception t))
1623 1623
1624 (progn 1624 (progn
1625 (delete-region start end) 1625 (delete-region start end)
diff --git a/lisp/progmodes/etags.el b/lisp/progmodes/etags.el
index ef5d1eba998..184077f6a3a 100644
--- a/lisp/progmodes/etags.el
+++ b/lisp/progmodes/etags.el
@@ -1248,7 +1248,11 @@ where they were found."
1248 1248
1249 1249
1250(defun etags-tags-completion-table () 1250(defun etags-tags-completion-table ()
1251 (let ((table (make-vector 511 0))) 1251 (let ((table (make-vector 511 0))
1252 (point-max (/ (float (point-max)) 100.0))
1253 (msg-fmt (format
1254 "Making tags completion table for %s...%%d%%%%"
1255 buffer-file-name)))
1252 (save-excursion 1256 (save-excursion
1253 (goto-char (point-min)) 1257 (goto-char (point-min))
1254 ;; This monster regexp matches an etags tag line. 1258 ;; This monster regexp matches an etags tag line.
@@ -1264,11 +1268,12 @@ where they were found."
1264\\([-a-zA-Z0-9_+*$?:]+\\)[^-a-zA-Z0-9_+*$?:\177]*\\)\177\ 1268\\([-a-zA-Z0-9_+*$?:]+\\)[^-a-zA-Z0-9_+*$?:\177]*\\)\177\
1265\\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\)?,\\([0-9]+\\)?\n" 1269\\(\\([^\n\001]+\\)\001\\)?\\([0-9]+\\)?,\\([0-9]+\\)?\n"
1266 nil t) 1270 nil t)
1267 (intern (if (match-beginning 5) 1271 (intern (prog1 (if (match-beginning 5)
1268 ;; There is an explicit tag name. 1272 ;; There is an explicit tag name.
1269 (buffer-substring (match-beginning 5) (match-end 5)) 1273 (buffer-substring (match-beginning 5) (match-end 5))
1270 ;; No explicit tag name. Best guess. 1274 ;; No explicit tag name. Best guess.
1271 (buffer-substring (match-beginning 3) (match-end 3))) 1275 (buffer-substring (match-beginning 3) (match-end 3)))
1276 (message msg-fmt (/ (point) point-max)))
1272 table))) 1277 table)))
1273 table)) 1278 table))
1274 1279
@@ -1866,6 +1871,7 @@ directory specification."
1866 (or gotany 1871 (or gotany
1867 (error "File %s not in current tags tables" file))))) 1872 (error "File %s not in current tags tables" file)))))
1868 (with-current-buffer "*Tags List*" 1873 (with-current-buffer "*Tags List*"
1874 (require 'apropos)
1869 (apropos-mode) 1875 (apropos-mode)
1870 (setq buffer-read-only t))) 1876 (setq buffer-read-only t)))
1871 1877
@@ -1884,6 +1890,7 @@ directory specification."
1884 (funcall tags-apropos-function regexp)))) 1890 (funcall tags-apropos-function regexp))))
1885 (etags-tags-apropos-additional regexp)) 1891 (etags-tags-apropos-additional regexp))
1886 (with-current-buffer "*Tags List*" 1892 (with-current-buffer "*Tags List*"
1893 (require 'apropos)
1887 (apropos-mode) 1894 (apropos-mode)
1888 ;; apropos-mode is derived from fundamental-mode and it kills 1895 ;; apropos-mode is derived from fundamental-mode and it kills
1889 ;; all local variables. 1896 ;; all local variables.
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el
index a600939ef71..ae0c43c2730 100644
--- a/lisp/progmodes/idlw-shell.el
+++ b/lisp/progmodes/idlw-shell.el
@@ -1823,8 +1823,8 @@ Change the default directory for the process buffer to concur."
1823 'hide 'wait) 1823 'hide 'wait)
1824 ;; If we don't know anything about the class, update shell routines 1824 ;; If we don't know anything about the class, update shell routines
1825 (if (and idlwave-shell-get-object-class 1825 (if (and idlwave-shell-get-object-class
1826 (not (assoc-ignore-case idlwave-shell-get-object-class 1826 (not (assoc-string idlwave-shell-get-object-class
1827 (idlwave-class-alist)))) 1827 (idlwave-class-alist) t)))
1828 (idlwave-shell-maybe-update-routine-info)) 1828 (idlwave-shell-maybe-update-routine-info))
1829 idlwave-shell-get-object-class))) 1829 idlwave-shell-get-object-class)))
1830 1830
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 5c95b138720..99e693abb94 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -1502,7 +1502,7 @@ FUN will not be called for @String entries."
1502 (save-excursion 1502 (save-excursion
1503 (if (or (and (not bibtex-sort-ignore-string-entries) 1503 (if (or (and (not bibtex-sort-ignore-string-entries)
1504 (string-equal "string" (downcase entry-type))) 1504 (string-equal "string" (downcase entry-type)))
1505 (assoc-ignore-case entry-type bibtex-entry-field-alist)) 1505 (assoc-string entry-type bibtex-entry-field-alist t))
1506 (funcall fun key beg end))) 1506 (funcall fun key beg end)))
1507 (goto-char end))))) 1507 (goto-char end)))))
1508 1508
@@ -1771,9 +1771,10 @@ Formats current entry according to variable `bibtex-entry-format'."
1771 (re-search-forward bibtex-entry-type) 1771 (re-search-forward bibtex-entry-type)
1772 (let ((beg-type (1+ (match-beginning 0))) 1772 (let ((beg-type (1+ (match-beginning 0)))
1773 (end-type (match-end 0))) 1773 (end-type (match-end 0)))
1774 (setq entry-list (assoc-ignore-case (buffer-substring-no-properties 1774 (setq entry-list (assoc-string (buffer-substring-no-properties
1775 beg-type end-type) 1775 beg-type end-type)
1776 bibtex-entry-field-alist)) 1776 bibtex-entry-field-alist
1777 t))
1777 1778
1778 ;; unify case of entry name 1779 ;; unify case of entry name
1779 (when (memq 'unify-case format) 1780 (when (memq 'unify-case format)
@@ -1846,8 +1847,8 @@ Formats current entry according to variable `bibtex-entry-format'."
1846 (if (memq 'opts-or-alts format) 1847 (if (memq 'opts-or-alts format)
1847 (cond ((and empty-field 1848 (cond ((and empty-field
1848 (or opt-alt 1849 (or opt-alt
1849 (let ((field (assoc-ignore-case 1850 (let ((field (assoc-string
1850 field-name req-field-list))) 1851 field-name req-field-list t)))
1851 (or (not field) ; OPT field 1852 (or (not field) ; OPT field
1852 (nth 3 field))))) ; ALT field 1853 (nth 3 field))))) ; ALT field
1853 ;; Either it is an empty ALT field. Then we have checked 1854 ;; Either it is an empty ALT field. Then we have checked
@@ -1918,15 +1919,17 @@ Formats current entry according to variable `bibtex-entry-format'."
1918 ;; if empty field, complain 1919 ;; if empty field, complain
1919 (if (and empty-field 1920 (if (and empty-field
1920 (memq 'required-fields format) 1921 (memq 'required-fields format)
1921 (assoc-ignore-case field-name req-field-list)) 1922 (assoc-string field-name req-field-list t))
1922 (error "Mandatory field `%s' is empty" field-name)) 1923 (error "Mandatory field `%s' is empty" field-name))
1923 1924
1924 ;; unify case of field name 1925 ;; unify case of field name
1925 (if (memq 'unify-case format) 1926 (if (memq 'unify-case format)
1926 (let ((fname (car (assoc-ignore-case 1927 (let ((fname (car (assoc-string
1927 field-name (append (nth 0 (nth 1 entry-list)) 1928 field-name
1928 (nth 1 (nth 1 entry-list)) 1929 (append (nth 0 (nth 1 entry-list))
1929 bibtex-user-optional-fields))))) 1930 (nth 1 (nth 1 entry-list))
1931 bibtex-user-optional-fields)
1932 t))))
1930 (if fname 1933 (if fname
1931 (progn 1934 (progn
1932 (delete-region beg-name end-name) 1935 (delete-region beg-name end-name)
@@ -2258,8 +2261,8 @@ Return alist of keys if parsing was completed, `aborted' otherwise."
2258 ;; This is a crossref. 2261 ;; This is a crossref.
2259 (buffer-substring-no-properties 2262 (buffer-substring-no-properties
2260 (1+ (match-beginning 3)) (1- (match-end 3)))) 2263 (1+ (match-beginning 3)) (1- (match-end 3))))
2261 ((assoc-ignore-case (bibtex-type-in-head) 2264 ((assoc-string (bibtex-type-in-head)
2262 bibtex-entry-field-alist) 2265 bibtex-entry-field-alist t)
2263 ;; This is an entry. 2266 ;; This is an entry.
2264 (match-string-no-properties bibtex-key-in-head))))) 2267 (match-string-no-properties bibtex-key-in-head)))))
2265 (if (and (stringp key) 2268 (if (and (stringp key)
@@ -2314,7 +2317,7 @@ Return alist of strings if parsing was completed, `aborted' otherwise."
2314 ;; user has aborted by typing a key --> return `aborted' 2317 ;; user has aborted by typing a key --> return `aborted'
2315 (throw 'userkey 'aborted)) 2318 (throw 'userkey 'aborted))
2316 (setq key (bibtex-reference-key-in-string bounds)) 2319 (setq key (bibtex-reference-key-in-string bounds))
2317 (if (not (assoc-ignore-case key strings)) 2320 (if (not (assoc-string key strings t))
2318 (push (cons key (bibtex-text-in-string bounds t)) 2321 (push (cons key (bibtex-text-in-string bounds t))
2319 strings)) 2322 strings))
2320 (goto-char (bibtex-end-of-text-in-string bounds))) 2323 (goto-char (bibtex-end-of-text-in-string bounds)))
@@ -2654,7 +2657,7 @@ non-nil.
2654More specifically, the return value is a cons pair (REQUIRED . OPTIONAL), 2657More specifically, the return value is a cons pair (REQUIRED . OPTIONAL),
2655where REQUIRED and OPTIONAL are lists of the required and optional field 2658where REQUIRED and OPTIONAL are lists of the required and optional field
2656names for ENTRY-TYPE according to `bibtex-entry-field-alist'." 2659names for ENTRY-TYPE according to `bibtex-entry-field-alist'."
2657 (let ((e (assoc-ignore-case entry-type bibtex-entry-field-alist)) 2660 (let ((e (assoc-string entry-type bibtex-entry-field-alist t))
2658 required optional) 2661 required optional)
2659 (unless e 2662 (unless e
2660 (error "Bibtex entry type %s not defined" entry-type)) 2663 (error "Bibtex entry type %s not defined" entry-type))
@@ -2721,10 +2724,10 @@ according to `bibtex-entry-field-alist', but are not yet present."
2721 (substring (cdr (assoc "=type=" fields-alist)) 2724 (substring (cdr (assoc "=type=" fields-alist))
2722 1)))) ; don't want @ 2725 1)))) ; don't want @
2723 (dolist (field (car field-list)) 2726 (dolist (field (car field-list))
2724 (unless (assoc-ignore-case (car field) fields-alist) 2727 (unless (assoc-string (car field) fields-alist t)
2725 (bibtex-make-field field))) 2728 (bibtex-make-field field)))
2726 (dolist (field (cdr field-list)) 2729 (dolist (field (cdr field-list))
2727 (unless (assoc-ignore-case (car field) fields-alist) 2730 (unless (assoc-string (car field) fields-alist t)
2728 (bibtex-make-optional-field field)))))) 2731 (bibtex-make-optional-field field))))))
2729 2732
2730(defun bibtex-parse-entry () 2733(defun bibtex-parse-entry ()
@@ -2792,7 +2795,7 @@ Move point to the end of the last field."
2792 (let* ((name (buffer-substring 2795 (let* ((name (buffer-substring
2793 (if (looking-at "ALT\\|OPT") (match-end 0) (point)) 2796 (if (looking-at "ALT\\|OPT") (match-end 0) (point))
2794 (bibtex-end-of-name-in-field bounds))) 2797 (bibtex-end-of-name-in-field bounds)))
2795 (text (assoc-ignore-case name other))) 2798 (text (assoc-string name other t)))
2796 (goto-char (bibtex-start-of-text-in-field bounds)) 2799 (goto-char (bibtex-start-of-text-in-field bounds))
2797 (if (not (and (looking-at bibtex-empty-field-re) text)) 2800 (if (not (and (looking-at bibtex-empty-field-re) text))
2798 (goto-char (bibtex-end-of-field bounds)) 2801 (goto-char (bibtex-end-of-field bounds))
@@ -2825,9 +2828,10 @@ Move point to the end of the last field."
2825 (field-list (bibtex-field-list (progn (re-search-backward 2828 (field-list (bibtex-field-list (progn (re-search-backward
2826 bibtex-entry-maybe-empty-head nil t) 2829 bibtex-entry-maybe-empty-head nil t)
2827 (bibtex-type-in-head)))) 2830 (bibtex-type-in-head))))
2828 (comment (assoc-ignore-case field-name 2831 (comment (assoc-string field-name
2829 (append (car field-list) 2832 (append (car field-list)
2830 (cdr field-list))))) 2833 (cdr field-list))
2834 t)))
2831 (if comment 2835 (if comment
2832 (message (nth 1 comment)) 2836 (message (nth 1 comment))
2833 (message "No comment available"))))) 2837 (message "No comment available")))))
@@ -3235,8 +3239,8 @@ Returns t if test was successful, nil otherwise."
3235 (let* ((entry-list (progn 3239 (let* ((entry-list (progn
3236 (goto-char beg) 3240 (goto-char beg)
3237 (bibtex-search-entry nil end) 3241 (bibtex-search-entry nil end)
3238 (assoc-ignore-case (bibtex-type-in-head) 3242 (assoc-string (bibtex-type-in-head)
3239 bibtex-entry-field-alist))) 3243 bibtex-entry-field-alist t)))
3240 (req (copy-sequence (elt (elt entry-list 1) 0))) 3244 (req (copy-sequence (elt (elt entry-list 1) 0)))
3241 (creq (copy-sequence (elt (elt entry-list 2) 0))) 3245 (creq (copy-sequence (elt (elt entry-list 2) 0)))
3242 crossref-there bounds) 3246 crossref-there bounds)
@@ -3252,8 +3256,8 @@ Returns t if test was successful, nil otherwise."
3252 (push (list (bibtex-current-line) 3256 (push (list (bibtex-current-line)
3253 "Questionable month field") 3257 "Questionable month field")
3254 error-list)) 3258 error-list))
3255 (setq req (delete (assoc-ignore-case field-name req) req) 3259 (setq req (delete (assoc-string field-name req t) req)
3256 creq (delete (assoc-ignore-case field-name creq) creq)) 3260 creq (delete (assoc-string field-name creq t) creq))
3257 (if (equal field-name "crossref") 3261 (if (equal field-name "crossref")
3258 (setq crossref-there t)))) 3262 (setq crossref-there t))))
3259 (if crossref-there 3263 (if crossref-there
diff --git a/lisp/textmodes/flyspell.el b/lisp/textmodes/flyspell.el
index 5d21fda6a9a..aff42866349 100644
--- a/lisp/textmodes/flyspell.el
+++ b/lisp/textmodes/flyspell.el
@@ -3,6 +3,7 @@
3;; Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. 3;; Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc.
4 4
5;; Author: Manuel Serrano <Manuel.Serrano@unice.fr> 5;; Author: Manuel Serrano <Manuel.Serrano@unice.fr>
6;; Maintainer: FSF
6;; Keywords: convenience 7;; Keywords: convenience
7 8
8;; This file is part of GNU Emacs. 9;; This file is part of GNU Emacs.
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el
index a86be8646c9..1b2628760e1 100644
--- a/lisp/textmodes/paragraphs.el
+++ b/lisp/textmodes/paragraphs.el
@@ -171,7 +171,7 @@ followed by two spaces, unless it's inside some sort of quotes or
171parenthesis. See Info node `Sentences'." 171parenthesis. See Info node `Sentences'."
172 (or sentence-end 172 (or sentence-end
173 (concat (if sentence-end-without-period "\\w \\|") 173 (concat (if sentence-end-without-period "\\w \\|")
174 "\\([.?!][]\"')}]*" 174 "\\([.?!][]\"'\xd0c9)}]*"
175 (if sentence-end-double-space 175 (if sentence-end-double-space
176 "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)") 176 "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)")
177 "\\|[" sentence-end-without-space "]+\\)" 177 "\\|[" sentence-end-without-space "]+\\)"
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index c2f4f188496..aa49c8d1d17 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,22 @@
12004-05-22 Richard M. Stallman <rms@gnu.org>
2
3 * syntax.texi (Syntax Class Table): Word syntax not just for English.
4
5 * streams.texi (Output Variables): Doc float-output-format.
6
7 * searching.texi (Regexp Special): Nested repetition can be infloop.
8
9 * eval.texi (Eval): Increasing max-lisp-eval-depth can cause
10 real stack overflow.
11
12 * compile.texi: Minor cleanups.
13
142004-05-22 Luc Teirlinck <teirllm@dms.auburn.edu>
15
16 * lists.texi (Cons Cells): Explain dotted lists, true lists,
17 circular lists.
18 (List Elements): Explain handling of circular and dotted lists.
19
12004-05-19 Thien-Thi Nguyen <ttn@gnu.org> 202004-05-19 Thien-Thi Nguyen <ttn@gnu.org>
2 21
3 * modes.texi (Search-based Fontification): Fix typo. 22 * modes.texi (Search-based Fontification): Fix typo.
diff --git a/lispref/compile.texi b/lispref/compile.texi
index a201a225379..6c28708bdf1 100644
--- a/lispref/compile.texi
+++ b/lispref/compile.texi
@@ -171,6 +171,10 @@ the actual byte-code; each character in it is an instruction or an
171operand of an instruction. The vector contains all the constants, 171operand of an instruction. The vector contains all the constants,
172variable names and function names used by the function, except for 172variable names and function names used by the function, except for
173certain primitives that are coded as special instructions. 173certain primitives that are coded as special instructions.
174
175If the argument to @code{byte-compile} is a @code{lambda} expression,
176it returns the corresponding compiled code, but does not store
177it anywhere.
174@end defun 178@end defun
175 179
176@deffn Command compile-defun &optional arg 180@deffn Command compile-defun &optional arg
@@ -232,7 +236,8 @@ recompilation if a @samp{.elc} file exists but is older than the
232When a @samp{.el} file has no corresponding @samp{.elc} file, 236When a @samp{.el} file has no corresponding @samp{.elc} file,
233@var{flag} says what to do. If it is @code{nil}, this command ignores 237@var{flag} says what to do. If it is @code{nil}, this command ignores
234these files. If @var{flag} is 0, it compiles them. If it is neither 238these files. If @var{flag} is 0, it compiles them. If it is neither
235@code{nil} nor 0, it asks the user whether to compile each such file. 239@code{nil} nor 0, it asks the user whether to compile each such file,
240and asks about each subdirectory as well.
236 241
237Interactively, @code{byte-recompile-directory} prompts for 242Interactively, @code{byte-recompile-directory} prompts for
238@var{directory} and @var{flag} is the prefix argument. 243@var{directory} and @var{flag} is the prefix argument.
@@ -293,8 +298,8 @@ in the file.
293 298
294@item 299@item
295If you alter the compiled file (such as by compiling a new version), 300If you alter the compiled file (such as by compiling a new version),
296then further access to documentation strings in this file will give 301then further access to documentation strings in this file will
297nonsense results. 302probably give nonsense results.
298@end itemize 303@end itemize
299 304
300 If your site installs Emacs following the usual procedures, these 305 If your site installs Emacs following the usual procedures, these
@@ -365,8 +370,8 @@ longer load the remaining function definitions not already loaded.
365 370
366@item 371@item
367If you alter the compiled file (such as by compiling a new version), 372If you alter the compiled file (such as by compiling a new version),
368then trying to load any function not already loaded will yield nonsense 373then trying to load any function not already loaded will usually yield
369results. 374nonsense results.
370@end itemize 375@end itemize
371 376
372 These problems will never happen in normal circumstances with 377 These problems will never happen in normal circumstances with
@@ -391,9 +396,10 @@ that are set up for dynamic function loading.
391@end defvar 396@end defvar
392 397
393@defun fetch-bytecode function 398@defun fetch-bytecode function
394This immediately finishes loading the definition of @var{function} from 399If @var{function} is a byte-code function object, this immediately
395its byte-compiled file, if it is not fully loaded already. The argument 400finishes loading the byte code of @var{function} from its
396@var{function} may be a byte-code function object or a function name. 401byte-compiled file, if it is not fully loaded already. Otherwise,
402it does nothing. It always returns @var{function}.
397@end defun 403@end defun
398 404
399@node Eval During Compile 405@node Eval During Compile
@@ -440,7 +446,7 @@ commands won't find the places they are really used. To do that,
440you must search for the function names. 446you must search for the function names.
441 447
442 You can suppress the compiler warning for calling an undefined 448 You can suppress the compiler warning for calling an undefined
443function @var{func} by conditionalizing the function call on a 449function @var{func} by conditionalizing the function call on an
444@code{fboundp} test, like this: 450@code{fboundp} test, like this:
445 451
446@example 452@example
@@ -468,14 +474,17 @@ The reference to @var{variable} must be in the @var{then-form} of the
468 You can suppress any compiler warnings using the construct 474 You can suppress any compiler warnings using the construct
469@code{with-no-warnings}: 475@code{with-no-warnings}:
470 476
471@defmac with-no-warnings body... 477@c This is implemented with a defun, but conceptually it is
478@c a special form.
479
480@defspec with-no-warnings body...
472In execution, this is equivalent to @code{(progn @var{body}...)}, 481In execution, this is equivalent to @code{(progn @var{body}...)},
473but the compiler does not issue warnings for anything that occurs 482but the compiler does not issue warnings for anything that occurs
474inside @var{body}. 483inside @var{body}.
475 484
476We recommend that you use this construct around the smallest 485We recommend that you use this construct around the smallest
477possible piece of code. 486possible piece of code.
478@end defmac 487@end defspec
479 488
480@node Byte-Code Objects 489@node Byte-Code Objects
481@section Byte-Code Function Objects 490@section Byte-Code Function Objects
@@ -578,7 +587,8 @@ name of an existing buffer. Then the output goes there, at point, and
578point is left before the output. 587point is left before the output.
579 588
580The argument @var{object} can be a function name, a lambda expression 589The argument @var{object} can be a function name, a lambda expression
581or a byte-code object. 590or a byte-code object. If it is a lambda expression, @code{disassemble}
591compiles it and disassembles the resulting compiled code.
582@end deffn 592@end deffn
583 593
584 Here are two examples of using the @code{disassemble} function. We 594 Here are two examples of using the @code{disassemble} function. We
diff --git a/lispref/eval.texi b/lispref/eval.texi
index 7d1ebb9d307..3c8a7a5e8a3 100644
--- a/lispref/eval.texi
+++ b/lispref/eval.texi
@@ -678,9 +678,12 @@ output of the output functions is printed in the echo area.
678@defvar max-lisp-eval-depth 678@defvar max-lisp-eval-depth
679This variable defines the maximum depth allowed in calls to @code{eval}, 679This variable defines the maximum depth allowed in calls to @code{eval},
680@code{apply}, and @code{funcall} before an error is signaled (with error 680@code{apply}, and @code{funcall} before an error is signaled (with error
681message @code{"Lisp nesting exceeds max-lisp-eval-depth"}). This limit, 681message @code{"Lisp nesting exceeds max-lisp-eval-depth"}).
682with the associated error when it is exceeded, is one way that Lisp 682
683avoids infinite recursion on an ill-defined function. 683This limit, with the associated error when it is exceeded, is one way
684Emacs Lisp avoids infinite recursion on an ill-defined function. If
685you increase the value of @code{max-lisp-eval-depth} too much, such
686code can cause stack overflow instead.
684@cindex Lisp nesting error 687@cindex Lisp nesting error
685 688
686The depth limit counts internal uses of @code{eval}, @code{apply}, and 689The depth limit counts internal uses of @code{eval}, @code{apply}, and
diff --git a/lispref/lists.texi b/lispref/lists.texi
index 7c369633c2e..2aa3c40b0e5 100644
--- a/lispref/lists.texi
+++ b/lispref/lists.texi
@@ -51,16 +51,37 @@ the @sc{car} and the @sc{cdr} is entirely a matter of convention; at the
51level of cons cells, the @sc{car} and @sc{cdr} slots have the same 51level of cons cells, the @sc{car} and @sc{cdr} slots have the same
52characteristics. 52characteristics.
53 53
54@cindex true list
55 Since @code{nil} is the conventional value to put in the @sc{cdr} of
56the last cons cell in the list, we call that case a @dfn{true list}.
57
58 In Lisp, we consider the symbol @code{nil} a list as well as a
59symbol; it is the list with no elements. For convenience, the symbol
60@code{nil} is considered to have @code{nil} as its @sc{cdr} (and also
61as its @sc{car}). Therefore, the @sc{cdr} of a true list is always a
62true list.
63
64@cindex dotted list
65@cindex circular list
66 If the @sc{cdr} of a list's last cons cell is some other value,
67neither @code{nil} nor another cons cell, we call the structure a
68@dfn{dotted list}, since its printed representation would use
69@samp{.}. There is one other possibility: some cons cell's @sc{cdr}
70could point to one of the previous cons cells in the list. We call
71that structure a @dfn{circular list}.
72
73 For some purposes, it does not matter whether a list is true,
74circular or dotted. If the program doesn't look far enough down the
75list to see the @sc{cdr} of the final cons cell, it won't care.
76However, some functions that operate on lists demand true lists and
77signal errors if given a dotted list. Most functions that try to find
78the end of a list enter infinite loops if given a circular list.
79
54@cindex list structure 80@cindex list structure
55 Because most cons cells are used as part of lists, the phrase 81 Because most cons cells are used as part of lists, the phrase
56@dfn{list structure} has come to mean any structure made out of cons 82@dfn{list structure} has come to mean any structure made out of cons
57cells. 83cells.
58 84
59 The symbol @code{nil} is considered a list as well as a symbol; it is
60the list with no elements. For convenience, the symbol @code{nil} is
61considered to have @code{nil} as its @sc{cdr} (and also as its
62@sc{car}).
63
64 The @sc{cdr} of any nonempty list @var{l} is a list containing all the 85 The @sc{cdr} of any nonempty list @var{l} is a list containing all the
65elements of @var{l} except the first. 86elements of @var{l} except the first.
66 87
@@ -394,12 +415,13 @@ if @var{n} is bigger than @var{list}'s length.
394 415
395@anchor{Definition of safe-length} 416@anchor{Definition of safe-length}
396@defun safe-length list 417@defun safe-length list
397This function returns the length of @var{list}, with no risk 418This function returns the length of @var{list}, with no risk of either
398of either an error or an infinite loop. 419an error or an infinite loop. It generally returns the number of
420distinct cons cells in the list. However, for circular lists,
421the value is just an upper bound; it is often too large.
399 422
400If @var{list} is not really a list, @code{safe-length} returns 0. If 423If @var{list} is not @code{nil} or a cons cell, @code{safe-length}
401@var{list} is circular, it returns a finite value which is at least the 424returns 0.
402number of distinct elements.
403@end defun 425@end defun
404 426
405 The most common way to compute the length of a list, when you are not 427 The most common way to compute the length of a list, when you are not
diff --git a/lispref/searching.texi b/lispref/searching.texi
index 9e26363a43a..d18587ccecb 100644
--- a/lispref/searching.texi
+++ b/lispref/searching.texi
@@ -244,13 +244,15 @@ first tries to match all three @samp{a}s; but the rest of the pattern is
244The next alternative is for @samp{a*} to match only two @samp{a}s. With 244The next alternative is for @samp{a*} to match only two @samp{a}s. With
245this choice, the rest of the regexp matches successfully.@refill 245this choice, the rest of the regexp matches successfully.@refill
246 246
247Nested repetition operators can be extremely slow if they specify 247Nested repetition operators can be extremely slow or loop infinitely
248backtracking loops. For example, it could take hours for the regular 248if they use repetition operators inside repetition operators. For
249expression @samp{\(x+y*\)*a} to try to match the sequence 249example, it could take hours for the regular expression
250@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately fails. 250@samp{\(x+y*\)*a} to try to match the sequence
251The slowness is because Emacs must try each imaginable way of grouping 251@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately
252the 35 @samp{x}s before concluding that none of them can work. To make 252fails. Emacs must try each way of grouping the 35 @samp{x}s before
253sure your regular expressions run fast, check nested repetitions 253concluding that none of them can work. Even worse, @samp{\(x*\)*} can
254match the null string in infinitely many ways, so it causes an
255infinite loop. To avoid these problems, check nested repetitions
254carefully. 256carefully.
255 257
256@item @samp{+} 258@item @samp{+}
diff --git a/lispref/streams.texi b/lispref/streams.texi
index a4e88b82f2e..fd9b13e84ef 100644
--- a/lispref/streams.texi
+++ b/lispref/streams.texi
@@ -821,6 +821,17 @@ the @code{print-circle} feature. You should not use it except
821to bind it to @code{nil} when you bind @code{print-continuous-numbering}. 821to bind it to @code{nil} when you bind @code{print-continuous-numbering}.
822@end defvar 822@end defvar
823 823
824@defvar float-output-format
825This variable specifies how to print floating point numbers. Its
826default value is @code{nil}, meaning use the shortest output
827that represents the number without losing information.
828
829To control output format more precisely, you can put a string in this
830variable. The string should hold a @samp{%}-specification to be used
831in the C function @code{sprintf}. For further restrictions on what
832you can use, see the variable's documentation string.
833@end defvar
834
824@ignore 835@ignore
825 arch-tag: 07636b8c-c4e3-4735-9e06-2e864320b434 836 arch-tag: 07636b8c-c4e3-4735-9e06-2e864320b434
826@end ignore 837@end ignore
diff --git a/lispref/syntax.texi b/lispref/syntax.texi
index 2628b42812e..8c95e78d00c 100644
--- a/lispref/syntax.texi
+++ b/lispref/syntax.texi
@@ -135,10 +135,10 @@ modes.
135@end deffn 135@end deffn
136 136
137@deffn {Syntax class} @w{word constituent} 137@deffn {Syntax class} @w{word constituent}
138@dfn{Word constituents} (designated by @samp{w}) are parts of normal 138@dfn{Word constituents} (designated by @samp{w}) are parts of words in
139English words and are typically used in variable and command names in 139human languages, and are typically used in variable and command names
140programs. All upper- and lower-case letters, and the digits, are typically 140in programs. All upper- and lower-case letters, and the digits, are
141word constituents. 141typically word constituents.
142@end deffn 142@end deffn
143 143
144@deffn {Syntax class} @w{symbol constituent} 144@deffn {Syntax class} @w{symbol constituent}
diff --git a/src/ChangeLog b/src/ChangeLog
index c1f0706b928..68f74e457e9 100644
--- a/src/ChangeLog
+++ b/src/ChangeLog
@@ -1,7 +1,51 @@
12004-05-22 Richard M. Stallman <rms@gnu.org>
2
3 * alloc.c (Fmake_string): Doc fix.
4
5 * buffer.c (clone_per_buffer_values): Copy the alist of local vars,
6 and the alist pairs too.
7
8 * casefiddle.c (casify_object): Return OBJ unchanged if not real char.
9
10 * emacs.c (main): Update copyright year.
11
12 * fileio.c (Fread_file_name): Expand DIR if not absolute.
13
14 * insdel.c (del_range_2, replace_range): Don't write an anchor
15 if the gap is empty.
16
17 * xdisp.c (try_scrolling): If scroll-up-aggressively or
18 scroll-down-aggressively is small but positive, put point
19 near the screen edge.
20
212004-05-22 Juanma Barranquero <lektu@terra.es>
22
23 * keymap.c (Fdefine_key): Doc fix.
24
252004-05-22 Kim F. Storm <storm@cua.dk>
26
27 * alloc.c (struct backtrace): Add debug_on_exit member.
28 (Fgarbage_collect): Clear out buffer undo_list markers after gc_sweep.
29 Identify those markers as Lisp_Misc_Free objects. Clear car and cdr of
30 the removed cons cells.
31 (mark_object): Undo previous change - disallow Lisp_Misc_Free objects.
32 (gc_sweep): Clear cons_blocks before sweeping strings, so we don't have
33 any cons cells pointing to unallocated stings.
34 Do not lisp_free any marker blocks, as there may still be pointers
35 to them from buffer undo lists at this stage of GC.
36
37 * keyboard.c (struct backtrace): Add debug_on_exit member.
38 (Fcommand_execute): Clear it.
39
402004-05-20 Luc Teirlinck <teirllm@auburn.edu>
41
42 * intervals.c (lookup_char_property): Do not prematurely return nil.
43
12004-05-19 Jim Blandy <jimb@redhat.com> 442004-05-19 Jim Blandy <jimb@redhat.com>
2 45
3 Add support for new '\_<' and '\_>' regexp operators, matching the 46 Add support for new '\_<' and '\_>' regexp operators, matching the
4 beginning and ends of symbols. 47 beginning and end of symbols.
48
5 * regex.c (enum syntaxcode): Add Ssymbol. 49 * regex.c (enum syntaxcode): Add Ssymbol.
6 (init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword. 50 (init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword.
7 (re_opcode_t): New opcodes `symbeg' and `symend'. 51 (re_opcode_t): New opcodes `symbeg' and `symend'.
@@ -1219,7 +1263,7 @@
1219 1263
1220 * macterm.c (XTread_socket): Remove bufp_r and 1264 * macterm.c (XTread_socket): Remove bufp_r and
1221 numcharsp args. Add hold_quit arg. 1265 numcharsp args. Add hold_quit arg.
1222 Rework to use just one, local, inev input_event. Store inev 1266 Rework to use just one, local, inev input_event. Store inev
1223 directly in fifo using kbd_buffer_store_event_hold. 1267 directly in fifo using kbd_buffer_store_event_hold.
1224 1268
1225 * sysdep.c (BUFFER_SIZE_FACTOR): Remove. 1269 * sysdep.c (BUFFER_SIZE_FACTOR): Remove.
@@ -1235,14 +1279,14 @@
1235 1279
1236 * w32inevt.c (w32_console_read_socket): Remove bufp_r and 1280 * w32inevt.c (w32_console_read_socket): Remove bufp_r and
1237 numcharsp args. Add hold_quit arg. 1281 numcharsp args. Add hold_quit arg.
1238 Rework to use just one, local, inev input_event. Store inev 1282 Rework to use just one, local, inev input_event. Store inev
1239 directly in fifo using kbd_buffer_store_event_hold. 1283 directly in fifo using kbd_buffer_store_event_hold.
1240 1284
1241 * w32inevt.h (w32_console_mouse_position): Fix prototype. 1285 * w32inevt.h (w32_console_mouse_position): Fix prototype.
1242 1286
1243 * w32term.c (w32_read_socket): Remove bufp_r and numcharsp args. 1287 * w32term.c (w32_read_socket): Remove bufp_r and numcharsp args.
1244 Add hold_quit arg. Rework to use just one, local, inev 1288 Add hold_quit arg. Rework to use just one, local, inev
1245 input_event. Store inev directly in fifo using 1289 input_event. Store inev directly in fifo using
1246 kbd_buffer_store_event_hold. Update count in one place. 1290 kbd_buffer_store_event_hold. Update count in one place.
1247 Postpone call to gen_help_event until inev is stored; use new 1291 Postpone call to gen_help_event until inev is stored; use new
1248 local do_help for this. 1292 local do_help for this.
@@ -1261,8 +1305,8 @@
1261 (current_hold_quit) [USE_GTK]: Add. 1305 (current_hold_quit) [USE_GTK]: Add.
1262 (event_handler_gdk): Adapt to new handle_one_xevent. 1306 (event_handler_gdk): Adapt to new handle_one_xevent.
1263 (handle_one_xevent): Remove bufp_r and numcharsp args. 1307 (handle_one_xevent): Remove bufp_r and numcharsp args.
1264 Add hold_quit arg. Rework to use just one, local, inev 1308 Add hold_quit arg. Rework to use just one, local, inev
1265 input_event. Store inev directly in fifo using 1309 input_event. Store inev directly in fifo using
1266 kbd_buffer_store_event_hold. Update count in one place. 1310 kbd_buffer_store_event_hold. Update count in one place.
1267 Postpone call to gen_help_event until inev is stored; use new 1311 Postpone call to gen_help_event until inev is stored; use new
1268 local do_help for this. 1312 local do_help for this.
@@ -1274,7 +1318,7 @@
1274 `goto done' to clarify code flow in deeply nested blocks. 1318 `goto done' to clarify code flow in deeply nested blocks.
1275 (x_dispatch_event): Simplify as handle_one_xevent now calls 1319 (x_dispatch_event): Simplify as handle_one_xevent now calls
1276 kbd_buffer_store_event itself. 1320 kbd_buffer_store_event itself.
1277 (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit 1321 (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit
1278 arg. Call handle_one_xevent with new arglist. Store event from 1322 arg. Call handle_one_xevent with new arglist. Store event from
1279 x_session_check_input in fifo. 1323 x_session_check_input in fifo.
1280 [USE_GTK]: Setup current_hold_quit. 1324 [USE_GTK]: Setup current_hold_quit.
@@ -2203,7 +2247,7 @@
2203 (marginal_area_string): Fix prototypes. 2247 (marginal_area_string): Fix prototypes.
2204 2248
2205 * keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from 2249 * keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from
2206 POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed. 2250 POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed.
2207 (POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros. 2251 (POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros.
2208 2252
2209 * keyboard.c (make_lispy_position): Use modified mode_line_string, 2253 * keyboard.c (make_lispy_position): Use modified mode_line_string,
@@ -2370,7 +2414,7 @@
2370 control frame pointer shape. Detect image hot-spots for pointer 2414 control frame pointer shape. Detect image hot-spots for pointer
2371 and help_echo properties. Use define_frame_cursor1. 2415 and help_echo properties. Use define_frame_cursor1.
2372 (note_mouse_highlight): Use Vvoid_text_area_pointer. 2416 (note_mouse_highlight): Use Vvoid_text_area_pointer.
2373 (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables. 2417 (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables.
2374 DEFVAR_LISP Vvoid_text_area_pointer instead of Vshow_text_cursor_in_void. 2418 DEFVAR_LISP Vvoid_text_area_pointer instead of Vshow_text_cursor_in_void.
2375 2419
2376 * xfaces.c (cache_face): Abort if c->size exceeds MAX_FACE_ID. 2420 * xfaces.c (cache_face): Abort if c->size exceeds MAX_FACE_ID.
@@ -2491,7 +2535,7 @@
2491 (glyph_to_pixel_coords): Don't use negative hpos. 2535 (glyph_to_pixel_coords): Don't use negative hpos.
2492 (x_y_to_hpos_vpos): Fix for partially visible first glyph. 2536 (x_y_to_hpos_vpos): Fix for partially visible first glyph.
2493 (append_stretch_glyph): Change ascent arg to be actual value 2537 (append_stretch_glyph): Change ascent arg to be actual value
2494 in pixels rather than ratio to height. Callers changed. 2538 in pixels rather than ratio to height. Callers changed.
2495 (calc_pixel_width_or_height): New aux function, implementing 2539 (calc_pixel_width_or_height): New aux function, implementing
2496 pixel based artihmetic for glyph widths and heights. 2540 pixel based artihmetic for glyph widths and heights.
2497 (produce_stretch_glyph): Use calc_pixel_width_or_height for 2541 (produce_stretch_glyph): Use calc_pixel_width_or_height for
@@ -2693,7 +2737,7 @@
2693 x_display_info_for_display instead. Use Display in xev instead 2737 x_display_info_for_display instead. Use Display in xev instead
2694 of GDK_DISPLAY. 2738 of GDK_DISPLAY.
2695 (x_dispatch_event): Call x_display_info_for_display. 2739 (x_dispatch_event): Call x_display_info_for_display.
2696 (XTread_socket): Move GTK part out of loop. current_dpyinfo removed. 2740 (XTread_socket): Move GTK part out of loop. current_dpyinfo removed.
2697 (x_connection_closed): Call xg_display_close for GTK. 2741 (x_connection_closed): Call xg_display_close for GTK.
2698 (x_term_init): Call xg_display_open for additional displays. 2742 (x_term_init): Call xg_display_open for additional displays.
2699 Initiate dpyinfo->xg_cursor with call to xg_create_default_cursor 2743 Initiate dpyinfo->xg_cursor with call to xg_create_default_cursor
@@ -4195,7 +4239,7 @@
4195 from x/w32/macterm.h files. All uses changed. Also change code 4239 from x/w32/macterm.h files. All uses changed. Also change code
4196 which referred to f->output_data...->pixel_height. 4240 which referred to f->output_data...->pixel_height.
4197 (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved 4241 (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved
4198 from x/w32/macterm.h files. All uses changed. Also change code 4242 from x/w32/macterm.h files. All uses changed. Also change code
4199 which referred to f->output_data...->pixel_width. 4243 which referred to f->output_data...->pixel_width.
4200 (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed. 4244 (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed.
4201 Also change code which referred to f->height. 4245 Also change code which referred to f->height.
@@ -4505,7 +4549,7 @@
4505 * xdisp.c: Make (many) trivial substitutions for renamed and 4549 * xdisp.c: Make (many) trivial substitutions for renamed and
4506 new macros in dispextern.h, frame.h and window.h. 4550 new macros in dispextern.h, frame.h and window.h.
4507 (window_box_width): Adapt to per-window fringes and scroll bars, 4551 (window_box_width): Adapt to per-window fringes and scroll bars,
4508 and new fringe vs. display margin position. Note that returned 4552 and new fringe vs. display margin position. Note that returned
4509 value is no longer guaranteed to be a whole multiple of the frame 4553 value is no longer guaranteed to be a whole multiple of the frame
4510 column width, since per-window fringes may now be any width. 4554 column width, since per-window fringes may now be any width.
4511 (window_box_left_offset): New function like window_box_left, but 4555 (window_box_left_offset): New function like window_box_left, but
@@ -5255,7 +5299,7 @@
5255 5299
5256 * xfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame 5300 * xfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
5257 parameters now defined in frame.h and frame.c. 5301 parameters now defined in frame.h and frame.c.
5258 (Vx_resource_name): Remove. Use generic var. 5302 (Vx_resource_name): Remove. Use generic var.
5259 (enum x_frame_parms): Remove (bogus, unused enum). 5303 (enum x_frame_parms): Remove (bogus, unused enum).
5260 (check_x_display_info): Make non-static (for frame.c). 5304 (check_x_display_info): Make non-static (for frame.c).
5261 (struct x_frame_parm_table, x_frame_parms): Remove. 5305 (struct x_frame_parm_table, x_frame_parms): Remove.
@@ -5275,7 +5319,7 @@
5275 (syms_of_xfns): Don't intern/staticpro removed vars. 5319 (syms_of_xfns): Don't intern/staticpro removed vars.
5276 5320
5277 * xterm.c: Remove unnecessary extern declarations. 5321 * xterm.c: Remove unnecessary extern declarations.
5278 (x_fullscreen_adjust): Remove. Use generic instead. 5322 (x_fullscreen_adjust): Remove. Use generic instead.
5279 (x_redisplay_interface): Add x_frame_parm_handlers member. 5323 (x_redisplay_interface): Add x_frame_parm_handlers member.
5280 5324
5281 * w32gui.h (XrmDatabase): New (dummy) typedef. 5325 * w32gui.h (XrmDatabase): New (dummy) typedef.
@@ -5287,7 +5331,7 @@
5287 5331
5288 * w32fns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame 5332 * w32fns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
5289 parameters now defined in frame.h and frame.c. 5333 parameters now defined in frame.h and frame.c.
5290 (Vx_resource_name): Remove. Use generic var. 5334 (Vx_resource_name): Remove. Use generic var.
5291 (enum x_frame_parms): Remove (bogus, unused enum). 5335 (enum x_frame_parms): Remove (bogus, unused enum).
5292 (check_x_display_info): Make non-static (for frame.c). 5336 (check_x_display_info): Make non-static (for frame.c).
5293 (struct x_frame_parm_table, x_frame_parms): Remove. 5337 (struct x_frame_parm_table, x_frame_parms): Remove.
@@ -5320,7 +5364,7 @@
5320 5364
5321 * macfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame 5365 * macfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame
5322 parameters now defined in frame.h and frame.c. 5366 parameters now defined in frame.h and frame.c.
5323 (Vx_resource_name): Remove. Use generic var. 5367 (Vx_resource_name): Remove. Use generic var.
5324 (check_x_display_info): Make non-static (for frame.c). 5368 (check_x_display_info): Make non-static (for frame.c).
5325 (struct x_frame_parm_table, x_frame_parms): Remove. 5369 (struct x_frame_parm_table, x_frame_parms): Remove.
5326 (init_x_parm_symbols, x_set_frame_parameters, x_report_frame_params) 5370 (init_x_parm_symbols, x_set_frame_parameters, x_report_frame_params)
@@ -6301,7 +6345,7 @@
6301 [HAVE_XPM]: Avoid clashes with XColor, XImage and Pixel 6345 [HAVE_XPM]: Avoid clashes with XColor, XImage and Pixel
6302 definitions in xpm.h. 6346 definitions in xpm.h.
6303 (init_xpm_functions): New function. 6347 (init_xpm_functions): New function.
6304 (xpm_load): Sync with xfns.c. Adapt for Windows version of libXpm. 6348 (xpm_load): Sync with xfns.c. Adapt for Windows version of libXpm.
6305 (init_external_image_libraries): Try to load libXpm.dll. 6349 (init_external_image_libraries): Try to load libXpm.dll.
6306 6350
6307 * fileio.c (Fcopy_file) [WINDOWSNT]: Reverse logic for setting 6351 * fileio.c (Fcopy_file) [WINDOWSNT]: Reverse logic for setting
@@ -6330,8 +6374,8 @@
6330 * w32fns.c (DrawText): Kludge to avoid a redefinition on Windows 6374 * w32fns.c (DrawText): Kludge to avoid a redefinition on Windows
6331 when including gif_lib.h. 6375 when including gif_lib.h.
6332 (init_gif_functions, init_tiff_functions): New functions. 6376 (init_gif_functions, init_tiff_functions): New functions.
6333 (gif_load, tiff_load): Sync with xfns.c version. Adjust colors for 6377 (gif_load, tiff_load): Sync with xfns.c version. Adjust colors for
6334 Windows. Disable color table lookups. Call library functions 6378 Windows. Disable color table lookups. Call library functions
6335 through pointers determined at runtime. 6379 through pointers determined at runtime.
6336 (init_external_image_libraries): Try to load libungif.dll and 6380 (init_external_image_libraries): Try to load libungif.dll and
6337 libtiff.dll. 6381 libtiff.dll.
@@ -6397,8 +6441,8 @@
6397 6441
6398 * w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper): 6442 * w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper):
6399 New functions. 6443 New functions.
6400 (jpeg_load): Sync with xfns.c version. Adjust colors for Windows. 6444 (jpeg_load): Sync with xfns.c version. Adjust colors for Windows.
6401 Disable color table lookups. Call jpeg library functions 6445 Disable color table lookups. Call jpeg library functions
6402 through pointers determined at runtime. 6446 through pointers determined at runtime.
6403 (init_external_image_libraries): Try to load jpeg.dll. 6447 (init_external_image_libraries): Try to load jpeg.dll.
6404 6448
@@ -6435,8 +6479,8 @@
6435 6479
6436 * w32fns.c (XPutPixel): Handle monochrome images; used for masks. 6480 * w32fns.c (XPutPixel): Handle monochrome images; used for masks.
6437 [HAVE_PNG]: Sync with xfns.c version. 6481 [HAVE_PNG]: Sync with xfns.c version.
6438 (png_load): Adjust colors for Windows. Use Windows 6482 (png_load): Adjust colors for Windows. Use Windows
6439 bitmaps. Disable color table lookups. 6483 bitmaps. Disable color table lookups.
6440 (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): New macros. 6484 (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): New macros.
6441 (init_png_functions): New function. 6485 (init_png_functions): New function.
6442 (png_read_from_memory, png_load): Call png library functions 6486 (png_read_from_memory, png_load): Call png library functions
@@ -6533,7 +6577,7 @@
65332003-01-21 David Ponce <david@dponce.com> 65772003-01-21 David Ponce <david@dponce.com>
6534 6578
6535 * w32term.c (w32_encode_char): For DIM=1 charset, set 6579 * w32term.c (w32_encode_char): For DIM=1 charset, set
6536 ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c 6580 ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c
6537 x_encode_char change by Kenichi Handa <handa@m17n.org> on 6581 x_encode_char change by Kenichi Handa <handa@m17n.org> on
6538 2002-09-30.) 6582 2002-09-30.)
6539 (w32_draw_relief_rect): Declare all args. 6583 (w32_draw_relief_rect): Declare all args.
@@ -7066,7 +7110,7 @@
7066 only if g_b_init_get_sid_identifier_authority is equal to 0. 7110 only if g_b_init_get_sid_identifier_authority is equal to 0.
7067 On initialization set g_b_init_get_sid_identifier_authority equal to 1. 7111 On initialization set g_b_init_get_sid_identifier_authority equal to 1.
7068 7112
7069 * w32fns.c (globals_of_w32fns): New function. Used to initialize 7113 * w32fns.c (globals_of_w32fns): New function. Used to initialize
7070 those global variables that must always be initialized on startup 7114 those global variables that must always be initialized on startup
7071 even when the global variable initialized is non zero. 7115 even when the global variable initialized is non zero.
7072 Its primary purpose at this time is to initialize the global variable 7116 Its primary purpose at this time is to initialize the global variable
@@ -7077,7 +7121,7 @@
7077 7121
7078 * w32fns.c (syms_of_w32fns): Call globals_of_w32fns. 7122 * w32fns.c (syms_of_w32fns): Call globals_of_w32fns.
7079 7123
7080 * w32menu.c (globals_of_w32menu): New function. Used to 7124 * w32menu.c (globals_of_w32menu): New function. Used to
7081 initialize those global variables that must always be initialized 7125 initialize those global variables that must always be initialized
7082 on startup even when the global variable initialized is non zero. 7126 on startup even when the global variable initialized is non zero.
7083 Its primary purpose at this time is to initialize the global 7127 Its primary purpose at this time is to initialize the global
@@ -9299,7 +9343,7 @@
92992002-06-21 Pavel Jan,Am(Bk <Pavel@Janik.cz> 93432002-06-21 Pavel Jan,Am(Bk <Pavel@Janik.cz>
9300 9344
9301 * m/pmax.h (START_FILES): Define START_FILES for NetBSD and 9345 * m/pmax.h (START_FILES): Define START_FILES for NetBSD and
9302 OpenBSD. Add support for mipseb-*-netbsd* machines. 9346 OpenBSD. Add support for mipseb-*-netbsd* machines.
9303 9347
93042002-06-17 Andrew Choi <akochoi@shaw.ca> 93482002-06-17 Andrew Choi <akochoi@shaw.ca>
9305 9349
@@ -10701,7 +10745,7 @@
10701 (server_accept_connection): New function. 10745 (server_accept_connection): New function.
10702 (wait_reading_process_input): Use it to handle incoming connects. 10746 (wait_reading_process_input): Use it to handle incoming connects.
10703 Do not enable input on a new connection if process is stopped. 10747 Do not enable input on a new connection if process is stopped.
10704 (read_process_output): Handle datagram sockets. Use 2k buffer for them. 10748 (read_process_output): Handle datagram sockets. Use 2k buffer for them.
10705 (send_process): Handle datagram sockets. 10749 (send_process): Handle datagram sockets.
10706 (Fstop_process, Fcontinue_process): Apply to network processes. A stopped 10750 (Fstop_process, Fcontinue_process): Apply to network processes. A stopped
10707 network process is indicated by setting command field to t . 10751 network process is indicated by setting command field to t .
@@ -12287,7 +12331,7 @@
12287 12331
122882001-12-01 Jason Rumney <jasonr@gnu.org> 123322001-12-01 Jason Rumney <jasonr@gnu.org>
12289 12333
12290 * window.c (Qleft_fringe, Qright_fringe): Remove. Now in frame.c. 12334 * window.c (Qleft_fringe, Qright_fringe): Remove. Now in frame.c.
12291 12335
12292 * w32term.h (WM_MOUSELEAVE, TME_LEAVE, TRACKMOUSEEVENT) 12336 * w32term.h (WM_MOUSELEAVE, TME_LEAVE, TRACKMOUSEEVENT)
12293 [!WM_MOUSELEAVE]: Define. 12337 [!WM_MOUSELEAVE]: Define.
@@ -12339,7 +12383,7 @@
12339 12383
12340 * xterm.c (zv_height, zv_bits, zv_period): Changed zv bitmap to 12384 * xterm.c (zv_height, zv_bits, zv_period): Changed zv bitmap to
12341 fill fringe evenly with small dashes. 12385 fill fringe evenly with small dashes.
12342 (x_draw_fringe_bitmap): Clear background if necessary. Align and 12386 (x_draw_fringe_bitmap): Clear background if necessary. Align and
12343 clip the new ZV bitmap to avoid jitter between rows. 12387 clip the new ZV bitmap to avoid jitter between rows.
12344 (x_draw_row_fringe_bitmaps): Rely on x_draw_fringe_bitmap to clear 12388 (x_draw_row_fringe_bitmaps): Rely on x_draw_fringe_bitmap to clear
12345 background. Don't draw fringe bitmaps if fringe width is zero. 12389 background. Don't draw fringe bitmaps if fringe width is zero.
@@ -12404,7 +12448,7 @@
12404 menu items. From David Ponce <dponce@wanadoo.fr>. 12448 menu items. From David Ponce <dponce@wanadoo.fr>.
12405 (w32_dialog_show) [HAVE_DIALOGS]: Compile whole function 12449 (w32_dialog_show) [HAVE_DIALOGS]: Compile whole function
12406 conditionally. 12450 conditionally.
12407 (w32_menu_display_help): New argument OWNER. Rewritten to store a 12451 (w32_menu_display_help): New argument OWNER. Rewritten to store a
12408 help event in the owner frame's keyboard buffer. 12452 help event in the owner frame's keyboard buffer.
12409 12453
12410 * w32fns.c (w32_wnd_proc) <WM_MENUSELECT>: Display help directly. 12454 * w32fns.c (w32_wnd_proc) <WM_MENUSELECT>: Display help directly.
@@ -12520,7 +12564,7 @@
12520 (my_create_tip_window): Assign tip_window. 12564 (my_create_tip_window): Assign tip_window.
12521 (x_create_tip_frame): Use same defaults as X. 12565 (x_create_tip_frame): Use same defaults as X.
12522 (compute_tip_xy): Remove unused variable. Use full screen width. 12566 (compute_tip_xy): Remove unused variable. Use full screen width.
12523 (Fx_show_tip): Do not double height. Call ShowWindow directly. 12567 (Fx_show_tip): Do not double height. Call ShowWindow directly.
12524 12568
12525 * w32term.c (x_after_update_window_line): Doc fix. 12569 * w32term.c (x_after_update_window_line): Doc fix.
12526 (w32_read_socket): Doc fix. Avoid SET_FRAME_GARBAGED for tip 12570 (w32_read_socket): Doc fix. Avoid SET_FRAME_GARBAGED for tip
@@ -12757,9 +12801,9 @@
12757 `bitmaps': 12801 `bitmaps':
12758 12802
12759 * dispextern.h (FRINGE_FACE_ID): Renamed from BITMAP_AREA_FACE_ID. 12803 * dispextern.h (FRINGE_FACE_ID): Renamed from BITMAP_AREA_FACE_ID.
12760 Comments fixed. Use renamed symbols. 12804 Comments fixed. Use renamed symbols.
12761 12805
12762 * dispnew.c: Comment fix. Use renamed symbols. 12806 * dispnew.c: Comment fix. Use renamed symbols.
12763 12807
12764 * frame.h (FRAME_FRINGE_COLS): Renamed from FRAME_FLAGS_AREA_COLS. 12808 * frame.h (FRAME_FRINGE_COLS): Renamed from FRAME_FLAGS_AREA_COLS.
12765 (FRAME_FRINGE_WIDTH): Renamed from FRAME_FLAGS_AREA_WIDTH. 12809 (FRAME_FRINGE_WIDTH): Renamed from FRAME_FLAGS_AREA_WIDTH.
@@ -12769,13 +12813,13 @@
12769 12813
12770 * w32fns.c: Use renamed symbols. 12814 * w32fns.c: Use renamed symbols.
12771 12815
12772 * w32term.c: Comment fixes. Use renamed symbols. 12816 * w32term.c: Comment fixes. Use renamed symbols.
12773 (fringe_bitmap_type): Renamed from bitmap_type. 12817 (fringe_bitmap_type): Renamed from bitmap_type.
12774 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP. 12818 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP.
12775 (w32_draw_fringe_bitmap): Renamed from w32_draw_bitmap. 12819 (w32_draw_fringe_bitmap): Renamed from w32_draw_bitmap.
12776 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps. 12820 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps.
12777 12821
12778 * w32term.h: Comment fixes. Use renamed symbols. 12822 * w32term.h: Comment fixes. Use renamed symbols.
12779 (fringes_extra): Renamed from flags_areas_extra. 12823 (fringes_extra): Renamed from flags_areas_extra.
12780 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH. 12824 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH.
12781 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT. 12825 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT.
@@ -12788,22 +12832,22 @@
12788 12832
12789 * widget.c: Use renamed symbols. 12833 * widget.c: Use renamed symbols.
12790 12834
12791 * window.c: Comment fixes. Use renamed symbols. 12835 * window.c: Comment fixes. Use renamed symbols.
12792 (coordinates-in-window-p): Doc fix. 12836 (coordinates-in-window-p): Doc fix.
12793 12837
12794 * xdisp.c: Comment fixes. Use renamed symbols. 12838 * xdisp.c: Comment fixes. Use renamed symbols.
12795 12839
12796 * xfaces.c (realize_basic_faces): Use FRINGE_FACE_ID. 12840 * xfaces.c (realize_basic_faces): Use FRINGE_FACE_ID.
12797 12841
12798 * xfns.c: Use renamed symbols. 12842 * xfns.c: Use renamed symbols.
12799 12843
12800 * xterm.c: Comment fixes. Use renamed symbols. 12844 * xterm.c: Comment fixes. Use renamed symbols.
12801 (fringe_bitmap_type): Renamed from bitmap_type. 12845 (fringe_bitmap_type): Renamed from bitmap_type.
12802 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP. 12846 (NO_FRINGE_BITMAP): Renamed from NO_BITMAP.
12803 (x_draw_fringe_bitmap): Renamed from x_draw_bitmap. 12847 (x_draw_fringe_bitmap): Renamed from x_draw_bitmap.
12804 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps. 12848 (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps.
12805 12849
12806 * xterm.h: Comment fixes. Use renamed symbols. 12850 * xterm.h: Comment fixes. Use renamed symbols.
12807 (fringes_extra): Renamed from flags_areas_extra. 12851 (fringes_extra): Renamed from flags_areas_extra.
12808 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH. 12852 (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH.
12809 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT. 12853 (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT.
@@ -12921,8 +12965,8 @@
129212001-11-12 Jason Rumney <jasonr@gnu.org> 129652001-11-12 Jason Rumney <jasonr@gnu.org>
12922 12966
12923 * w32console.c, w32fns.c, w32menu.c, w32proc.c, w32select.c, 12967 * w32console.c, w32fns.c, w32menu.c, w32proc.c, w32select.c,
12924 * w32term.c: Change doc-string comments to `new style'. 12968 * w32term.c: Change doc-string comments to `new style'
12925 [w/`doc:' keyword]. Doc fixes. 12969 [w/`doc:' keyword]. Doc fixes.
12926 12970
12927 * w32fns.c: Don't define max. 12971 * w32fns.c: Don't define max.
12928 (Fx_open_connection): Only execute once. 12972 (Fx_open_connection): Only execute once.
@@ -12957,7 +13001,7 @@
129572001-11-10 Jason Rumney <jasonr@gnu.org> 130012001-11-10 Jason Rumney <jasonr@gnu.org>
12958 13002
12959 * w32fns.c (enum_font_cb2): Use leading @ on face name to detect 13003 * w32fns.c (enum_font_cb2): Use leading @ on face name to detect
12960 vertical fonts. Allow them if face name is explicitly specified. 13004 vertical fonts. Allow them if face name is explicitly specified.
12961 Do not give up if we find a font that cannot be converted to an xlfd. 13005 Do not give up if we find a font that cannot be converted to an xlfd.
12962 13006
129632001-11-10 Gerd Moellmann <gerd@gnu.org> 130072001-11-10 Gerd Moellmann <gerd@gnu.org>
@@ -13767,7 +13811,7 @@
13767 full-width rows. 13811 full-width rows.
13768 (x_dump_glyph_string): Put in #if GLYPH_DEBUG. 13812 (x_dump_glyph_string): Put in #if GLYPH_DEBUG.
13769 (w32_draw_relief_rect): Extend left shadow to the bottom and left; 13813 (w32_draw_relief_rect): Extend left shadow to the bottom and left;
13770 change bottom shadow accordingly. Some cleanup. 13814 change bottom shadow accordingly. Some cleanup.
13771 (x_update_window_end): Handle overwritten mouse face 13815 (x_update_window_end): Handle overwritten mouse face
13772 also for tool bar windows. 13816 also for tool bar windows.
13773 (show_mouse_face): Set the glyph row's mouse_face_p flag also when 13817 (show_mouse_face): Set the glyph row's mouse_face_p flag also when
@@ -13813,7 +13857,7 @@
13813 (Fv_max_tooltip_size): New variable. 13857 (Fv_max_tooltip_size): New variable.
13814 (syns_of_xfns): DEFVAR_LISP it. 13858 (syns_of_xfns): DEFVAR_LISP it.
13815 (Fx_show_tip): Add parameter TEXT. Set the tip frame's root 13859 (Fx_show_tip): Add parameter TEXT. Set the tip frame's root
13816 window buffer to *tip* right after creating the frame. Set frame's 13860 window buffer to *tip* right after creating the frame. Set frame's
13817 window_width. Use a maximum tooltip size specified by 13861 window_width. Use a maximum tooltip size specified by
13818 Vx_max_tooltip_size, if that has valid contents. 13862 Vx_max_tooltip_size, if that has valid contents.
13819 (compute_tip_xy): Add parameters WIDTH and HEIGHT. 13863 (compute_tip_xy): Add parameters WIDTH and HEIGHT.
diff --git a/src/alloc.c b/src/alloc.c
index 63447d078f9..ae156d89f24 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -1894,8 +1894,9 @@ compact_small_strings ()
1894 1894
1895 1895
1896DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, 1896DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0,
1897 doc: /* Return a newly created string of length LENGTH, with each element being INIT. 1897 doc: /* Return a newly created string of length LENGTH, with INIT in each element.
1898Both LENGTH and INIT must be numbers. */) 1898LENGTH must be an integer.
1899INIT must be an integer that represents a character. */)
1899 (length, init) 1900 (length, init)
1900 Lisp_Object length, init; 1901 Lisp_Object length, init;
1901{ 1902{
@@ -2335,7 +2336,6 @@ free_cons (ptr)
2335 cons_free_list = ptr; 2336 cons_free_list = ptr;
2336} 2337}
2337 2338
2338
2339DEFUN ("cons", Fcons, Scons, 2, 2, 0, 2339DEFUN ("cons", Fcons, Scons, 2, 2, 0,
2340 doc: /* Create a new cons, give it CAR and CDR as components, and return it. */) 2340 doc: /* Create a new cons, give it CAR and CDR as components, and return it. */)
2341 (car, cdr) 2341 (car, cdr)
@@ -4287,6 +4287,8 @@ struct backtrace
4287 /* If nargs is UNEVALLED, args points to slot holding list of 4287 /* If nargs is UNEVALLED, args points to slot holding list of
4288 unevalled args. */ 4288 unevalled args. */
4289 char evalargs; 4289 char evalargs;
4290 /* Nonzero means call value of debugger when done with this operation. */
4291 char debug_on_exit;
4290}; 4292};
4291 4293
4292 4294
@@ -4478,34 +4480,42 @@ returns nil, because real GC can't be done. */)
4478 } 4480 }
4479#endif 4481#endif
4480 4482
4481 /* Look thru every buffer's undo list 4483 gc_sweep ();
4482 for elements that update markers that were not marked, 4484
4483 and delete them. */ 4485 /* Look thru every buffer's undo list for elements that used to
4486 contain update markers that were changed to Lisp_Misc_Free
4487 objects and delete them. This may leave a few cons cells
4488 unchained, but we will get those on the next sweep. */
4484 { 4489 {
4485 register struct buffer *nextb = all_buffers; 4490 register struct buffer *nextb = all_buffers;
4486 4491
4487 while (nextb) 4492 while (nextb)
4488 { 4493 {
4489 /* If a buffer's undo list is Qt, that means that undo is 4494 /* If a buffer's undo list is Qt, that means that undo is
4490 turned off in that buffer. Calling truncate_undo_list on 4495 turned off in that buffer. */
4491 Qt tends to return NULL, which effectively turns undo back on.
4492 So don't call truncate_undo_list if undo_list is Qt. */
4493 if (! EQ (nextb->undo_list, Qt)) 4496 if (! EQ (nextb->undo_list, Qt))
4494 { 4497 {
4495 Lisp_Object tail, prev; 4498 Lisp_Object tail, prev, elt, car;
4496 tail = nextb->undo_list; 4499 tail = nextb->undo_list;
4497 prev = Qnil; 4500 prev = Qnil;
4498 while (CONSP (tail)) 4501 while (CONSP (tail))
4499 { 4502 {
4500 if (GC_CONSP (XCAR (tail)) 4503 if ((elt = XCAR (tail), GC_CONSP (elt))
4501 && GC_MARKERP (XCAR (XCAR (tail))) 4504 && (car = XCAR (elt), GC_MISCP (car))
4502 && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) 4505 && XMISCTYPE (car) == Lisp_Misc_Free)
4503 { 4506 {
4507 Lisp_Object cdr = XCDR (tail);
4508 /* Do not use free_cons here, as we don't know if
4509 anybody else has a pointer to these conses. */
4510 XSETCAR (elt, Qnil);
4511 XSETCDR (elt, Qnil);
4512 XSETCAR (tail, Qnil);
4513 XSETCDR (tail, Qnil);
4504 if (NILP (prev)) 4514 if (NILP (prev))
4505 nextb->undo_list = tail = XCDR (tail); 4515 nextb->undo_list = tail = cdr;
4506 else 4516 else
4507 { 4517 {
4508 tail = XCDR (tail); 4518 tail = cdr;
4509 XSETCDR (prev, tail); 4519 XSETCDR (prev, tail);
4510 } 4520 }
4511 } 4521 }
@@ -4521,8 +4531,6 @@ returns nil, because real GC can't be done. */)
4521 } 4531 }
4522 } 4532 }
4523 4533
4524 gc_sweep ();
4525
4526 /* Clear the mark bits that we set in certain root slots. */ 4534 /* Clear the mark bits that we set in certain root slots. */
4527 4535
4528 unmark_byte_stack (); 4536 unmark_byte_stack ();
@@ -4978,14 +4986,6 @@ mark_object (arg)
4978 break; 4986 break;
4979 4987
4980 case Lisp_Misc: 4988 case Lisp_Misc:
4981 if (XMISCTYPE (obj) == Lisp_Misc_Free)
4982 {
4983 /* This is (probably) a freed marker which may still exist on
4984 a buffer undo list, so accept it here, as check below will
4985 fail (not live). KFS 2004-05-17 */
4986 XMARKER (obj)->gcmarkbit = 1;
4987 break;
4988 }
4989 CHECK_ALLOCATED_AND_LIVE (live_misc_p); 4989 CHECK_ALLOCATED_AND_LIVE (live_misc_p);
4990 if (XMARKER (obj)->gcmarkbit) 4990 if (XMARKER (obj)->gcmarkbit)
4991 break; 4991 break;
@@ -5211,16 +5211,6 @@ survives_gc_p (obj)
5211static void 5211static void
5212gc_sweep () 5212gc_sweep ()
5213{ 5213{
5214 /* Remove or mark entries in weak hash tables.
5215 This must be done before any object is unmarked. */
5216 sweep_weak_hash_tables ();
5217
5218 sweep_strings ();
5219#ifdef GC_CHECK_STRING_BYTES
5220 if (!noninteractive)
5221 check_string_bytes (1);
5222#endif
5223
5224 /* Put all unmarked conses on free list */ 5214 /* Put all unmarked conses on free list */
5225 { 5215 {
5226 register struct cons_block *cblk; 5216 register struct cons_block *cblk;
@@ -5271,6 +5261,16 @@ gc_sweep ()
5271 total_free_conses = num_free; 5261 total_free_conses = num_free;
5272 } 5262 }
5273 5263
5264 /* Remove or mark entries in weak hash tables.
5265 This must be done before any object is unmarked. */
5266 sweep_weak_hash_tables ();
5267
5268 sweep_strings ();
5269#ifdef GC_CHECK_STRING_BYTES
5270 if (!noninteractive)
5271 check_string_bytes (1);
5272#endif
5273
5274 /* Put all unmarked floats on free list */ 5274 /* Put all unmarked floats on free list */
5275 { 5275 {
5276 register struct float_block *fblk; 5276 register struct float_block *fblk;
@@ -5469,6 +5469,9 @@ gc_sweep ()
5469 /* If this block contains only free markers and we have already 5469 /* If this block contains only free markers and we have already
5470 seen more than two blocks worth of free markers then deallocate 5470 seen more than two blocks worth of free markers then deallocate
5471 this block. */ 5471 this block. */
5472#if 0
5473 /* There may still be pointers to these markers from a buffer's
5474 undo list, so don't free them. KFS 2004-05-21 /
5472 if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE) 5475 if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE)
5473 { 5476 {
5474 *mprev = mblk->next; 5477 *mprev = mblk->next;
@@ -5478,6 +5481,7 @@ gc_sweep ()
5478 n_marker_blocks--; 5481 n_marker_blocks--;
5479 } 5482 }
5480 else 5483 else
5484#endif
5481 { 5485 {
5482 num_free += this_free; 5486 num_free += this_free;
5483 mprev = &mblk->next; 5487 mprev = &mblk->next;
diff --git a/src/buffer.c b/src/buffer.c
index 7560e696685..532a768ba50 100644
--- a/src/buffer.c
+++ b/src/buffer.c
@@ -487,7 +487,7 @@ static void
487clone_per_buffer_values (from, to) 487clone_per_buffer_values (from, to)
488 struct buffer *from, *to; 488 struct buffer *from, *to;
489{ 489{
490 Lisp_Object to_buffer; 490 Lisp_Object to_buffer, tem;
491 int offset; 491 int offset;
492 492
493 XSETBUFFER (to_buffer, to); 493 XSETBUFFER (to_buffer, to);
@@ -514,6 +514,14 @@ clone_per_buffer_values (from, to)
514 514
515 to->overlays_before = copy_overlays (to, from->overlays_before); 515 to->overlays_before = copy_overlays (to, from->overlays_before);
516 to->overlays_after = copy_overlays (to, from->overlays_after); 516 to->overlays_after = copy_overlays (to, from->overlays_after);
517
518 /* Copy the alist of local variables,
519 and all the alist elements too. */
520 to->local_var_alist
521 = Fcopy_sequence (from->local_var_alist);
522 for (tem = to->local_var_alist; CONSP (tem);
523 tem = XCDR (tem))
524 XSETCAR (tem, Fcons (XCAR (XCAR (tem)), XCDR (XCAR (tem))));
517} 525}
518 526
519 527
diff --git a/src/casefiddle.c b/src/casefiddle.c
index ae60d2c8dd5..6387c4bc845 100644
--- a/src/casefiddle.c
+++ b/src/casefiddle.c
@@ -52,6 +52,12 @@ casify_object (flag, obj)
52 | CHAR_SHIFT | CHAR_CTL | CHAR_META); 52 | CHAR_SHIFT | CHAR_CTL | CHAR_META);
53 int flags = XINT (obj) & flagbits; 53 int flags = XINT (obj) & flagbits;
54 54
55 /* If the character has higher bits set
56 above the flags, return it unchanged.
57 It is not a real character. */
58 if ((unsigned) XFASTINT (obj) > (unsigned) flagbits)
59 return obj;
60
55 c = DOWNCASE (XFASTINT (obj) & ~flagbits); 61 c = DOWNCASE (XFASTINT (obj) & ~flagbits);
56 if (inword) 62 if (inword)
57 XSETFASTINT (obj, c | flags); 63 XSETFASTINT (obj, c | flags);
diff --git a/src/emacs.c b/src/emacs.c
index f7bae2dc13d..0fbc6f86b5f 100644
--- a/src/emacs.c
+++ b/src/emacs.c
@@ -849,7 +849,7 @@ main (argc, argv
849 else 849 else
850 { 850 {
851 printf ("GNU Emacs %s\n", SDATA (tem)); 851 printf ("GNU Emacs %s\n", SDATA (tem));
852 printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); 852 printf ("Copyright (C) 2004 Free Software Foundation, Inc.\n");
853 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); 853 printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n");
854 printf ("You may redistribute copies of Emacs\n"); 854 printf ("You may redistribute copies of Emacs\n");
855 printf ("under the terms of the GNU General Public License.\n"); 855 printf ("under the terms of the GNU General Public License.\n");
diff --git a/src/fileio.c b/src/fileio.c
index 6be8cbe18f6..6a95572ca3c 100644
--- a/src/fileio.c
+++ b/src/fileio.c
@@ -6200,10 +6200,13 @@ provides a file dialog box. */)
6200 6200
6201 if (NILP (dir)) 6201 if (NILP (dir))
6202 dir = current_buffer->directory; 6202 dir = current_buffer->directory;
6203 if (NILP (Ffile_name_absolute_p (dir)))
6204 dir = Fexpand_file_name (dir, Qnil);
6203 if (NILP (default_filename)) 6205 if (NILP (default_filename))
6204 default_filename = !NILP (initial) 6206 default_filename
6205 ? Fexpand_file_name (initial, dir) 6207 = (!NILP (initial)
6206 : current_buffer->filename; 6208 ? Fexpand_file_name (initial, dir)
6209 : current_buffer->filename);
6207 6210
6208 /* If dir starts with user's homedir, change that to ~. */ 6211 /* If dir starts with user's homedir, change that to ~. */
6209 homedir = (char *) egetenv ("HOME"); 6212 homedir = (char *) egetenv ("HOME");
diff --git a/src/insdel.c b/src/insdel.c
index 5e3f69161e0..ffe7006a45b 100644
--- a/src/insdel.c
+++ b/src/insdel.c
@@ -1556,7 +1556,7 @@ replace_range (from, to, new, prepare, inherit, markers)
1556 Z_BYTE -= nbytes_del; 1556 Z_BYTE -= nbytes_del;
1557 GPT = from; 1557 GPT = from;
1558 GPT_BYTE = from_byte; 1558 GPT_BYTE = from_byte;
1559 *(GPT_ADDR) = 0; /* Put an anchor. */ 1559 if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */
1560 1560
1561 if (GPT_BYTE < GPT) 1561 if (GPT_BYTE < GPT)
1562 abort (); 1562 abort ();
@@ -1839,7 +1839,7 @@ del_range_2 (from, from_byte, to, to_byte, ret_string)
1839 Z -= nchars_del; 1839 Z -= nchars_del;
1840 GPT = from; 1840 GPT = from;
1841 GPT_BYTE = from_byte; 1841 GPT_BYTE = from_byte;
1842 *(GPT_ADDR) = 0; /* Put an anchor. */ 1842 if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */
1843 1843
1844 if (GPT_BYTE < GPT) 1844 if (GPT_BYTE < GPT)
1845 abort (); 1845 abort ();
diff --git a/src/intervals.c b/src/intervals.c
index d3f814d60ce..33ef9a34177 100644
--- a/src/intervals.c
+++ b/src/intervals.c
@@ -1899,11 +1899,13 @@ lookup_char_property (plist, prop, textprop)
1899 return fallback; 1899 return fallback;
1900 /* Check for alternative properties */ 1900 /* Check for alternative properties */
1901 tail = Fassq (prop, Vchar_property_alias_alist); 1901 tail = Fassq (prop, Vchar_property_alias_alist);
1902 if (NILP (tail)) 1902 if (! NILP (tail))
1903 return tail; 1903 {
1904 tail = XCDR (tail); 1904 tail = XCDR (tail);
1905 for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) 1905 for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail))
1906 fallback = Fplist_get (plist, XCAR (tail)); 1906 fallback = Fplist_get (plist, XCAR (tail));
1907 }
1908
1907 if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties)) 1909 if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties))
1908 fallback = Fplist_get (Vdefault_text_properties, prop); 1910 fallback = Fplist_get (Vdefault_text_properties, prop);
1909 return fallback; 1911 return fallback;
diff --git a/src/keyboard.c b/src/keyboard.c
index 75a049b5775..31137ffc679 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -113,6 +113,8 @@ struct backtrace
113 args points to slot holding list of 113 args points to slot holding list of
114 unevalled args */ 114 unevalled args */
115 char evalargs; 115 char evalargs;
116 /* Nonzero means call value of debugger when done with this operation. */
117 char debug_on_exit;
116 }; 118 };
117 119
118#ifdef MULTI_KBOARD 120#ifdef MULTI_KBOARD
@@ -9747,6 +9749,7 @@ a special event, so ignore the prefix argument and don't clear it. */)
9747 backtrace.args = &cmd; 9749 backtrace.args = &cmd;
9748 backtrace.nargs = 1; 9750 backtrace.nargs = 1;
9749 backtrace.evalargs = 0; 9751 backtrace.evalargs = 0;
9752 backtrace.debug_on_exit = 0;
9750 9753
9751 tem = Fcall_interactively (cmd, record_flag, keys); 9754 tem = Fcall_interactively (cmd, record_flag, keys);
9752 9755
diff --git a/src/keymap.c b/src/keymap.c
index a4aeea8ae63..60a6d177e35 100644
--- a/src/keymap.c
+++ b/src/keymap.c
@@ -1079,15 +1079,15 @@ event type that has no other definition in this keymap.
1079 1079
1080DEF is anything that can be a key's definition: 1080DEF is anything that can be a key's definition:
1081 nil (means key is undefined in this keymap), 1081 nil (means key is undefined in this keymap),
1082 a command (a Lisp function suitable for interactive calling) 1082 a command (a Lisp function suitable for interactive calling),
1083 a string (treated as a keyboard macro), 1083 a string (treated as a keyboard macro),
1084 a keymap (to define a prefix key), 1084 a keymap (to define a prefix key),
1085 a symbol. When the key is looked up, the symbol will stand for its 1085 a symbol (when the key is looked up, the symbol will stand for its
1086 function definition, which should at that time be one of the above, 1086 function definition, which should at that time be one of the above,
1087 or another symbol whose function definition is used, etc. 1087 or another symbol whose function definition is used, etc.),
1088 a cons (STRING . DEFN), meaning that DEFN is the definition 1088 a cons (STRING . DEFN), meaning that DEFN is the definition
1089 (DEFN should be a valid definition in its own right), 1089 (DEFN should be a valid definition in its own right),
1090 or a cons (KEYMAP . CHAR), meaning use definition of CHAR in map KEYMAP. 1090 or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP.
1091 1091
1092If KEYMAP is a sparse keymap with a binding for KEY, the existing 1092If KEYMAP is a sparse keymap with a binding for KEY, the existing
1093binding is altered. If there is no binding for KEY, the new pair 1093binding is altered. If there is no binding for KEY, the new pair
diff --git a/src/xdisp.c b/src/xdisp.c
index 0f1dbe59225..cd62ce97f18 100644
--- a/src/xdisp.c
+++ b/src/xdisp.c
@@ -10998,7 +10998,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
10998 aggressive = current_buffer->scroll_up_aggressively; 10998 aggressive = current_buffer->scroll_up_aggressively;
10999 height = WINDOW_BOX_TEXT_HEIGHT (w); 10999 height = WINDOW_BOX_TEXT_HEIGHT (w);
11000 if (NUMBERP (aggressive)) 11000 if (NUMBERP (aggressive))
11001 amount_to_scroll = XFLOATINT (aggressive) * height; 11001 {
11002 double float_amount = XFLOATINT (aggressive) * height;
11003 amount_to_scroll = float_amount;
11004 if (amount_to_scroll == 0 && float_amount > 0)
11005 amount_to_scroll = 1;
11006 }
11002 } 11007 }
11003 11008
11004 if (amount_to_scroll <= 0) 11009 if (amount_to_scroll <= 0)
@@ -11056,7 +11061,12 @@ try_scrolling (window, just_this_one_p, scroll_conservatively,
11056 aggressive = current_buffer->scroll_down_aggressively; 11061 aggressive = current_buffer->scroll_down_aggressively;
11057 height = WINDOW_BOX_TEXT_HEIGHT (w); 11062 height = WINDOW_BOX_TEXT_HEIGHT (w);
11058 if (NUMBERP (aggressive)) 11063 if (NUMBERP (aggressive))
11059 amount_to_scroll = XFLOATINT (aggressive) * height; 11064 {
11065 double float_amount = XFLOATINT (aggressive) * height;
11066 amount_to_scroll = float_amount;
11067 if (amount_to_scroll == 0 && float_amount > 0)
11068 amount_to_scroll = 1;
11069 }
11060 } 11070 }
11061 11071
11062 if (amount_to_scroll <= 0) 11072 if (amount_to_scroll <= 0)