# HG changeset patch # User Karoly Lorentey # Date 1085288893 0 # Node ID 50b9a96c837c4e08a9200ac73d47d8cf5332ff9c # Parent f982df4459a4b445d1d8f4a32a1bd34a838a4d7b# Parent e3f64aa0875d502b39ca2b43078b0bd89ed278de 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 diff -r f982df4459a4 -r 50b9a96c837c lisp/ChangeLog --- a/lisp/ChangeLog Sun May 23 04:39:43 2004 +0000 +++ b/lisp/ChangeLog Sun May 23 05:08:13 2004 +0000 @@ -1,3 +1,87 @@ +2004-05-22 Richard M. Stallman + + * textmodes/paragraphs.el (sentence-end): Match unicode curly quotes + as a close quote. + + * textmodes/bibtex.el: Use assoc-string, not assoc-ignore-case. + + * progmodes/idlw-shell.el (idlwave-shell-get-object-class): + Use assoc-string, not assoc-ignore-case. + + * progmodes/ada-mode.el: Use assoc-string, not assoc-ignore-case. + + * emacs-lisp/lisp.el (mark-defun, narrow-to-defun): + If moving back then fwd gets a defun that ends before point, + try again moving fwd then back. + + * files.el (file-name-non-special): Allow t in file-arg-indices + to mean requote the return value. Use `identity' as an element + rather than as the whole value. + + * gs.el (gs-options): Add -dSAFER. Mark it risky. + +2004-05-22 Juanma Barranquero + + * help-fns.el (help-add-fundoc-usage): Use %S only for output of + `help-make-usage'. + (help-highlight-arguments): Skip function name before searching + for arguments. + +2004-05-21 Juanma Barranquero + + * allout.el (allout-chart-subtree, allout-rebullet-topic-grunt): + Don't mention in the docstring these arguments meant for + internal (recursive) use only. + (allout-char-spec): Comment out (it's not implemented). + (allout-old-expose-topic, allout-exposure): Fix docstring and add + obsolescence declaration. + (allout-flatten-exposed-to-buffer) + (allout-indented-exposed-to-buffer): Fix typos in docstring. + (my-mark-marker): Doc fix. + (produce-allout-mode-map, allout-sibling-index) + (allout-isearch-expose, allout-distinctive-bullet) + (allout-open-topic, allout-reindent-body) + (allout-rebullet-heading, allout-process-exposed) + (allout-insert-listified, allout-latex-verb-quote) + (allout-insert-latex-header, allout-insert-latex-trailer): + Make arguments match their use in docstring. + (allout-primary-bullet, allout-old-style-prefixes) + (allout-inhibit-protection, allout-init, allout-mode) + (allout-before-change-protect, allout-flag-region): + Use "Emacs" instead of "emacs" in docstrings. + +2004-05-21 Masayuki Ataka (tiny change) + + * international/characters.el: Modify syntax of more characters. + +2004-05-21 Masatake YAMATO + + * progmodes/etags.el (tags-apropos, list-tags): Require + apropos. + (etags-tags-completion-table): Show parsing progress. + +2004-05-20 Luc Teirlinck + + * locate.el (locate-prompt-for-command): Shorten first line of + docstring. + (locate-mode): Expand docstring and include keymap summary. + + * files.el (find-file-noselect-1): Limit the scope of the + `inhibit-read-only' binding. Make sure that `inhibit-read-only' + is, by default, nil during the execution of + `find-file-not-found-functions' and `find-file-hook'. + +2004-05-20 Michael Mauger + + * facemenu.el (facemenu-color-name-equal): New function. + (list-colors-display): Use it to compare colors instead of + facemenu-color-equal. + +2004-05-20 Dan Nicolaescu + + * compare-w.el (compare-windows-face): Use min-colors instead of + checking for tty or pc types. + 2004-05-19 Stefan Monnier * simple.el (do-auto-fill): Remove unused vars `bol' and `opoint'. @@ -23,7 +107,7 @@ 2004-05-19 Masatake YAMATO * wid-edit.el (widget-radio-button-notify): Revert my last - change. Reported by Katsumi Yamaoka . + change. Reported by Katsumi Yamaoka . 2004-05-19 Kenichi Handa @@ -598,7 +682,7 @@ list of arguments in a string. (help-highlight-arguments): Highlight the function arguments and all uses of them in the docstring. - (describe-function-1): Use it. Do docstring output via `insert', + (describe-function-1): Use it. Do docstring output via `insert', not 'princ', so text attributes are preserved. * winner.el (winner-mode-map): Move `winner-undo' and @@ -623,7 +707,7 @@ (bibtex-parse-entry): Fix docstring. (bibtex-print-help-message): Use bibtex-field-list. (bibtex-make-field): Use bibtex-field-list. - (bibtex-entry-index): Bugfix. Return crossref key if required. + (bibtex-entry-index): Bugfix. Return crossref key if required. (bibtex-lessp): Fix docstring. 2004-05-03 Luc Teirlinck diff -r f982df4459a4 -r 50b9a96c837c lisp/allout.el --- a/lisp/allout.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/allout.el Sun May 23 05:08:13 2004 +0000 @@ -1,6 +1,6 @@ ;;; allout.el --- extensive outline mode for use alone and with other modes -;; Copyright (C) 1992, 1993, 1994, 2001, 2002 Free Software Foundation, Inc. +;; Copyright (C) 1992, 93, 94, 2001, 02, 2004 Free Software Foundation, Inc. ;; Author: Ken Manheimer ;; Maintainer: Ken Manheimer @@ -46,7 +46,7 @@ ;; ;; The outline menubar additions provide quick reference to many of ;; the features, and see the docstring of the function `allout-init' -;; for instructions on priming your emacs session for automatic +;; for instructions on priming your Emacs session for automatic ;; activation of `allout-mode'. ;; ;; See the docstring of the variables `allout-layout' and @@ -162,7 +162,7 @@ var and the respective allout-*-bullets-string vars. The value of an asterisk (`*') provides for backwards compatibility -with the original emacs outline mode. See `allout-plain-bullets-string' +with the original Emacs outline mode. See `allout-plain-bullets-string' and `allout-distinctive-bullets-string' for the range of available bullets." :type 'string @@ -263,7 +263,7 @@ Non-nil restricts the topic creation and modification functions to asterix-padded prefixes, so they look exactly -like the original emacs-outline style prefixes. +like the original Emacs-outline style prefixes. Whatever the setting of this variable, both old and new style prefixes are always respected by the topic maneuvering functions." @@ -491,7 +491,7 @@ (defcustom allout-inhibit-protection nil "*Non-nil disables warnings and confirmation-checks for concealed-text edits. -Outline mode uses emacs change-triggered functions to detect unruly +Outline mode uses Emacs change-triggered functions to detect unruly changes to concealed regions. Set this var non-nil to disable the protection, potentially increasing text-entry responsiveness a bit. @@ -708,7 +708,7 @@ (defvar allout-mode-map nil "Keybindings for (allout) outline minor mode.") ;;;_ > produce-allout-mode-map (keymap-alist &optional base-map) (defun produce-allout-mode-map (keymap-list &optional base-map) - "Produce keymap for use as allout-mode-map, from keymap-list. + "Produce keymap for use as allout-mode-map, from KEYMAP-LIST. Built on top of optional BASE-MAP, or empty sparse map if none specified. See doc string for allout-keybindings-list for format of binding list." @@ -939,7 +939,7 @@ - anything else \(eg, t) for auto-activation and auto-layout, without any confirmation check. -Use this function to setup your emacs session for automatic activation +Use this function to setup your Emacs session for automatic activation of allout outline mode, contingent to the buffer-specific setting of the `allout-layout' variable. (See `allout-layout' and `allout-expose-topic' docstrings for more details on auto layout). @@ -948,8 +948,8 @@ `allout-find-file-hook' in `find-file-hook', and giving `allout-auto-activation' a suitable setting. -To prime your emacs session for full auto-outline operation, include -the following two lines in your emacs init file: +To prime your Emacs session for full auto-outline operation, include +the following two lines in your Emacs init file: \(require 'allout) \(allout-init t)" @@ -1044,7 +1044,7 @@ special `allout-mode' features and terminology. See also the outline menubar additions for quick reference to many of the features, and see the docstring of the function `allout-init' for instructions on -priming your emacs session for automatic activation of `allout-mode'. +priming your Emacs session for automatic activation of `allout-mode'. The bindings are dictated by the `allout-keybindings-list' and @@ -1102,7 +1102,7 @@ Like above 'copy-exposed', but convert topic prefixes to section.subsection... numeric format. -ESC ESC (allout-init t) Setup emacs session for outline mode +ESC ESC (allout-init t) Setup Emacs session for outline mode auto-activation. HOT-SPOT Operation @@ -1132,7 +1132,7 @@ Topic hierarchy constituents - TOPICS and SUBTOPICS: -TOPIC: A basic, coherent component of an emacs outline. It can +TOPIC: A basic, coherent component of an Emacs outline. It can contain other topics, and it can be subsumed by other topics, CURRENT topic: The visible topic most immediately containing the cursor. @@ -1303,7 +1303,7 @@ ) ; selective-display is the - ; emacs conditional exposure + ; Emacs conditional exposure ; mechanism: (allout-resumptions 'selective-display '(t)) (if allout-inhibit-protection @@ -1537,7 +1537,7 @@ (defun allout-sibling-index (&optional depth) "Item number of this prospective topic among its siblings. -If optional arg depth is greater than current depth, then we're +If optional arg DEPTH is greater than current depth, then we're opening a new level, and return 0. If less than this depth, ascend to that depth and count..." @@ -1622,8 +1622,7 @@ "Produce a location \"chart\" of subtopics of the containing topic. Optional argument LEVELS specifies the depth \(relative to start -depth) for the chart. Subsequent optional args are not for public -use. +depth) for the chart. Charts are used to capture outline structure, so that outline altering routines need assess the structure only once, and then use the chart @@ -1636,9 +1635,11 @@ The chart for a topics' offspring precedes the entry for the topic itself. -The other function parameters are for internal recursion, and should -not be specified by external callers. ORIG-DEPTH is depth of topic at -starting point, and PREV-DEPTH is depth of prior topic." +\(fn &optional levels)" + + ;; The other function parameters are for internal recursion, and should + ;; not be specified by external callers. ORIG-DEPTH is depth of topic at + ;; starting point, and PREV-DEPTH is depth of prior topic." (let ((original (not orig-depth)) ; `orig-depth' set only in recursion. chart curr-depth) @@ -1652,7 +1653,7 @@ ;; Loop over the current levels' siblings. Besides being more ;; efficient than tail-recursing over a level, it avoids exceeding - ;; the typically quite constrained emacs max-lisp-eval-depth. + ;; the typically quite constrained Emacs max-lisp-eval-depth. ;; ;; Probably would speed things up to implement loop-based stack ;; operation rather than recursing for lower levels. Bah. @@ -1741,36 +1742,36 @@ (setq chart (cdr chart)))) result)) ;;;_ X allout-chart-spec (chart spec &optional exposing) -(defun allout-chart-spec (chart spec &optional exposing) - "Not yet \(if ever) implemented. - -Produce exposure directives given topic/subtree CHART and an exposure SPEC. - -Exposure spec indicates the locations to be exposed and the prescribed -exposure status. Optional arg EXPOSING is an integer, with 0 -indicating pending concealment, anything higher indicating depth to -which subtopic headers should be exposed, and negative numbers -indicating (negative of) the depth to which subtopic headers and -bodies should be exposed. - -The produced list can have two types of entries. Bare numbers -indicate points in the buffer where topic headers that should be -exposed reside. - - - bare negative numbers indicates that the topic starting at the - point which is the negative of the number should be opened, - including their entries. - - bare positive values indicate that this topic header should be - opened. - - Lists signify the beginning and end points of regions that should - be flagged, and the flag to employ. (For concealment: `\(\?r\)', and - exposure:" - (while spec - (cond ((listp spec) - ) - ) - (setq spec (cdr spec))) - ) +;; (defun allout-chart-spec (chart spec &optional exposing) +;; "Not yet \(if ever) implemented. + +;; Produce exposure directives given topic/subtree CHART and an exposure SPEC. + +;; Exposure spec indicates the locations to be exposed and the prescribed +;; exposure status. Optional arg EXPOSING is an integer, with 0 +;; indicating pending concealment, anything higher indicating depth to +;; which subtopic headers should be exposed, and negative numbers +;; indicating (negative of) the depth to which subtopic headers and +;; bodies should be exposed. + +;; The produced list can have two types of entries. Bare numbers +;; indicate points in the buffer where topic headers that should be +;; exposed reside. + +;; - bare negative numbers indicates that the topic starting at the +;; point which is the negative of the number should be opened, +;; including their entries. +;; - bare positive values indicate that this topic header should be +;; opened. +;; - Lists signify the beginning and end points of regions that should +;; be flagged, and the flag to employ. (For concealment: `\(\?r\)', and +;; exposure:" +;; (while spec +;; (cond ((listp spec) +;; ) +;; ) +;; (setq spec (cdr spec))) +;; ) ;;;_ - Within Topic ;;;_ > allout-goto-prefix () @@ -2138,7 +2139,7 @@ writes, like crypt and zip modes.) Locally bound in outline buffers to `before-change-functions', which -in emacs 19 is run before any change to the buffer. +in Emacs 19 is run before any change to the buffer. Any functions which set [`this-command' to `undo', or which set] `allout-override-protect' non-nil (as does, eg, allout-flag-chars) @@ -2153,7 +2154,7 @@ ; Both beginning and end chars must ; be exposed: (save-excursion (if (memq this-command '(newline open-line)) - ;; Compensate for stupid emacs {new, + ;; Compensate for stupid Emacs {new, ;; open-}line display optimization: (setq beg (1+ beg) end (1+ end))) @@ -2165,7 +2166,7 @@ (save-match-data (if (equal this-command 'undo) ;; Allow undo without inhibition. - ;; - Undoing new and open-line hits stupid emacs redisplay + ;; - Undoing new and open-line hits stupid Emacs redisplay ;; optimization (em 19 cmds.c, ~ line 200). ;; - Presumably, undoing what was properly protected when ;; done. @@ -2331,7 +2332,7 @@ (let* ((this-key-num (cond ((numberp last-command-char) last-command-char) - ;; XXX Only xemacs has characterp. + ;; XXX Only XEmacs has characterp. ((and (fboundp 'characterp) (characterp last-command-char)) (char-to-int last-command-char)) @@ -2385,7 +2386,7 @@ ;;;_ > allout-flag-region (from to flag) (defmacro allout-flag-region (from to flag) - "Hide or show lines from FROM to TO, via emacs selective-display FLAG char. + "Hide or show lines from FROM to TO, via Emacs selective-display FLAG char. Ie, text following flag C-m \(carriage-return) is hidden until the next C-j (newline) char. @@ -2398,7 +2399,7 @@ ;;;_ > allout-isearch-expose (mode) (defun allout-isearch-expose (mode) - "Mode is either 'clear, 'start, 'continue, or 'final." + "MODE is either 'clear, 'start, 'continue, or 'final." ;; allout-isearch-prior-pos encodes exposure status of prior pos: ;; (pos was-vis header-pos end-pos) ;; pos - point of concern @@ -2507,7 +2508,7 @@ ) ;;;_ > allout-distinctive-bullet (bullet) (defun allout-distinctive-bullet (bullet) - "True if bullet is one of those on `allout-distinctive-bullets-string'." + "True if BULLET is one of those on `allout-distinctive-bullets-string'." (string-match (regexp-quote bullet) allout-distinctive-bullets-string)) ;;;_ > allout-numbered-type-prefix (&optional prefix) (defun allout-numbered-type-prefix (&optional prefix) @@ -2679,7 +2680,7 @@ ) ;;;_ > allout-open-topic (relative-depth &optional before use_sib_bullet) (defun allout-open-topic (relative-depth &optional before use_sib_bullet) - "Open a new topic at depth DEPTH. + "Open a new topic at depth RELATIVE-DEPTH. New topic is situated after current one, unless optional flag BEFORE is non-nil, or unless current line is complete empty (not even @@ -2900,7 +2901,7 @@ (do-auto-fill)))) ;;;_ > allout-reindent-body (old-depth new-depth &optional number) (defun allout-reindent-body (old-depth new-depth &optional number) - "Reindent body lines which were indented at old-depth to new-depth. + "Reindent body lines which were indented at OLD-DEPTH to NEW-DEPTH. Optional arg NUMBER indicates numbering is being added, and it must be accommodated. @@ -2974,15 +2975,13 @@ "Adjust bullet of current topic prefix. -All args are optional. - If SOLICIT is non-nil, then the choice of bullet is solicited from user. If it's a character, then that character is offered as the default, otherwise the one suited to the context \(according to distinction or depth) is offered. If non-nil, then the context-specific bullet is just used. -Second arg DEPTH forces the topic prefix to that depth, regardless +Second arg NEW-DEPTH forces the topic prefix to that depth, regardless of the topic's current depth. Third arg NUMBER-CONTROL can force the prefix to or away from @@ -3095,13 +3094,13 @@ contained subtopics. See `allout-rebullet-heading' for rebulleting behavior. -All arguments are optional. - -First arg RELATIVE-DEPTH means to shift the depth of the entire +Arg RELATIVE-DEPTH means to shift the depth of the entire topic that amount. -The rest of the args are for internal recursive use by the function -itself. The are STARTING-DEPTH, STARTING-POINT, and INDEX." +\(fn &optional RELATIVE-DEPTH)" + + ;; All args except the first one are for internal recursive use by the + ;; function itself. (let* ((relative-depth (or relative-depth 0)) (new-depth (allout-depth)) @@ -3900,11 +3899,7 @@ max-pos))) ;;;_ > allout-old-expose-topic (spec &rest followers) (defun allout-old-expose-topic (spec &rest followers) - - "Deprecated. Use `allout-expose-topic' \(with different schema -format) instead. - -Dictate wholesale exposure scheme for current topic, according to SPEC. + "Dictate wholesale exposure scheme for current topic, according to SPEC. SPEC is either a number or a list. Optional successive args dictate exposure for subsequent siblings of current topic. @@ -3931,7 +3926,7 @@ elements of the list are nested SPECs, dictating the specific exposure for the corresponding offspring of the topic. -Optional FOLLOWER arguments dictate exposure for succeeding siblings." +Optional FOLLOWERS arguments dictate exposure for succeeding siblings." (interactive "xExposure spec: ") (let ((depth (allout-current-depth)) @@ -3976,6 +3971,9 @@ (allout-old-expose-topic (car followers)) (setq followers (cdr followers))) max-pos)) +(make-obsolete 'allout-old-expose-topic + "use `allout-expose-topic' (with different schema format) instead." + "19.23") ;;;_ > allout-new-exposure '() (defmacro allout-new-exposure (&rest spec) "Literal frontend for `allout-expose-topic', doesn't evaluate arguments. @@ -4006,9 +4004,7 @@ (list 'allout-expose-topic (list 'quote spec)))) ;;;_ > allout-exposure '() (defmacro allout-exposure (&rest spec) - "Being deprecated - use more recent `allout-new-exposure' instead. - -Literal frontend for `allout-old-expose-topic', doesn't evaluate arguments + "Literal frontend for `allout-old-expose-topic', doesn't evaluate arguments and retains start position." (list 'save-excursion '(if (not (or (allout-goto-prefix) @@ -4016,6 +4012,7 @@ (error "Can't find any outline topics")) (cons 'allout-old-expose-topic (mapcar (function (lambda (x) (list 'quote x))) spec)))) +(make-obsolete 'allout-exposure 'allout-new-exposure "19.23") ;;;_ #7 Systematic outline presentation - copying, printing, flattening @@ -4223,12 +4220,10 @@ ;;;_ > allout-process-exposed (&optional func from to frombuf ;;; tobuf format) (defun allout-process-exposed (&optional func from to frombuf tobuf - format &optional start-num) + format start-num) "Map function on exposed parts of current topic; results to another buffer. -All args are options; default values itemized below. - -Apply FUNCTION to exposed portions FROM position TO position in buffer +Apply FUNC to exposed portions FROM position TO position in buffer FROMBUF to buffer TOBUF. Sixth optional arg, FORMAT, designates an alternate presentation form: @@ -4241,7 +4236,7 @@ except for distinctive bullets. Defaults: - FUNCTION: `allout-insert-listified' + FUNC: `allout-insert-listified' FROM: region start, if region active, else start of buffer TO: region end, if region active, else end of buffer FROMBUF: current buffer @@ -4286,11 +4281,13 @@ (defun allout-insert-listified (listified) "Insert contents of listified outline portion in current buffer. -Listified is a list representing each topic header and body: +LISTIFIED is a list representing each topic header and body: \`(depth prefix text)' -or \`(depth prefix text bullet-plus)' +or + + \`(depth prefix text bullet-plus)' If `bullet-plus' is specified, it is inserted just after the entire prefix." (setq listified (cdr listified)) @@ -4356,14 +4353,14 @@ (defun allout-flatten-exposed-to-buffer (&optional arg tobuf) "Present numeric outline of outline's exposed portions in another buffer. -The resulting outline is not compatable with outline mode - use +The resulting outline is not compatible with outline mode - use `allout-copy-exposed-to-buffer' if you want that. Use `allout-indented-exposed-to-buffer' for indented presentation. With repeat count, copy the exposed portions of only current topic. -Other buffer has current buffers name with \" exposed\" appended to +Other buffer has current buffer's name with \" exposed\" appended to it, unless optional second arg TOBUF is specified, in which case it is used verbatim." (interactive "P") @@ -4372,22 +4369,22 @@ (defun allout-indented-exposed-to-buffer (&optional arg tobuf) "Present indented outline of outline's exposed portions in another buffer. -The resulting outline is not compatable with outline mode - use +The resulting outline is not compatible with outline mode - use `allout-copy-exposed-to-buffer' if you want that. Use `allout-flatten-exposed-to-buffer' for numeric sectional presentation. With repeat count, copy the exposed portions of only current topic. -Other buffer has current buffers name with \" exposed\" appended to +Other buffer has current buffer's name with \" exposed\" appended to it, unless optional second arg TOBUF is specified, in which case it is used verbatim." (interactive "P") (allout-copy-exposed-to-buffer arg tobuf 'indent)) ;;;_ - LaTeX formatting -;;;_ > allout-latex-verb-quote (str &optional flow) -(defun allout-latex-verb-quote (str &optional flow) +;;;_ > allout-latex-verb-quote (string &optional flow) +(defun allout-latex-verb-quote (string &optional flow) "Return copy of STRING for literal reproduction across latex processing. Expresses the original characters \(including carriage returns) of the string across latex processing." @@ -4397,7 +4394,7 @@ (concat "\\char" (number-to-string char) "{}")) ((= char ?\n) "\\\\") (t (char-to-string char))))) - str + string "")) ;;;_ > allout-latex-verbatim-quote-curr-line () (defun allout-latex-verbatim-quote-curr-line () @@ -4418,12 +4415,12 @@ (insert "\\") (setq end (1+ end)) (goto-char (1+ (match-end 0)))))) -;;;_ > allout-insert-latex-header (buf) -(defun allout-insert-latex-header (buf) +;;;_ > allout-insert-latex-header (buffer) +(defun allout-insert-latex-header (buffer) "Insert initial latex commands at point in BUFFER." ;; Much of this is being derived from the stuff in appendix of E in ;; the TeXBook, pg 421. - (set-buffer buf) + (set-buffer buffer) (let ((doc-style (format "\n\\documentstyle{%s}\n" "report")) (page-numbering (if allout-number-pages @@ -4492,10 +4489,10 @@ hoffset vspace) ))) -;;;_ > allout-insert-latex-trailer (buf) -(defun allout-insert-latex-trailer (buf) +;;;_ > allout-insert-latex-trailer (buffer) +(defun allout-insert-latex-trailer (buffer) "Insert concluding latex commands at point in BUFFER." - (set-buffer buf) + (set-buffer buffer) (insert "\n\\end{document}\n")) ;;;_ > allout-latexify-one-item (depth prefix bullet text) (defun allout-latexify-one-item (depth prefix bullet text) @@ -4706,9 +4703,9 @@ (cons function (symbol-value hook))))))) ;;;_ : my-mark-marker to accommodate divergent emacsen: (defun my-mark-marker (&optional force buffer) - "Accommodate the different signature for mark-marker across emacsen. - -GNU XEmacs takes two optional args, while mainline GNU Emacs does not, + "Accommodate the different signature for mark-marker across Emacsen. + +XEmacs takes two optional args, while GNU Emacs does not, so pass them along when appropriate." (if (featurep 'xemacs) (mark-marker force buffer) diff -r f982df4459a4 -r 50b9a96c837c lisp/compare-w.el --- a/lisp/compare-w.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/compare-w.el Sun May 23 05:08:13 2004 +0000 @@ -1,6 +1,6 @@ ;;; compare-w.el --- compare text between windows for Emacs -;; Copyright (C) 1986, 1989, 1993, 1997, 2003 Free Software Foundation, Inc. +;; Copyright (C) 1986,1989,1993,1997,2003,2004 Free Software Foundation, Inc. ;; Maintainer: FSF ;; Keywords: convenience files @@ -117,12 +117,12 @@ :group 'compare-w) (defface compare-windows-face - '((((type tty pc) (class color)) + '((((class color) (min-colors 88) (background light)) + (:background "paleturquoise")) + (((class color) (min-colors 88) (background dark)) + (:background "paleturquoise4")) + (((class color)) (:background "turquoise3")) - (((class color) (background light)) - (:background "paleturquoise")) - (((class color) (background dark)) - (:background "paleturquoise4")) (t (:underline t))) "Face for highlighting of compare-windows difference regions." :group 'compare-w) diff -r f982df4459a4 -r 50b9a96c837c lisp/emacs-lisp/lisp.el --- a/lisp/emacs-lisp/lisp.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/emacs-lisp/lisp.el Sun May 23 05:08:13 2004 +0000 @@ -281,15 +281,31 @@ (end-of-defun) (point)))) (t - ;; Do it in this order for the sake of languages with nested - ;; functions where several can end at the same place as with - ;; the offside rule, e.g. Python. - (push-mark (point)) - (beginning-of-defun) - (push-mark (point) nil t) - (end-of-defun) - (exchange-point-and-mark) - (re-search-backward "^\n" (- (point) 1) t)))) + (let ((opoint (point)) + beg end) + (push-mark opoint) + ;; Try first in this order for the sake of languages with nested + ;; functions where several can end at the same place as with + ;; the offside rule, e.g. Python. + (beginning-of-defun) + (setq beg (point)) + (end-of-defun) + (setq end (point)) + (while (looking-at "^\n") + (forward-line 1)) + (if (> (point) opoint) + (progn + ;; We got the right defun. + (push-mark beg nil t) + (goto-char end) + (exchange-point-and-mark)) + ;; beginning-of-defun moved back one defun + ;; so we got the wrong one. + (goto-char opoint) + (end-of-defun) + (push-mark (point) nil t) + (beginning-of-defun)) + (re-search-backward "^\n" (- (point) 1) t))))) (defun narrow-to-defun (&optional arg) "Make text outside current defun invisible. @@ -298,13 +314,28 @@ (interactive) (save-excursion (widen) - ;; Do it in this order for the sake of languages with nested - ;; functions where several can end at the same place as with the - ;; offside rule, e.g. Python. - (beginning-of-defun) - (let ((beg (point))) + (let ((opoint (point)) + beg end) + ;; Try first in this order for the sake of languages with nested + ;; functions where several can end at the same place as with + ;; the offside rule, e.g. Python. + (beginning-of-defun) + (setq beg (point)) (end-of-defun) - (narrow-to-region beg (point))))) + (setq end (point)) + (while (looking-at "^\n") + (forward-line 1)) + (unless (> (point) opoint) + ;; beginning-of-defun moved back one defun + ;; so we got the wrong one. + (goto-char opoint) + (end-of-defun) + (setq end (point)) + (beginning-of-defun) + (setq beg (point))) + (goto-char end) + (re-search-backward "^\n" (- (point) 1) t) + (narrow-to-region beg end)))) (defun insert-pair (arg &optional open close) "Enclose following ARG sexps in a pair of OPEN and CLOSE characters. diff -r f982df4459a4 -r 50b9a96c837c lisp/facemenu.el --- a/lisp/facemenu.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/facemenu.el Sun May 23 05:08:13 2004 +0000 @@ -480,9 +480,19 @@ (when (and (null list) (> (display-color-cells) 0)) (setq list (defined-colors)) ;; Delete duplicate colors. + + ;; Identify duplicate colors by the name rather than the color + ;; value. For example, on MS-Windows, logical colors are added to + ;; the list that might have the same value but have different + ;; names and meanings. For example, `SystemMenuText' (the color + ;; w32 uses for the text in menu entries) and `SystemWindowText' + ;; (the default color w32 uses for the text in windows and + ;; dialogs) may be the same display color and be adjacent in the + ;; list. Detecting duplicates by name insures that both of these + ;; colors remain despite identical color values. (let ((l list)) (while (cdr l) - (if (facemenu-color-equal (car l) (car (cdr l))) + (if (facemenu-color-name-equal (car l) (car (cdr l))) (setcdr l (cdr (cdr l))) (setq l (cdr l))))) (when (memq (display-visual-class) '(gray-scale pseudo-color direct-color)) @@ -515,6 +525,22 @@ (cond ((equal a b) t) ((equal (color-values a) (color-values b))))) +(defun facemenu-color-name-equal (a b) + "Return t if colors A and B are the same color. +A and B should be strings naming colors. These names are +downcased, stripped of spaces and the string `grey' is turned +into `gray'. This accommodates alternative spellings of colors +found commonly in the list. It returns nil if the colors differ." + (progn + (setq a (replace-regexp-in-string "grey" "gray" + (replace-regexp-in-string " " "" + (downcase a))) + b (replace-regexp-in-string "grey" "gray" + (replace-regexp-in-string " " "" + (downcase b)))) + + (equal a b))) + (defun facemenu-add-face (face &optional start end) "Add FACE to text between START and END. If START is nil or START to END is empty, add FACE to next typed character diff -r f982df4459a4 -r 50b9a96c837c lisp/files.el --- a/lisp/files.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/files.el Sun May 23 05:08:13 2004 +0000 @@ -1357,41 +1357,42 @@ rawfile truename number)))))) (defun find-file-noselect-1 (buf filename nowarn rawfile truename number) - (let ((inhibit-read-only t) - error) + (let (error) (with-current-buffer buf (kill-local-variable 'find-file-literally) ;; Needed in case we are re-visiting the file with a different ;; text representation. (kill-local-variable 'buffer-file-coding-system) (kill-local-variable 'cursor-type) - (erase-buffer) - (and (default-value 'enable-multibyte-characters) - (not rawfile) - (set-buffer-multibyte t)) - (if rawfile - (condition-case () - (insert-file-contents-literally filename t) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (kill-buffer buf) - (signal 'file-error (list "File is not readable" - filename))) - ;; Unconditionally set error - (setq error t))) - (condition-case () - (insert-file-contents filename t) - (file-error - (when (and (file-exists-p filename) - (not (file-readable-p filename))) - (kill-buffer buf) - (signal 'file-error (list "File is not readable" - filename))) - ;; Run find-file-not-found-hooks until one returns non-nil. - (or (run-hook-with-args-until-success 'find-file-not-found-functions) - ;; If they fail too, set error. + (let ((inhibit-read-only t)) + (erase-buffer) + (and (default-value 'enable-multibyte-characters) + (not rawfile) + (set-buffer-multibyte t)) + (if rawfile + (condition-case () + (insert-file-contents-literally filename t) + (file-error + (when (and (file-exists-p filename) + (not (file-readable-p filename))) + (kill-buffer buf) + (signal 'file-error (list "File is not readable" + filename))) + ;; Unconditionally set error (setq error t))))) + (condition-case () + (let ((inhibit-read-only t)) + (insert-file-contents filename t)) + (file-error + (when (and (file-exists-p filename) + (not (file-readable-p filename))) + (kill-buffer buf) + (signal 'file-error (list "File is not readable" + filename))) + ;; Run find-file-not-found-hooks until one returns non-nil. + (or (run-hook-with-args-until-success 'find-file-not-found-functions) + ;; If they fail too, set error. + (setq error t)))) ;; Record the file's truename, and maybe use that as visited name. (if (equal filename buffer-file-name) (setq buffer-file-truename truename) @@ -4486,10 +4487,12 @@ (directory-file-name . nil) (file-name-sans-versions . nil) ;; `identity' means just return the first arg - ;; as stripped of its quoting. - (substitute-in-file-name . identity) + ;; not stripped of its quoting. + (substitute-in-file-name identity) (file-name-completion 1) (file-name-all-completions 1) + ;; t means add "/:" to the result. + (file-truename t 0) (rename-file 0 1) (copy-file 0 1) (make-symbolic-link 0 1) @@ -4497,9 +4500,12 @@ ;; For all other operations, treat the first argument only ;; as the file name. '(nil 0)))) + method ;; Copy ARGUMENTS so we can replace elements in it. (arguments (copy-sequence arguments))) - ;; Strip off the /: from the file names that have this handler. + (if (symbolp (car file-arg-indices)) + (setq method (pop file-arg-indices))) + ;; Strip off the /: from the file names that have it. (save-match-data (while (consp file-arg-indices) (let ((pair (nthcdr (car file-arg-indices) arguments))) @@ -4510,9 +4516,12 @@ "/" (substring (car pair) 2))))) (setq file-arg-indices (cdr file-arg-indices)))) - (if (eq file-arg-indices 'identity) - (car arguments) - (apply operation arguments)))) + (cond ((eq method 'identity) + (car arguments)) + (method + (concat "/:" (apply operation arguments))) + (t + (apply operation arguments))))) (define-key ctl-x-map "\C-f" 'find-file) (define-key ctl-x-map "\C-r" 'find-file-read-only) diff -r f982df4459a4 -r 50b9a96c837c lisp/gnus/ChangeLog --- a/lisp/gnus/ChangeLog Sun May 23 04:39:43 2004 +0000 +++ b/lisp/gnus/ChangeLog Sun May 23 05:08:13 2004 +0000 @@ -14,6 +14,10 @@ * nnimap.el (nnimap-demule): Avoid string-as-multibyte. +2004-04-21 Richard M. Stallman + + * mailcap.el (mailcap-mime-data): Mark as risky. + 2004-03-27 Juanma Barranquero * gnus-srvr.el (gnus-server-prepare): Remove spurious call to `cdr'. diff -r f982df4459a4 -r 50b9a96c837c lisp/gs.el --- a/lisp/gs.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/gs.el Sun May 23 05:08:13 2004 +0000 @@ -39,12 +39,14 @@ (defvar gs-options '("-q" ;"-dNOPAUSE" + "-dSAFER" "-dBATCH" "-sDEVICE=" "") "List of command line arguments to pass to Ghostscript. Arguments may contain place-holders `' for the name of the input file, and `' for the device to use.") +(put 'gs-options 'risky-local-variable t) (defun gs-options (device file) "Return a list of command line options with place-holders replaced. @@ -55,7 +57,6 @@ option (replace-regexp-in-string "" file option))) gs-options)) - ;; The GHOSTVIEW property (taken from gv 3.5.8). ;; ;; Type: diff -r f982df4459a4 -r 50b9a96c837c lisp/help-fns.el --- a/lisp/help-fns.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/help-fns.el Sun May 23 05:08:13 2004 +0000 @@ -181,14 +181,14 @@ (unless (stringp docstring) (setq docstring "Not documented")) (if (or (string-match "\n\n(fn\\(\\( .*\\)?)\\)\\'" docstring) (eq arglist t)) docstring - (format "%s%s%S" docstring + (concat docstring (if (string-match "\n?\n\\'" docstring) (if (< (- (match-end 0) (match-beginning 0)) 2) "\n" "") "\n\n") (if (and (stringp arglist) (string-match "\\`([^ ]+\\(.*\\))\\'" arglist)) (concat "(fn" (match-string 1 arglist) ")") - (help-make-usage 'fn arglist))))) + (format "%S" (help-make-usage 'fn arglist)))))) (defun help-function-arglist (def) ;; Handle symbols aliased to other symbols. @@ -275,6 +275,7 @@ (next (not (or args (looking-at "\\[")))) (opt nil)) ;; Make a list of all arguments + (skip-chars-forward "^ ") (while next (or opt (not (looking-at " &")) (setq opt t)) (if (not (re-search-forward " \\([\\[(]*\\)\\([^] &)\.]+\\)" nil t)) diff -r f982df4459a4 -r 50b9a96c837c lisp/international/characters.el --- a/lisp/international/characters.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/international/characters.el Sun May 23 05:08:13 2004 +0000 @@ -657,7 +657,7 @@ (modify-category-entry (make-char 'korean-ksc5601 43) ?K) (modify-category-entry (make-char 'korean-ksc5601 44) ?Y) -(let ((parens "$(C!2!3!4!5!6!7!8!9!:!;! return `aborted' (throw 'userkey 'aborted)) (setq key (bibtex-reference-key-in-string bounds)) - (if (not (assoc-ignore-case key strings)) + (if (not (assoc-string key strings t)) (push (cons key (bibtex-text-in-string bounds t)) strings)) (goto-char (bibtex-end-of-text-in-string bounds))) @@ -2654,7 +2657,7 @@ More specifically, the return value is a cons pair (REQUIRED . OPTIONAL), where REQUIRED and OPTIONAL are lists of the required and optional field names for ENTRY-TYPE according to `bibtex-entry-field-alist'." - (let ((e (assoc-ignore-case entry-type bibtex-entry-field-alist)) + (let ((e (assoc-string entry-type bibtex-entry-field-alist t)) required optional) (unless e (error "Bibtex entry type %s not defined" entry-type)) @@ -2721,10 +2724,10 @@ (substring (cdr (assoc "=type=" fields-alist)) 1)))) ; don't want @ (dolist (field (car field-list)) - (unless (assoc-ignore-case (car field) fields-alist) + (unless (assoc-string (car field) fields-alist t) (bibtex-make-field field))) (dolist (field (cdr field-list)) - (unless (assoc-ignore-case (car field) fields-alist) + (unless (assoc-string (car field) fields-alist t) (bibtex-make-optional-field field)))))) (defun bibtex-parse-entry () @@ -2792,7 +2795,7 @@ (let* ((name (buffer-substring (if (looking-at "ALT\\|OPT") (match-end 0) (point)) (bibtex-end-of-name-in-field bounds))) - (text (assoc-ignore-case name other))) + (text (assoc-string name other t))) (goto-char (bibtex-start-of-text-in-field bounds)) (if (not (and (looking-at bibtex-empty-field-re) text)) (goto-char (bibtex-end-of-field bounds)) @@ -2825,9 +2828,10 @@ (field-list (bibtex-field-list (progn (re-search-backward bibtex-entry-maybe-empty-head nil t) (bibtex-type-in-head)))) - (comment (assoc-ignore-case field-name - (append (car field-list) - (cdr field-list))))) + (comment (assoc-string field-name + (append (car field-list) + (cdr field-list)) + t))) (if comment (message (nth 1 comment)) (message "No comment available"))))) @@ -3235,8 +3239,8 @@ (let* ((entry-list (progn (goto-char beg) (bibtex-search-entry nil end) - (assoc-ignore-case (bibtex-type-in-head) - bibtex-entry-field-alist))) + (assoc-string (bibtex-type-in-head) + bibtex-entry-field-alist t))) (req (copy-sequence (elt (elt entry-list 1) 0))) (creq (copy-sequence (elt (elt entry-list 2) 0))) crossref-there bounds) @@ -3252,8 +3256,8 @@ (push (list (bibtex-current-line) "Questionable month field") error-list)) - (setq req (delete (assoc-ignore-case field-name req) req) - creq (delete (assoc-ignore-case field-name creq) creq)) + (setq req (delete (assoc-string field-name req t) req) + creq (delete (assoc-string field-name creq t) creq)) (if (equal field-name "crossref") (setq crossref-there t)))) (if crossref-there diff -r f982df4459a4 -r 50b9a96c837c lisp/textmodes/flyspell.el --- a/lisp/textmodes/flyspell.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/textmodes/flyspell.el Sun May 23 05:08:13 2004 +0000 @@ -3,6 +3,7 @@ ;; Copyright (C) 1998, 2000, 2001, 2002 Free Software Foundation, Inc. ;; Author: Manuel Serrano +;; Maintainer: FSF ;; Keywords: convenience ;; This file is part of GNU Emacs. diff -r f982df4459a4 -r 50b9a96c837c lisp/textmodes/paragraphs.el --- a/lisp/textmodes/paragraphs.el Sun May 23 04:39:43 2004 +0000 +++ b/lisp/textmodes/paragraphs.el Sun May 23 05:08:13 2004 +0000 @@ -171,7 +171,7 @@ parenthesis. See Info node `Sentences'." (or sentence-end (concat (if sentence-end-without-period "\\w \\|") - "\\([.?!][]\"')}]*" + "\\([.?!][]\"'\xd0c9)}]*" (if sentence-end-double-space "\\($\\| $\\|\t\\| \\)" "\\($\\|[\t ]\\)") "\\|[" sentence-end-without-space "]+\\)" diff -r f982df4459a4 -r 50b9a96c837c lispref/ChangeLog --- a/lispref/ChangeLog Sun May 23 04:39:43 2004 +0000 +++ b/lispref/ChangeLog Sun May 23 05:08:13 2004 +0000 @@ -1,3 +1,22 @@ +2004-05-22 Richard M. Stallman + + * syntax.texi (Syntax Class Table): Word syntax not just for English. + + * streams.texi (Output Variables): Doc float-output-format. + + * searching.texi (Regexp Special): Nested repetition can be infloop. + + * eval.texi (Eval): Increasing max-lisp-eval-depth can cause + real stack overflow. + + * compile.texi: Minor cleanups. + +2004-05-22 Luc Teirlinck + + * lists.texi (Cons Cells): Explain dotted lists, true lists, + circular lists. + (List Elements): Explain handling of circular and dotted lists. + 2004-05-19 Thien-Thi Nguyen * modes.texi (Search-based Fontification): Fix typo. diff -r f982df4459a4 -r 50b9a96c837c lispref/compile.texi --- a/lispref/compile.texi Sun May 23 04:39:43 2004 +0000 +++ b/lispref/compile.texi Sun May 23 05:08:13 2004 +0000 @@ -171,6 +171,10 @@ operand of an instruction. The vector contains all the constants, variable names and function names used by the function, except for certain primitives that are coded as special instructions. + +If the argument to @code{byte-compile} is a @code{lambda} expression, +it returns the corresponding compiled code, but does not store +it anywhere. @end defun @deffn Command compile-defun &optional arg @@ -232,7 +236,8 @@ When a @samp{.el} file has no corresponding @samp{.elc} file, @var{flag} says what to do. If it is @code{nil}, this command ignores these files. If @var{flag} is 0, it compiles them. If it is neither -@code{nil} nor 0, it asks the user whether to compile each such file. +@code{nil} nor 0, it asks the user whether to compile each such file, +and asks about each subdirectory as well. Interactively, @code{byte-recompile-directory} prompts for @var{directory} and @var{flag} is the prefix argument. @@ -293,8 +298,8 @@ @item If you alter the compiled file (such as by compiling a new version), -then further access to documentation strings in this file will give -nonsense results. +then further access to documentation strings in this file will +probably give nonsense results. @end itemize If your site installs Emacs following the usual procedures, these @@ -365,8 +370,8 @@ @item If you alter the compiled file (such as by compiling a new version), -then trying to load any function not already loaded will yield nonsense -results. +then trying to load any function not already loaded will usually yield +nonsense results. @end itemize These problems will never happen in normal circumstances with @@ -391,9 +396,10 @@ @end defvar @defun fetch-bytecode function -This immediately finishes loading the definition of @var{function} from -its byte-compiled file, if it is not fully loaded already. The argument -@var{function} may be a byte-code function object or a function name. +If @var{function} is a byte-code function object, this immediately +finishes loading the byte code of @var{function} from its +byte-compiled file, if it is not fully loaded already. Otherwise, +it does nothing. It always returns @var{function}. @end defun @node Eval During Compile @@ -440,7 +446,7 @@ you must search for the function names. You can suppress the compiler warning for calling an undefined -function @var{func} by conditionalizing the function call on a +function @var{func} by conditionalizing the function call on an @code{fboundp} test, like this: @example @@ -468,14 +474,17 @@ You can suppress any compiler warnings using the construct @code{with-no-warnings}: -@defmac with-no-warnings body... +@c This is implemented with a defun, but conceptually it is +@c a special form. + +@defspec with-no-warnings body... In execution, this is equivalent to @code{(progn @var{body}...)}, but the compiler does not issue warnings for anything that occurs inside @var{body}. We recommend that you use this construct around the smallest possible piece of code. -@end defmac +@end defspec @node Byte-Code Objects @section Byte-Code Function Objects @@ -578,7 +587,8 @@ point is left before the output. The argument @var{object} can be a function name, a lambda expression -or a byte-code object. +or a byte-code object. If it is a lambda expression, @code{disassemble} +compiles it and disassembles the resulting compiled code. @end deffn Here are two examples of using the @code{disassemble} function. We diff -r f982df4459a4 -r 50b9a96c837c lispref/eval.texi --- a/lispref/eval.texi Sun May 23 04:39:43 2004 +0000 +++ b/lispref/eval.texi Sun May 23 05:08:13 2004 +0000 @@ -678,9 +678,12 @@ @defvar max-lisp-eval-depth This variable defines the maximum depth allowed in calls to @code{eval}, @code{apply}, and @code{funcall} before an error is signaled (with error -message @code{"Lisp nesting exceeds max-lisp-eval-depth"}). This limit, -with the associated error when it is exceeded, is one way that Lisp -avoids infinite recursion on an ill-defined function. +message @code{"Lisp nesting exceeds max-lisp-eval-depth"}). + +This limit, with the associated error when it is exceeded, is one way +Emacs Lisp avoids infinite recursion on an ill-defined function. If +you increase the value of @code{max-lisp-eval-depth} too much, such +code can cause stack overflow instead. @cindex Lisp nesting error The depth limit counts internal uses of @code{eval}, @code{apply}, and diff -r f982df4459a4 -r 50b9a96c837c lispref/lists.texi --- a/lispref/lists.texi Sun May 23 04:39:43 2004 +0000 +++ b/lispref/lists.texi Sun May 23 05:08:13 2004 +0000 @@ -51,16 +51,37 @@ level of cons cells, the @sc{car} and @sc{cdr} slots have the same characteristics. +@cindex true list + Since @code{nil} is the conventional value to put in the @sc{cdr} of +the last cons cell in the list, we call that case a @dfn{true list}. + + In Lisp, we consider the symbol @code{nil} a list as well as a +symbol; it is the list with no elements. For convenience, the symbol +@code{nil} is considered to have @code{nil} as its @sc{cdr} (and also +as its @sc{car}). Therefore, the @sc{cdr} of a true list is always a +true list. + +@cindex dotted list +@cindex circular list + If the @sc{cdr} of a list's last cons cell is some other value, +neither @code{nil} nor another cons cell, we call the structure a +@dfn{dotted list}, since its printed representation would use +@samp{.}. There is one other possibility: some cons cell's @sc{cdr} +could point to one of the previous cons cells in the list. We call +that structure a @dfn{circular list}. + + For some purposes, it does not matter whether a list is true, +circular or dotted. If the program doesn't look far enough down the +list to see the @sc{cdr} of the final cons cell, it won't care. +However, some functions that operate on lists demand true lists and +signal errors if given a dotted list. Most functions that try to find +the end of a list enter infinite loops if given a circular list. + @cindex list structure Because most cons cells are used as part of lists, the phrase @dfn{list structure} has come to mean any structure made out of cons cells. - The symbol @code{nil} is considered a list as well as a symbol; it is -the list with no elements. For convenience, the symbol @code{nil} is -considered to have @code{nil} as its @sc{cdr} (and also as its -@sc{car}). - The @sc{cdr} of any nonempty list @var{l} is a list containing all the elements of @var{l} except the first. @@ -394,12 +415,13 @@ @anchor{Definition of safe-length} @defun safe-length list -This function returns the length of @var{list}, with no risk -of either an error or an infinite loop. +This function returns the length of @var{list}, with no risk of either +an error or an infinite loop. It generally returns the number of +distinct cons cells in the list. However, for circular lists, +the value is just an upper bound; it is often too large. -If @var{list} is not really a list, @code{safe-length} returns 0. If -@var{list} is circular, it returns a finite value which is at least the -number of distinct elements. +If @var{list} is not @code{nil} or a cons cell, @code{safe-length} +returns 0. @end defun The most common way to compute the length of a list, when you are not diff -r f982df4459a4 -r 50b9a96c837c lispref/searching.texi --- a/lispref/searching.texi Sun May 23 04:39:43 2004 +0000 +++ b/lispref/searching.texi Sun May 23 05:08:13 2004 +0000 @@ -244,13 +244,15 @@ The next alternative is for @samp{a*} to match only two @samp{a}s. With this choice, the rest of the regexp matches successfully.@refill -Nested repetition operators can be extremely slow if they specify -backtracking loops. For example, it could take hours for the regular -expression @samp{\(x+y*\)*a} to try to match the sequence -@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately fails. -The slowness is because Emacs must try each imaginable way of grouping -the 35 @samp{x}s before concluding that none of them can work. To make -sure your regular expressions run fast, check nested repetitions +Nested repetition operators can be extremely slow or loop infinitely +if they use repetition operators inside repetition operators. For +example, it could take hours for the regular expression +@samp{\(x+y*\)*a} to try to match the sequence +@samp{xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxz}, before it ultimately +fails. Emacs must try each way of grouping the 35 @samp{x}s before +concluding that none of them can work. Even worse, @samp{\(x*\)*} can +match the null string in infinitely many ways, so it causes an +infinite loop. To avoid these problems, check nested repetitions carefully. @item @samp{+} diff -r f982df4459a4 -r 50b9a96c837c lispref/streams.texi --- a/lispref/streams.texi Sun May 23 04:39:43 2004 +0000 +++ b/lispref/streams.texi Sun May 23 05:08:13 2004 +0000 @@ -821,6 +821,17 @@ to bind it to @code{nil} when you bind @code{print-continuous-numbering}. @end defvar +@defvar float-output-format +This variable specifies how to print floating point numbers. Its +default value is @code{nil}, meaning use the shortest output +that represents the number without losing information. + +To control output format more precisely, you can put a string in this +variable. The string should hold a @samp{%}-specification to be used +in the C function @code{sprintf}. For further restrictions on what +you can use, see the variable's documentation string. +@end defvar + @ignore arch-tag: 07636b8c-c4e3-4735-9e06-2e864320b434 @end ignore diff -r f982df4459a4 -r 50b9a96c837c lispref/syntax.texi --- a/lispref/syntax.texi Sun May 23 04:39:43 2004 +0000 +++ b/lispref/syntax.texi Sun May 23 05:08:13 2004 +0000 @@ -135,10 +135,10 @@ @end deffn @deffn {Syntax class} @w{word constituent} -@dfn{Word constituents} (designated by @samp{w}) are parts of normal -English words and are typically used in variable and command names in -programs. All upper- and lower-case letters, and the digits, are typically -word constituents. +@dfn{Word constituents} (designated by @samp{w}) are parts of words in +human languages, and are typically used in variable and command names +in programs. All upper- and lower-case letters, and the digits, are +typically word constituents. @end deffn @deffn {Syntax class} @w{symbol constituent} diff -r f982df4459a4 -r 50b9a96c837c src/ChangeLog --- a/src/ChangeLog Sun May 23 04:39:43 2004 +0000 +++ b/src/ChangeLog Sun May 23 05:08:13 2004 +0000 @@ -1,7 +1,51 @@ +2004-05-22 Richard M. Stallman + + * alloc.c (Fmake_string): Doc fix. + + * buffer.c (clone_per_buffer_values): Copy the alist of local vars, + and the alist pairs too. + + * casefiddle.c (casify_object): Return OBJ unchanged if not real char. + + * emacs.c (main): Update copyright year. + + * fileio.c (Fread_file_name): Expand DIR if not absolute. + + * insdel.c (del_range_2, replace_range): Don't write an anchor + if the gap is empty. + + * xdisp.c (try_scrolling): If scroll-up-aggressively or + scroll-down-aggressively is small but positive, put point + near the screen edge. + +2004-05-22 Juanma Barranquero + + * keymap.c (Fdefine_key): Doc fix. + +2004-05-22 Kim F. Storm + + * alloc.c (struct backtrace): Add debug_on_exit member. + (Fgarbage_collect): Clear out buffer undo_list markers after gc_sweep. + Identify those markers as Lisp_Misc_Free objects. Clear car and cdr of + the removed cons cells. + (mark_object): Undo previous change - disallow Lisp_Misc_Free objects. + (gc_sweep): Clear cons_blocks before sweeping strings, so we don't have + any cons cells pointing to unallocated stings. + Do not lisp_free any marker blocks, as there may still be pointers + to them from buffer undo lists at this stage of GC. + + * keyboard.c (struct backtrace): Add debug_on_exit member. + (Fcommand_execute): Clear it. + +2004-05-20 Luc Teirlinck + + * intervals.c (lookup_char_property): Do not prematurely return nil. + 2004-05-19 Jim Blandy Add support for new '\_<' and '\_>' regexp operators, matching the - beginning and ends of symbols. + beginning and end of symbols. + * regex.c (enum syntaxcode): Add Ssymbol. (init_syntax_once): Set the syntax for '_' to Ssymbol, not Sword. (re_opcode_t): New opcodes `symbeg' and `symend'. @@ -1219,7 +1263,7 @@ * macterm.c (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit arg. - Rework to use just one, local, inev input_event. Store inev + Rework to use just one, local, inev input_event. Store inev directly in fifo using kbd_buffer_store_event_hold. * sysdep.c (BUFFER_SIZE_FACTOR): Remove. @@ -1235,14 +1279,14 @@ * w32inevt.c (w32_console_read_socket): Remove bufp_r and numcharsp args. Add hold_quit arg. - Rework to use just one, local, inev input_event. Store inev + Rework to use just one, local, inev input_event. Store inev directly in fifo using kbd_buffer_store_event_hold. * w32inevt.h (w32_console_mouse_position): Fix prototype. * w32term.c (w32_read_socket): Remove bufp_r and numcharsp args. - Add hold_quit arg. Rework to use just one, local, inev - input_event. Store inev directly in fifo using + Add hold_quit arg. Rework to use just one, local, inev + input_event. Store inev directly in fifo using kbd_buffer_store_event_hold. Update count in one place. Postpone call to gen_help_event until inev is stored; use new local do_help for this. @@ -1261,8 +1305,8 @@ (current_hold_quit) [USE_GTK]: Add. (event_handler_gdk): Adapt to new handle_one_xevent. (handle_one_xevent): Remove bufp_r and numcharsp args. - Add hold_quit arg. Rework to use just one, local, inev - input_event. Store inev directly in fifo using + Add hold_quit arg. Rework to use just one, local, inev + input_event. Store inev directly in fifo using kbd_buffer_store_event_hold. Update count in one place. Postpone call to gen_help_event until inev is stored; use new local do_help for this. @@ -1274,7 +1318,7 @@ `goto done' to clarify code flow in deeply nested blocks. (x_dispatch_event): Simplify as handle_one_xevent now calls kbd_buffer_store_event itself. - (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit + (XTread_socket): Remove bufp_r and numcharsp args. Add hold_quit arg. Call handle_one_xevent with new arglist. Store event from x_session_check_input in fifo. [USE_GTK]: Setup current_hold_quit. @@ -2203,7 +2247,7 @@ (marginal_area_string): Fix prototypes. * keyboard.h (POSN_POSN, POSN_SET_POSN): Rename macros from - POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed. + POSN_BUFFER_POSN and POSN_SET_BUFFER_POSN. All uses changed. (POSN_INBUFFER_P, POSN_BUFFER_POSN): New macros. * keyboard.c (make_lispy_position): Use modified mode_line_string, @@ -2370,7 +2414,7 @@ control frame pointer shape. Detect image hot-spots for pointer and help_echo properties. Use define_frame_cursor1. (note_mouse_highlight): Use Vvoid_text_area_pointer. - (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables. + (syms_of_xdisp): Defsubr new defun. Intern and staticpro new variables. DEFVAR_LISP Vvoid_text_area_pointer instead of Vshow_text_cursor_in_void. * xfaces.c (cache_face): Abort if c->size exceeds MAX_FACE_ID. @@ -2491,7 +2535,7 @@ (glyph_to_pixel_coords): Don't use negative hpos. (x_y_to_hpos_vpos): Fix for partially visible first glyph. (append_stretch_glyph): Change ascent arg to be actual value - in pixels rather than ratio to height. Callers changed. + in pixels rather than ratio to height. Callers changed. (calc_pixel_width_or_height): New aux function, implementing pixel based artihmetic for glyph widths and heights. (produce_stretch_glyph): Use calc_pixel_width_or_height for @@ -2693,7 +2737,7 @@ x_display_info_for_display instead. Use Display in xev instead of GDK_DISPLAY. (x_dispatch_event): Call x_display_info_for_display. - (XTread_socket): Move GTK part out of loop. current_dpyinfo removed. + (XTread_socket): Move GTK part out of loop. current_dpyinfo removed. (x_connection_closed): Call xg_display_close for GTK. (x_term_init): Call xg_display_open for additional displays. Initiate dpyinfo->xg_cursor with call to xg_create_default_cursor @@ -4195,7 +4239,7 @@ from x/w32/macterm.h files. All uses changed. Also change code which referred to f->output_data...->pixel_height. (FRAME_PIXEL_WIDTH): Renamed from PIXEL_WIDTH and moved - from x/w32/macterm.h files. All uses changed. Also change code + from x/w32/macterm.h files. All uses changed. Also change code which referred to f->output_data...->pixel_width. (FRAME_LINES): Renamed from FRAME_HEIGHT. All uses changed. Also change code which referred to f->height. @@ -4505,7 +4549,7 @@ * xdisp.c: Make (many) trivial substitutions for renamed and new macros in dispextern.h, frame.h and window.h. (window_box_width): Adapt to per-window fringes and scroll bars, - and new fringe vs. display margin position. Note that returned + and new fringe vs. display margin position. Note that returned value is no longer guaranteed to be a whole multiple of the frame column width, since per-window fringes may now be any width. (window_box_left_offset): New function like window_box_left, but @@ -5255,7 +5299,7 @@ * xfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame parameters now defined in frame.h and frame.c. - (Vx_resource_name): Remove. Use generic var. + (Vx_resource_name): Remove. Use generic var. (enum x_frame_parms): Remove (bogus, unused enum). (check_x_display_info): Make non-static (for frame.c). (struct x_frame_parm_table, x_frame_parms): Remove. @@ -5275,7 +5319,7 @@ (syms_of_xfns): Don't intern/staticpro removed vars. * xterm.c: Remove unnecessary extern declarations. - (x_fullscreen_adjust): Remove. Use generic instead. + (x_fullscreen_adjust): Remove. Use generic instead. (x_redisplay_interface): Add x_frame_parm_handlers member. * w32gui.h (XrmDatabase): New (dummy) typedef. @@ -5287,7 +5331,7 @@ * w32fns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame parameters now defined in frame.h and frame.c. - (Vx_resource_name): Remove. Use generic var. + (Vx_resource_name): Remove. Use generic var. (enum x_frame_parms): Remove (bogus, unused enum). (check_x_display_info): Make non-static (for frame.c). (struct x_frame_parm_table, x_frame_parms): Remove. @@ -5320,7 +5364,7 @@ * macfns.c (Qauto_raise, Qauto_lower, ...): Remove vars for frame parameters now defined in frame.h and frame.c. - (Vx_resource_name): Remove. Use generic var. + (Vx_resource_name): Remove. Use generic var. (check_x_display_info): Make non-static (for frame.c). (struct x_frame_parm_table, x_frame_parms): Remove. (init_x_parm_symbols, x_set_frame_parameters, x_report_frame_params) @@ -6301,7 +6345,7 @@ [HAVE_XPM]: Avoid clashes with XColor, XImage and Pixel definitions in xpm.h. (init_xpm_functions): New function. - (xpm_load): Sync with xfns.c. Adapt for Windows version of libXpm. + (xpm_load): Sync with xfns.c. Adapt for Windows version of libXpm. (init_external_image_libraries): Try to load libXpm.dll. * fileio.c (Fcopy_file) [WINDOWSNT]: Reverse logic for setting @@ -6330,8 +6374,8 @@ * w32fns.c (DrawText): Kludge to avoid a redefinition on Windows when including gif_lib.h. (init_gif_functions, init_tiff_functions): New functions. - (gif_load, tiff_load): Sync with xfns.c version. Adjust colors for - Windows. Disable color table lookups. Call library functions + (gif_load, tiff_load): Sync with xfns.c version. Adjust colors for + Windows. Disable color table lookups. Call library functions through pointers determined at runtime. (init_external_image_libraries): Try to load libungif.dll and libtiff.dll. @@ -6397,8 +6441,8 @@ * w32fns.c (init_jpeg_functions, jpeg_resync_to_restart_wrapper): New functions. - (jpeg_load): Sync with xfns.c version. Adjust colors for Windows. - Disable color table lookups. Call jpeg library functions + (jpeg_load): Sync with xfns.c version. Adjust colors for Windows. + Disable color table lookups. Call jpeg library functions through pointers determined at runtime. (init_external_image_libraries): Try to load jpeg.dll. @@ -6435,8 +6479,8 @@ * w32fns.c (XPutPixel): Handle monochrome images; used for masks. [HAVE_PNG]: Sync with xfns.c version. - (png_load): Adjust colors for Windows. Use Windows - bitmaps. Disable color table lookups. + (png_load): Adjust colors for Windows. Use Windows + bitmaps. Disable color table lookups. (DEF_IMGLIB_FN, LOAD_IMGLIB_FN): New macros. (init_png_functions): New function. (png_read_from_memory, png_load): Call png library functions @@ -6533,7 +6577,7 @@ 2003-01-21 David Ponce * w32term.c (w32_encode_char): For DIM=1 charset, set - ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c + ccl->reg[2] to -1 before calling ccl_driver. (Sync. with xterm.c x_encode_char change by Kenichi Handa on 2002-09-30.) (w32_draw_relief_rect): Declare all args. @@ -7066,7 +7110,7 @@ only if g_b_init_get_sid_identifier_authority is equal to 0. On initialization set g_b_init_get_sid_identifier_authority equal to 1. - * w32fns.c (globals_of_w32fns): New function. Used to initialize + * w32fns.c (globals_of_w32fns): New function. Used to initialize those global variables that must always be initialized on startup even when the global variable initialized is non zero. Its primary purpose at this time is to initialize the global variable @@ -7077,7 +7121,7 @@ * w32fns.c (syms_of_w32fns): Call globals_of_w32fns. - * w32menu.c (globals_of_w32menu): New function. Used to + * w32menu.c (globals_of_w32menu): New function. Used to initialize those global variables that must always be initialized on startup even when the global variable initialized is non zero. Its primary purpose at this time is to initialize the global @@ -9299,7 +9343,7 @@ 2002-06-21 Pavel Jan,Am(Bk * m/pmax.h (START_FILES): Define START_FILES for NetBSD and - OpenBSD. Add support for mipseb-*-netbsd* machines. + OpenBSD. Add support for mipseb-*-netbsd* machines. 2002-06-17 Andrew Choi @@ -10701,7 +10745,7 @@ (server_accept_connection): New function. (wait_reading_process_input): Use it to handle incoming connects. Do not enable input on a new connection if process is stopped. - (read_process_output): Handle datagram sockets. Use 2k buffer for them. + (read_process_output): Handle datagram sockets. Use 2k buffer for them. (send_process): Handle datagram sockets. (Fstop_process, Fcontinue_process): Apply to network processes. A stopped network process is indicated by setting command field to t . @@ -12287,7 +12331,7 @@ 2001-12-01 Jason Rumney - * window.c (Qleft_fringe, Qright_fringe): Remove. Now in frame.c. + * window.c (Qleft_fringe, Qright_fringe): Remove. Now in frame.c. * w32term.h (WM_MOUSELEAVE, TME_LEAVE, TRACKMOUSEEVENT) [!WM_MOUSELEAVE]: Define. @@ -12339,7 +12383,7 @@ * xterm.c (zv_height, zv_bits, zv_period): Changed zv bitmap to fill fringe evenly with small dashes. - (x_draw_fringe_bitmap): Clear background if necessary. Align and + (x_draw_fringe_bitmap): Clear background if necessary. Align and clip the new ZV bitmap to avoid jitter between rows. (x_draw_row_fringe_bitmaps): Rely on x_draw_fringe_bitmap to clear background. Don't draw fringe bitmaps if fringe width is zero. @@ -12404,7 +12448,7 @@ menu items. From David Ponce . (w32_dialog_show) [HAVE_DIALOGS]: Compile whole function conditionally. - (w32_menu_display_help): New argument OWNER. Rewritten to store a + (w32_menu_display_help): New argument OWNER. Rewritten to store a help event in the owner frame's keyboard buffer. * w32fns.c (w32_wnd_proc) : Display help directly. @@ -12520,7 +12564,7 @@ (my_create_tip_window): Assign tip_window. (x_create_tip_frame): Use same defaults as X. (compute_tip_xy): Remove unused variable. Use full screen width. - (Fx_show_tip): Do not double height. Call ShowWindow directly. + (Fx_show_tip): Do not double height. Call ShowWindow directly. * w32term.c (x_after_update_window_line): Doc fix. (w32_read_socket): Doc fix. Avoid SET_FRAME_GARBAGED for tip @@ -12757,9 +12801,9 @@ `bitmaps': * dispextern.h (FRINGE_FACE_ID): Renamed from BITMAP_AREA_FACE_ID. - Comments fixed. Use renamed symbols. - - * dispnew.c: Comment fix. Use renamed symbols. + Comments fixed. Use renamed symbols. + + * dispnew.c: Comment fix. Use renamed symbols. * frame.h (FRAME_FRINGE_COLS): Renamed from FRAME_FLAGS_AREA_COLS. (FRAME_FRINGE_WIDTH): Renamed from FRAME_FLAGS_AREA_WIDTH. @@ -12769,13 +12813,13 @@ * w32fns.c: Use renamed symbols. - * w32term.c: Comment fixes. Use renamed symbols. + * w32term.c: Comment fixes. Use renamed symbols. (fringe_bitmap_type): Renamed from bitmap_type. (NO_FRINGE_BITMAP): Renamed from NO_BITMAP. (w32_draw_fringe_bitmap): Renamed from w32_draw_bitmap. (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps. - * w32term.h: Comment fixes. Use renamed symbols. + * w32term.h: Comment fixes. Use renamed symbols. (fringes_extra): Renamed from flags_areas_extra. (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH. (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT. @@ -12788,22 +12832,22 @@ * widget.c: Use renamed symbols. - * window.c: Comment fixes. Use renamed symbols. + * window.c: Comment fixes. Use renamed symbols. (coordinates-in-window-p): Doc fix. - * xdisp.c: Comment fixes. Use renamed symbols. + * xdisp.c: Comment fixes. Use renamed symbols. * xfaces.c (realize_basic_faces): Use FRINGE_FACE_ID. * xfns.c: Use renamed symbols. - * xterm.c: Comment fixes. Use renamed symbols. + * xterm.c: Comment fixes. Use renamed symbols. (fringe_bitmap_type): Renamed from bitmap_type. (NO_FRINGE_BITMAP): Renamed from NO_BITMAP. (x_draw_fringe_bitmap): Renamed from x_draw_bitmap. (x_draw_row_fringe_bitmaps): Renamed from x_draw_row_bitmaps. - * xterm.h: Comment fixes. Use renamed symbols. + * xterm.h: Comment fixes. Use renamed symbols. (fringes_extra): Renamed from flags_areas_extra. (FRAME_FRINGE_BITMAP_WIDTH): Renamed from FRAME_FLAGS_BITMAP_WIDTH. (FRAME_FRINGE_BITMAP_HEIGHT): Renamed from FRAME_FLAGS_BITMAP_HEIGHT. @@ -12921,8 +12965,8 @@ 2001-11-12 Jason Rumney * w32console.c, w32fns.c, w32menu.c, w32proc.c, w32select.c, - * w32term.c: Change doc-string comments to `new style'. - [w/`doc:' keyword]. Doc fixes. + * w32term.c: Change doc-string comments to `new style' + [w/`doc:' keyword]. Doc fixes. * w32fns.c: Don't define max. (Fx_open_connection): Only execute once. @@ -12957,7 +13001,7 @@ 2001-11-10 Jason Rumney * w32fns.c (enum_font_cb2): Use leading @ on face name to detect - vertical fonts. Allow them if face name is explicitly specified. + vertical fonts. Allow them if face name is explicitly specified. Do not give up if we find a font that cannot be converted to an xlfd. 2001-11-10 Gerd Moellmann @@ -13767,7 +13811,7 @@ full-width rows. (x_dump_glyph_string): Put in #if GLYPH_DEBUG. (w32_draw_relief_rect): Extend left shadow to the bottom and left; - change bottom shadow accordingly. Some cleanup. + change bottom shadow accordingly. Some cleanup. (x_update_window_end): Handle overwritten mouse face also for tool bar windows. (show_mouse_face): Set the glyph row's mouse_face_p flag also when @@ -13813,7 +13857,7 @@ (Fv_max_tooltip_size): New variable. (syns_of_xfns): DEFVAR_LISP it. (Fx_show_tip): Add parameter TEXT. Set the tip frame's root - window buffer to *tip* right after creating the frame. Set frame's + window buffer to *tip* right after creating the frame. Set frame's window_width. Use a maximum tooltip size specified by Vx_max_tooltip_size, if that has valid contents. (compute_tip_xy): Add parameters WIDTH and HEIGHT. diff -r f982df4459a4 -r 50b9a96c837c src/alloc.c --- a/src/alloc.c Sun May 23 04:39:43 2004 +0000 +++ b/src/alloc.c Sun May 23 05:08:13 2004 +0000 @@ -1894,8 +1894,9 @@ DEFUN ("make-string", Fmake_string, Smake_string, 2, 2, 0, - doc: /* Return a newly created string of length LENGTH, with each element being INIT. -Both LENGTH and INIT must be numbers. */) + doc: /* Return a newly created string of length LENGTH, with INIT in each element. +LENGTH must be an integer. +INIT must be an integer that represents a character. */) (length, init) Lisp_Object length, init; { @@ -2335,7 +2336,6 @@ cons_free_list = ptr; } - DEFUN ("cons", Fcons, Scons, 2, 2, 0, doc: /* Create a new cons, give it CAR and CDR as components, and return it. */) (car, cdr) @@ -4287,6 +4287,8 @@ /* If nargs is UNEVALLED, args points to slot holding list of unevalled args. */ char evalargs; + /* Nonzero means call value of debugger when done with this operation. */ + char debug_on_exit; }; @@ -4478,34 +4480,42 @@ } #endif - /* Look thru every buffer's undo list - for elements that update markers that were not marked, - and delete them. */ + gc_sweep (); + + /* Look thru every buffer's undo list for elements that used to + contain update markers that were changed to Lisp_Misc_Free + objects and delete them. This may leave a few cons cells + unchained, but we will get those on the next sweep. */ { register struct buffer *nextb = all_buffers; while (nextb) { /* If a buffer's undo list is Qt, that means that undo is - turned off in that buffer. Calling truncate_undo_list on - Qt tends to return NULL, which effectively turns undo back on. - So don't call truncate_undo_list if undo_list is Qt. */ + turned off in that buffer. */ if (! EQ (nextb->undo_list, Qt)) { - Lisp_Object tail, prev; + Lisp_Object tail, prev, elt, car; tail = nextb->undo_list; prev = Qnil; while (CONSP (tail)) { - if (GC_CONSP (XCAR (tail)) - && GC_MARKERP (XCAR (XCAR (tail))) - && !XMARKER (XCAR (XCAR (tail)))->gcmarkbit) + if ((elt = XCAR (tail), GC_CONSP (elt)) + && (car = XCAR (elt), GC_MISCP (car)) + && XMISCTYPE (car) == Lisp_Misc_Free) { + Lisp_Object cdr = XCDR (tail); + /* Do not use free_cons here, as we don't know if + anybody else has a pointer to these conses. */ + XSETCAR (elt, Qnil); + XSETCDR (elt, Qnil); + XSETCAR (tail, Qnil); + XSETCDR (tail, Qnil); if (NILP (prev)) - nextb->undo_list = tail = XCDR (tail); + nextb->undo_list = tail = cdr; else { - tail = XCDR (tail); + tail = cdr; XSETCDR (prev, tail); } } @@ -4521,8 +4531,6 @@ } } - gc_sweep (); - /* Clear the mark bits that we set in certain root slots. */ unmark_byte_stack (); @@ -4978,14 +4986,6 @@ break; case Lisp_Misc: - if (XMISCTYPE (obj) == Lisp_Misc_Free) - { - /* This is (probably) a freed marker which may still exist on - a buffer undo list, so accept it here, as check below will - fail (not live). KFS 2004-05-17 */ - XMARKER (obj)->gcmarkbit = 1; - break; - } CHECK_ALLOCATED_AND_LIVE (live_misc_p); if (XMARKER (obj)->gcmarkbit) break; @@ -5211,16 +5211,6 @@ static void gc_sweep () { - /* Remove or mark entries in weak hash tables. - This must be done before any object is unmarked. */ - sweep_weak_hash_tables (); - - sweep_strings (); -#ifdef GC_CHECK_STRING_BYTES - if (!noninteractive) - check_string_bytes (1); -#endif - /* Put all unmarked conses on free list */ { register struct cons_block *cblk; @@ -5271,6 +5261,16 @@ total_free_conses = num_free; } + /* Remove or mark entries in weak hash tables. + This must be done before any object is unmarked. */ + sweep_weak_hash_tables (); + + sweep_strings (); +#ifdef GC_CHECK_STRING_BYTES + if (!noninteractive) + check_string_bytes (1); +#endif + /* Put all unmarked floats on free list */ { register struct float_block *fblk; @@ -5469,6 +5469,9 @@ /* If this block contains only free markers and we have already seen more than two blocks worth of free markers then deallocate this block. */ +#if 0 + /* There may still be pointers to these markers from a buffer's + undo list, so don't free them. KFS 2004-05-21 / if (this_free == MARKER_BLOCK_SIZE && num_free > MARKER_BLOCK_SIZE) { *mprev = mblk->next; @@ -5478,6 +5481,7 @@ n_marker_blocks--; } else +#endif { num_free += this_free; mprev = &mblk->next; diff -r f982df4459a4 -r 50b9a96c837c src/buffer.c --- a/src/buffer.c Sun May 23 04:39:43 2004 +0000 +++ b/src/buffer.c Sun May 23 05:08:13 2004 +0000 @@ -487,7 +487,7 @@ clone_per_buffer_values (from, to) struct buffer *from, *to; { - Lisp_Object to_buffer; + Lisp_Object to_buffer, tem; int offset; XSETBUFFER (to_buffer, to); @@ -514,6 +514,14 @@ to->overlays_before = copy_overlays (to, from->overlays_before); to->overlays_after = copy_overlays (to, from->overlays_after); + + /* Copy the alist of local variables, + and all the alist elements too. */ + to->local_var_alist + = Fcopy_sequence (from->local_var_alist); + for (tem = to->local_var_alist; CONSP (tem); + tem = XCDR (tem)) + XSETCAR (tem, Fcons (XCAR (XCAR (tem)), XCDR (XCAR (tem)))); } diff -r f982df4459a4 -r 50b9a96c837c src/casefiddle.c --- a/src/casefiddle.c Sun May 23 04:39:43 2004 +0000 +++ b/src/casefiddle.c Sun May 23 05:08:13 2004 +0000 @@ -52,6 +52,12 @@ | CHAR_SHIFT | CHAR_CTL | CHAR_META); int flags = XINT (obj) & flagbits; + /* If the character has higher bits set + above the flags, return it unchanged. + It is not a real character. */ + if ((unsigned) XFASTINT (obj) > (unsigned) flagbits) + return obj; + c = DOWNCASE (XFASTINT (obj) & ~flagbits); if (inword) XSETFASTINT (obj, c | flags); diff -r f982df4459a4 -r 50b9a96c837c src/emacs.c --- a/src/emacs.c Sun May 23 04:39:43 2004 +0000 +++ b/src/emacs.c Sun May 23 05:08:13 2004 +0000 @@ -849,7 +849,7 @@ else { printf ("GNU Emacs %s\n", SDATA (tem)); - printf ("Copyright (C) 2002 Free Software Foundation, Inc.\n"); + printf ("Copyright (C) 2004 Free Software Foundation, Inc.\n"); printf ("GNU Emacs comes with ABSOLUTELY NO WARRANTY.\n"); printf ("You may redistribute copies of Emacs\n"); printf ("under the terms of the GNU General Public License.\n"); diff -r f982df4459a4 -r 50b9a96c837c src/fileio.c --- a/src/fileio.c Sun May 23 04:39:43 2004 +0000 +++ b/src/fileio.c Sun May 23 05:08:13 2004 +0000 @@ -6200,10 +6200,13 @@ if (NILP (dir)) dir = current_buffer->directory; + if (NILP (Ffile_name_absolute_p (dir))) + dir = Fexpand_file_name (dir, Qnil); if (NILP (default_filename)) - default_filename = !NILP (initial) - ? Fexpand_file_name (initial, dir) - : current_buffer->filename; + default_filename + = (!NILP (initial) + ? Fexpand_file_name (initial, dir) + : current_buffer->filename); /* If dir starts with user's homedir, change that to ~. */ homedir = (char *) egetenv ("HOME"); diff -r f982df4459a4 -r 50b9a96c837c src/insdel.c --- a/src/insdel.c Sun May 23 04:39:43 2004 +0000 +++ b/src/insdel.c Sun May 23 05:08:13 2004 +0000 @@ -1556,7 +1556,7 @@ Z_BYTE -= nbytes_del; GPT = from; GPT_BYTE = from_byte; - *(GPT_ADDR) = 0; /* Put an anchor. */ + if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */ if (GPT_BYTE < GPT) abort (); @@ -1839,7 +1839,7 @@ Z -= nchars_del; GPT = from; GPT_BYTE = from_byte; - *(GPT_ADDR) = 0; /* Put an anchor. */ + if (GAP_SIZE > 0) *(GPT_ADDR) = 0; /* Put an anchor. */ if (GPT_BYTE < GPT) abort (); diff -r f982df4459a4 -r 50b9a96c837c src/intervals.c --- a/src/intervals.c Sun May 23 04:39:43 2004 +0000 +++ b/src/intervals.c Sun May 23 05:08:13 2004 +0000 @@ -1899,11 +1899,13 @@ return fallback; /* Check for alternative properties */ tail = Fassq (prop, Vchar_property_alias_alist); - if (NILP (tail)) - return tail; - tail = XCDR (tail); - for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) - fallback = Fplist_get (plist, XCAR (tail)); + if (! NILP (tail)) + { + tail = XCDR (tail); + for (; NILP (fallback) && CONSP (tail); tail = XCDR (tail)) + fallback = Fplist_get (plist, XCAR (tail)); + } + if (textprop && NILP (fallback) && CONSP (Vdefault_text_properties)) fallback = Fplist_get (Vdefault_text_properties, prop); return fallback; diff -r f982df4459a4 -r 50b9a96c837c src/keyboard.c --- a/src/keyboard.c Sun May 23 04:39:43 2004 +0000 +++ b/src/keyboard.c Sun May 23 05:08:13 2004 +0000 @@ -113,6 +113,8 @@ args points to slot holding list of unevalled args */ char evalargs; + /* Nonzero means call value of debugger when done with this operation. */ + char debug_on_exit; }; #ifdef MULTI_KBOARD @@ -9747,6 +9749,7 @@ backtrace.args = &cmd; backtrace.nargs = 1; backtrace.evalargs = 0; + backtrace.debug_on_exit = 0; tem = Fcall_interactively (cmd, record_flag, keys); diff -r f982df4459a4 -r 50b9a96c837c src/keymap.c --- a/src/keymap.c Sun May 23 04:39:43 2004 +0000 +++ b/src/keymap.c Sun May 23 05:08:13 2004 +0000 @@ -1079,15 +1079,15 @@ DEF is anything that can be a key's definition: nil (means key is undefined in this keymap), - a command (a Lisp function suitable for interactive calling) + a command (a Lisp function suitable for interactive calling), a string (treated as a keyboard macro), a keymap (to define a prefix key), - a symbol. When the key is looked up, the symbol will stand for its + a symbol (when the key is looked up, the symbol will stand for its function definition, which should at that time be one of the above, - or another symbol whose function definition is used, etc. + or another symbol whose function definition is used, etc.), a cons (STRING . DEFN), meaning that DEFN is the definition (DEFN should be a valid definition in its own right), - or a cons (KEYMAP . CHAR), meaning use definition of CHAR in map KEYMAP. + or a cons (MAP . CHAR), meaning use definition of CHAR in keymap MAP. If KEYMAP is a sparse keymap with a binding for KEY, the existing binding is altered. If there is no binding for KEY, the new pair diff -r f982df4459a4 -r 50b9a96c837c src/xdisp.c --- a/src/xdisp.c Sun May 23 04:39:43 2004 +0000 +++ b/src/xdisp.c Sun May 23 05:08:13 2004 +0000 @@ -10998,7 +10998,12 @@ aggressive = current_buffer->scroll_up_aggressively; height = WINDOW_BOX_TEXT_HEIGHT (w); if (NUMBERP (aggressive)) - amount_to_scroll = XFLOATINT (aggressive) * height; + { + double float_amount = XFLOATINT (aggressive) * height; + amount_to_scroll = float_amount; + if (amount_to_scroll == 0 && float_amount > 0) + amount_to_scroll = 1; + } } if (amount_to_scroll <= 0) @@ -11056,7 +11061,12 @@ aggressive = current_buffer->scroll_down_aggressively; height = WINDOW_BOX_TEXT_HEIGHT (w); if (NUMBERP (aggressive)) - amount_to_scroll = XFLOATINT (aggressive) * height; + { + double float_amount = XFLOATINT (aggressive) * height; + amount_to_scroll = float_amount; + if (amount_to_scroll == 0 && float_amount > 0) + amount_to_scroll = 1; + } } if (amount_to_scroll <= 0)