# HG changeset patch # User Karoly Lorentey # Date 1075152162 0 # Node ID 895e130cc8da4a625034f18a392a2f88d4394874 # Parent f002bd19cc34a1825f676a6912d55803d3247473# Parent 35525a4fab1ef07116fa991acd35a6b9bc214c62 Merged in changes from CVS HEAD Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-53 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-54 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-55 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-56 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-70 diff -r f002bd19cc34 -r 895e130cc8da ChangeLog --- a/ChangeLog Mon Jan 26 07:57:54 2004 +0000 +++ b/ChangeLog Mon Jan 26 21:22:42 2004 +0000 @@ -1,3 +1,7 @@ +2004-01-25 Jerome Marant (tiny change) + + * make-dist (lispref): Do include lispref/index.texi. + 2004-01-06 Eric Hanchrow (tiny change) * make-dist (tempdir): Include cursors in nt/icons @@ -14,7 +18,7 @@ 2003-12-24 Andreas Schwab * configure.in: Check for . Include it before - including . Move check for before it's use. + including . Move check for before its use. 2003-12-24 Jan Dj,Ad(Brv diff -r f002bd19cc34 -r 895e130cc8da etc/GNU --- a/etc/GNU Mon Jan 26 07:57:54 2004 +0000 +++ b/etc/GNU Mon Jan 26 21:22:42 2004 +0000 @@ -1,4 +1,4 @@ -Copyright (C) 1985, 1993 Free Software Foundation, Inc. +Copyright (C) 1985, 1993, 2003 Free Software Foundation, Inc. Permission is granted to anyone to make or distribute verbatim copies of this document, in any medium, provided that the copyright notice and @@ -341,7 +341,7 @@ other people's lives; and it is usually used to make their lives more difficult. - People who have studied the issue of intellectual property rights + People who have studied the issue of intellectual property rights(6) carefully (such as lawyers) say that there is no intrinsic right to intellectual property. The kinds of supposed intellectual property rights that the government recognizes were created by specific acts of @@ -530,3 +530,11 @@ (5) A group of computer companies recently pooled funds to support maintenance of the GNU C Compiler. + (6) In the 80s I had not yet realized how confusing it was to speak +of "the issue" of "intellectual property". That term is obviously +biased; more subtle is the fact that it lumps together various +disparate laws which raise very different issues. Nowadays I urge +people to reject the term "intellectual property" entirely, lest it +lead others to suppose this is one coherent issue. The way to be +clear is to to discuss patents, copyrights, and trademarks separately. +See http://www.gnu.org/philosophy/words-to-avoid.html. \ No newline at end of file diff -r f002bd19cc34 -r 895e130cc8da etc/NEWS --- a/etc/NEWS Mon Jan 26 07:57:54 2004 +0000 +++ b/etc/NEWS Mon Jan 26 21:22:42 2004 +0000 @@ -1791,6 +1791,11 @@ * Lisp Changes in Emacs 21.4 +++ +** The flags, width, and precision options for %-specifications in function +`format' are now documented. Some flags that were accepted but not +implemented (such as "*") are no longer accepted. + ++++ ** New function `delete-dups' destructively removes `equal' duplicates from a list. Of several `equal' occurrences of an element in the list, the last one is kept. diff -r f002bd19cc34 -r 895e130cc8da lib-src/ChangeLog --- a/lib-src/ChangeLog Mon Jan 26 07:57:54 2004 +0000 +++ b/lib-src/ChangeLog Mon Jan 26 21:22:42 2004 +0000 @@ -1,3 +1,8 @@ +2004-01-24 Richard M. Stallman + + * emacsclient.c (main): Restore errno from saved_errno, + so the error message comes from socket_status. + 2004-01-08 Andreas Schwab * emacsclient.c (main): Save errno from socket_status. diff -r f002bd19cc34 -r 895e130cc8da lib-src/emacsclient.c --- a/lib-src/emacsclient.c Mon Jan 26 07:57:54 2004 +0000 +++ b/lib-src/emacsclient.c Mon Jan 26 21:22:42 2004 +0000 @@ -473,12 +473,14 @@ that init_editfns uses to set the global Vuser_full_name. */ char *user_name = (char *) getenv ("LOGNAME"); + if (!user_name) user_name = (char *) getenv ("USER"); if (user_name) { struct passwd *pw = getpwnam (user_name); + if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ @@ -497,6 +499,8 @@ sock_status = socket_status (server.sun_path); saved_errno = errno; } + else + errno = saved_errno; } } diff -r f002bd19cc34 -r 895e130cc8da lisp/ChangeLog --- a/lisp/ChangeLog Mon Jan 26 07:57:54 2004 +0000 +++ b/lisp/ChangeLog Mon Jan 26 21:22:42 2004 +0000 @@ -1,3 +1,26 @@ +2004-01-25 Glenn Morris + + * progmodes/fortran.el (fortran-break-before-delimiters): Doc fix. + (fortran-break-delimiters-re, fortran-no-break-re): New defconsts. + (fortran-fill): When filling a string, adjust re-search-backward + argument for special case of string just on fill-column. + When filling non-string, allow one extra char if + fortran-break-before-delimiters is non-nil. Suggested by + Michael Hagemann . + Use fortran-break-delimiters-re and fortran-no-break-re to + correctly handle cases such as "**". + + * progmodes/f90.el (f90-break-delimiters): Doc fix. + (f90-no-break-re): Add some extra tokens. Doc fix. + +2004-01-24 Thien-Thi Nguyen + + * mail/rmail-spam-filter.el: + Use two semicolons as Commentary line prefix. + Add ";;; Code:" stylized comment. + Delete end-of-line whitespace. + Wrap (require 'cl) with `eval-when-compile'. + 2004-01-23 Benjamin Rutt * vc.el (vc-annotate): Fix improper use of `make-local-variable' diff -r f002bd19cc34 -r 895e130cc8da lisp/mail/rmail-spam-filter.el --- a/lisp/mail/rmail-spam-filter.el Mon Jan 26 07:57:54 2004 +0000 +++ b/lisp/mail/rmail-spam-filter.el Mon Jan 26 21:22:42 2004 +0000 @@ -1,6 +1,6 @@ -;;; rmail-spam-filter.el --- spam filter for rmail, the emacs mail reader. +;;; rmail-spam-filter.el --- spam filter for RMAIL -;; Copyright (C) 2002 +;; Copyright (C) 2002 ;; Free Software Foundation, Inc. ;; Keywords: email, spam, filter, rmail ;; Author: Eli Tziperman @@ -23,62 +23,64 @@ ;; Boston, MA 02111-1307, USA. ;;; Commentary: -;;; ----------- -;;; Automatically recognize and delete junk email before it is -;;; displayed in rmail/rmail-summary. Spam emails are defined by -;;; specifying one or more of the sender, subject and contents. -;;; URL: http://www.weizmann.ac.il/~eli/Downloads/rmail-spam-filter/ +;; Automatically recognize and delete junk email before it is +;; displayed in rmail/rmail-summary. Spam emails are defined by +;; specifying one or more of the sender, subject and contents. +;; URL: http://www.weizmann.ac.il/~eli/Downloads/rmail-spam-filter/ -;;; Usage: -;;; ------ +;; Usage: +;; ------ + +;; put in your .emacs: -;;; put in your .emacs: +;; (load "rmail-spam-filter.el") -;;; (load "rmail-spam-filter.el") - -;;; and use customize (in rmail-spam-filter group) to: +;; and use customize (in rmail-spam-filter group) to: -;;; (*) turn on the variable rmail-use-spam-filter, +;; (*) turn on the variable rmail-use-spam-filter, -;;; (*) specify in variable rmail-spam-definitions-alist what sender, -;;; subject and contents make an email be considered spam. +;; (*) specify in variable rmail-spam-definitions-alist what sender, +;; subject and contents make an email be considered spam. -;;; in addition, you may: +;; in addition, you may: -;;; (*) Block future mail with the subject or sender of a message -;;; while reading it in RMAIL: just click on the "Spam" item on the -;;; menubar, and add the subject or sender to the list of spam -;;; definitions using the mouse and the appropriate menu item. Â  You -;;; need to later also save the list of spam definitions using the -;;; same menu item, or alternatively, see variable -;;; `rmail-spam-filter-autosave-newly-added-spam-definitions'. +;; (*) Block future mail with the subject or sender of a message +;; while reading it in RMAIL: just click on the "Spam" item on the +;; menubar, and add the subject or sender to the list of spam +;; definitions using the mouse and the appropriate menu item. Â  You +;; need to later also save the list of spam definitions using the +;; same menu item, or alternatively, see variable +;; `rmail-spam-filter-autosave-newly-added-spam-definitions'. -;;; (*) specify if blind-cc'ed mail (no "To:" header field) is to be -;;; treated as spam (variable rmail-spam-no-blind-cc; Thanks to Ethan -;;; Brown for this). +;; (*) specify if blind-cc'ed mail (no "To:" header field) is to be +;; treated as spam (variable rmail-spam-no-blind-cc; Thanks to Ethan +;; Brown for this). -;;; (*) specify if rmail-spam-filter should ignore case of spam -;;; definitions (variable rmail-spam-filter-ignore-case; Thanks to -;;; Ethan Brown for the suggestion). +;; (*) specify if rmail-spam-filter should ignore case of spam +;; definitions (variable rmail-spam-filter-ignore-case; Thanks to +;; Ethan Brown for the suggestion). + +;; (*) Specify a "white-list" of trusted senders. If any +;; rmail-spam-white-list string matches a substring of the "From" +;; header, the message is flagged as a valid, non-spam message (Ethan +;; Brown ). -;;; (*) Specify a "white-list" of trusted senders. If any -;;; rmail-spam-white-list string matches a substring of the "From" -;;; header, the message is flagged as a valid, non-spam message (Ethan -;;; Brown ). +;; (*) rmail spam filter also works with bbdb to prevent spam senders +;; from entering into the .bbdb file. See variable +;; "rmail-spam-filter-auto-delete-spam-bbdb-entries". This is done +;; in two ways: (a) bbdb is made not to auto-create entries for +;; messages that are deleted by the rmail-spam-filter, (b) when a +;; message is deleted in rmail, the user is offered to delete the +;; sender's bbdb entry as well _if_ it was created at the same day. -;;; (*) rmail spam filter also works with bbdb to prevent spam senders -;;; from entering into the .bbdb file. See variable -;;; "rmail-spam-filter-auto-delete-spam-bbdb-entries". This is done -;;; in two ways: (a) bbdb is made not to auto-create entries for -;;; messages that are deleted by the rmail-spam-filter, (b) when a -;;; message is deleted in rmail, the user is offered to delete the -;;; sender's bbdb entry as well _if_ it was created at the same day. +;;; Code: (require 'rmail) ;; For find-if and other cool common lisp functions we may want to use. (EDB) -(require 'cl) +(eval-when-compile + (require 'cl)) (defgroup rmail-spam-filter nil "Spam filter for RMAIL, the mail reader for Emacs." @@ -120,7 +122,7 @@ "*Seconds to wait after display of message that spam was found." :type 'number :group 'rmail-spam-filter ) - + (defcustom rmail-spam-filter-auto-delete-spam-bbdb-entries nil "*Non-nil to make sure no entries are made in bbdb for spam emails. This is done in two ways: (1) bbdb is made not to auto-create entries @@ -161,7 +163,7 @@ sender, etc, may be regexp. For example, to specify that the subject may be either 'this is spam' or 'another spam', use the regexp: 'this is spam\|another spam' (without the single quotes)." - :type '(repeat + :type '(repeat (list :format "%v" (cons :format "%v" :value (from . "") (const :format "" from) @@ -177,7 +179,7 @@ (string :tag "Contents" "")) (cons :format "%v" :value (action . output-and-delete) (const :format "" action) - (choice :tag "Action selection" + (choice :tag "Action selection" (const :tag "output to spam folder and delete" output-and-delete) (const :tag "delete spam" delete-spam) )) @@ -208,7 +210,7 @@ (save-current-msg) (rmail-spam-filter-saved-bbdb/mail_auto_create_p nil) ) - + ;; make sure bbdb does not create entries for messages while spam ;; filter is scanning the rmail file: (setq rmail-spam-filter-saved-bbdb/mail_auto_create_p 'bbdb/mail_auto_create_p) @@ -236,7 +238,7 @@ ;;; do we want to ignore case in spam definitions: (setq case-fold-search rmail-spam-filter-ignore-case) - + ;; Check for blind CC condition. Set vars such that while ;; loop will be bypassed and spam condition will trigger (EDB) (if (and rmail-spam-no-blind-cc @@ -245,7 +247,7 @@ (setq exit-while-loop t) (setq maybe-spam t) (setq this-is-a-spam-email t))) - + ;; Check white list, and likewise cause while loop ;; bypass. (EDB) (if (find-if '(lambda (white-str) @@ -255,7 +257,7 @@ (setq exit-while-loop t) (setq maybe-spam nil) (setq this-is-a-spam-email nil))) - + ;; scan all elements of the list rmail-spam-definitions-alist (while (and (< num-element num-spam-definition-elements) @@ -277,7 +279,7 @@ ;; start scanning incoming message: ;;--------------------------------- - + ;; if sender field is not specified in message being ;; scanned, AND if "from" field does not appear in spam ;; definitions for this element, this may still be spam @@ -585,7 +587,7 @@ (defun rmail-bbdb-auto-delete-spam-entries () "When deleting a message in RMAIL, check to see if the bbdb entry -was created today, and if it was, prompt to delete it too. This function +was created today, and if it was, prompt to delete it too. This function needs to be called via the `rmail-delete-message-hook' like this: \(add-hook 'rmail-delete-message-hook 'rmail-bbdb-auto-delete-spam-entries)" (interactive) @@ -604,14 +606,14 @@ "Make sure senderes of rmail messages marked as deleted are not added to bbdb. Need to add this as a hook like this: \(setq bbdb/mail-auto-create-p 'rmail-spam-filter-bbdb-dont-create-entries-for-spam) -and this is also used in conjunction with rmail-bbdb-auto-delete-spam-entries. -More doc: rmail-bbdb-auto-delete-spam-entries will delete newly created bbdb -entries of mail that is deleted. However, if one scrolls back to the deleted -messages, then the sender is again added to the bbdb. This function +and this is also used in conjunction with rmail-bbdb-auto-delete-spam-entries. +More doc: rmail-bbdb-auto-delete-spam-entries will delete newly created bbdb +entries of mail that is deleted. However, if one scrolls back to the deleted +messages, then the sender is again added to the bbdb. This function prevents this. Also, don't create entries for messages in the `rmail-spam-file'." (interactive) (not - ;; don't create a bbdb entry if one of the following conditions is satisfied: + ;; don't create a bbdb entry if one of the following conditions is satisfied: (or ;; 1) looking at a deleted message: (rmail-message-deleted-p rmail-current-message) @@ -631,4 +633,4 @@ (provide 'rmail-spam-filter) ;;; arch-tag: 03e1d45d-b72f-4dd7-8f04-e7fd78249746 -;;; rmail-spam-filter ends here +;;; rmail-spam-filter.el ends here diff -r f002bd19cc34 -r 895e130cc8da lisp/man.el --- a/lisp/man.el Mon Jan 26 07:57:54 2004 +0000 +++ b/lisp/man.el Mon Jan 26 21:22:42 2004 +0000 @@ -801,7 +801,7 @@ ;; Try to recognize common forms of cross references. (Man-highlight-references) (Man-softhyphen-to-minus) - (message "%s man page made up" Man-arguments)) + (message "%s man page formatted" Man-arguments)) (defun Man-highlight-references () "Highlight the references on mouse-over. diff -r f002bd19cc34 -r 895e130cc8da lisp/progmodes/f90.el --- a/lisp/progmodes/f90.el Mon Jan 26 07:57:54 2004 +0000 +++ b/lisp/progmodes/f90.el Mon Jan 26 21:22:42 2004 +0000 @@ -1,6 +1,6 @@ ;;; f90.el --- Fortran-90 mode (free format) -;; Copyright (C) 1995, 1996, 1997, 2000 Free Software Foundation, Inc. +;; Copyright (C) 1995, 1996, 1997, 2000, 2004 Free Software Foundation, Inc. ;; Author: Torbj\"orn Einarsson ;; Maintainer: Glenn Morris @@ -224,7 +224,10 @@ :group 'f90) (defcustom f90-break-delimiters "[-+\\*/><=,% \t]" - "*Regexp holding list of delimiters at which lines may be broken." + "*Regexp matching delimiter characters at which lines may be broken. +There are certain tokens comprised entirely of characters +matching this regexp that should not be split, and these are +specified by the constant `f90-no-break-re'." :type 'regexp :group 'f90) @@ -574,8 +577,12 @@ "Regexp matching the definition of a derived type.") (defconst f90-no-break-re - (regexp-opt '("**" "//" "=>") 'paren) - "Regexp specifying where not to break lines when filling.") + (regexp-opt '("**" "//" "=>" ">=" "<=" "==" "/=") 'paren) + "Regexp specifying where not to break lines when filling. +This regexp matches certain tokens comprised entirely of +characters matching the regexp `f90-break-delimiters' that should +not be split by filling. Each element is assumed to be two +characters long.") (defvar f90-cache-position nil "Temporary position used to speed up region operations.") diff -r f002bd19cc34 -r 895e130cc8da lisp/progmodes/fortran.el --- a/lisp/progmodes/fortran.el Mon Jan 26 07:57:54 2004 +0000 +++ b/lisp/progmodes/fortran.el Mon Jan 26 21:22:42 2004 +0000 @@ -1,6 +1,6 @@ ;;; fortran.el --- Fortran mode for GNU Emacs -;; Copyright (c) 1986, 93, 94, 95, 97, 98, 99, 2000, 01, 2003 +;; Copyright (c) 1986, 93, 94, 95, 97, 98, 99, 2000, 01, 03, 04 ;; Free Software Foundation, Inc. ;; Author: Michael D. Prange @@ -237,10 +237,25 @@ (defcustom fortran-break-before-delimiters t "*Non-nil causes filling to break lines before delimiters. -Delimiters are whitespace, commas, quotes, and operators." +Delimiters are characters matching the regexp `fortran-break-delimiters-re'." :type 'boolean :group 'fortran) +(defconst fortran-break-delimiters-re "[-+*/><=, \t]" + "Regexp matching delimiter characters at which lines may be broken. +There are certain tokens comprised entirely of characters +matching this regexp that should not be split, and these are +specified by the constant `fortran-no-break-re'.") + +;; The ">=", etc F77 extensions are supported by g77. +(defconst fortran-no-break-re + (regexp-opt '("**" "//" "=>" ">=" "<=" "==" "/=") 'paren) + "Regexp specifying where not to break lines when filling. +This regexp matches certain tokens comprised entirely of +characters matching the regexp `fortran-break-delimiters-re' that should +not be split by filling. Each element is assumed to be two +characters long.") + (defcustom fortran-mode-hook nil "Hook run when entering Fortran mode." :type 'hook @@ -1646,56 +1661,68 @@ (bol (line-beginning-position)) (eol (line-end-position)) (bos (min eol (+ bol (fortran-current-line-indentation)))) + ;; If in a string at fill-column, break it either before the + ;; initial quote, or at fill-col (if string is too long). (quote (save-excursion (goto-char bol) ;; OK to break quotes on comment lines. (unless (looking-at fortran-comment-line-start-skip) (let (fcpoint start) - (move-to-column fill-column) - (when (fortran-is-in-string-p (setq fcpoint (point))) - (save-excursion - (re-search-backward "\\S\"\\s\"\\S\"" bol t) - (setq start - (if fortran-break-before-delimiters - (point) - (1+ (point))))) - (if (re-search-forward "\\S\"\\s\"\\S\"" eol t) - (backward-char 2)) - ;; If the current string is longer than 72 - 6 chars, - ;; break it at the fill column (else infinite loop). - (if (> (- (point) start) - (- fill-column 6 fortran-continuation-indent)) - fcpoint - start)))))) + (move-to-column fill-column) + (when (fortran-is-in-string-p (setq fcpoint (point))) + (save-excursion + (re-search-backward "\\S\"\\s\"\\S\"?" bol t) + (setq start + (if fortran-break-before-delimiters + (point) + (1+ (point))))) + (if (re-search-forward "\\S\"\\s\"\\S\"" eol t) + (backward-char 2)) + ;; If the current string is longer than 72 - 6 chars, + ;; break it at the fill column (else infinite loop). + (if (> (- (point) start) + (- fill-column 6 fortran-continuation-indent)) + fcpoint + start)))))) ;; Decide where to split the line. If a position for a quoted ;; string was found above then use that, else break the line - ;; before the last delimiter. - ;; Delimiters are whitespace, commas, and operators. - ;; Will break before a pair of *'s. + ;; before/after the last delimiter. (fill-point (or quote (save-excursion - (move-to-column (1+ fill-column)) - ;; GM Make this a defcustom as in f90-mode? Add ", (? - (skip-chars-backward "^ \t\n,'+-/*=)" -;;; (if fortran-break-before-delimiters -;;; "^ \t\n,'+-/*=" "^ \t\n,'+-/*=)") - ) - (when (<= (point) (1+ bos)) + ;; If f-b-b-d is t, have an extra column to play with, + ;; since delimiter gets shifted to new line. + (move-to-column (if fortran-break-before-delimiters + (1+ fill-column) + fill-column)) + (let ((repeat t)) + (while repeat + (setq repeat nil) + ;; Adapted from f90-find-breakpoint. + (re-search-backward fortran-break-delimiters-re + (line-beginning-position)) + (if (not fortran-break-before-delimiters) + (if (looking-at fortran-no-break-re) + ;; Deal with cases such as "**" split over + ;; fill-col. Simpler alternative would be + ;; to start from (1- fill-column) above. + (if (> (+ 2 (current-column)) fill-column) + (setq repeat t) + (forward-char 2)) + (forward-char 1)) + (backward-char) + (or (looking-at fortran-no-break-re) + (forward-char))))) + ;; Line indented beyond fill-column? + (when (<= (point) bos) (move-to-column (1+ fill-column)) ;; What is this doing??? (or (re-search-forward "[\t\n,'+-/*)=]" eol t) (goto-char bol))) (if (bolp) - (re-search-forward "[ \t]" opoint t) - (backward-char) - (if (looking-at "\\s\"") - (forward-char) - (skip-chars-backward " \t\*"))) - (if fortran-break-before-delimiters - (point) - (1+ (point))))))) + (re-search-forward "[ \t]" opoint t)) + (point))))) ;; If we are in an in-line comment, don't break unless the ;; line of code is longer than it should be. Otherwise ;; break the line at the column computed above. diff -r f002bd19cc34 -r 895e130cc8da lispref/strings.texi --- a/lispref/strings.texi Mon Jan 26 07:57:54 2004 +0000 +++ b/lispref/strings.texi Mon Jan 26 21:22:42 2004 +0000 @@ -798,19 +798,18 @@ @cindex numeric prefix @cindex field width @cindex padding - All the specification characters allow an optional numeric prefix -between the @samp{%} and the character. The optional numeric prefix -defines the minimum width for the object. If the printed -representation of the object contains fewer characters than this, then -it is padded. The padding is on the left if the prefix is positive -(or starts with zero) and on the right if the prefix is negative. The -padding character is normally a space, but if the numeric prefix -starts with a zero, zeros are used for padding. Some of these -conventions are ignored for specification characters for which they do -not make sense. That is, %s, %S and %c accept a numeric prefix + All the specification characters allow an optional ``width'', which +is a digit-string between the @samp{%} and the character. If the +printed representation of the object contains fewer characters than +this width, then it is padded. The padding is on the left if the +prefix is positive (or starts with zero) and on the right if the +prefix is negative. The padding character is normally a space, but if +the width starts with a zero, zeros are used for padding. Some of +these conventions are ignored for specification characters for which +they do not make sense. That is, %s, %S and %c accept a width starting with 0, but still pad with @emph{spaces} on the left. Also, -%% accepts a numeric prefix, but ignores it. Here are some examples -of padding: +%% accepts a width, but ignores it. Here are some examples of +padding: @example (format "%06d is padded on the left with zeros" 123) @@ -820,10 +819,9 @@ @result{} "123 is padded on the right" @end example - @code{format} never truncates an object's printed representation, no -matter what width you specify. Thus, you can use a numeric prefix to -specify a minimum spacing between columns with no risk of losing -information. +If the width is too small, @code{format} does not truncate the +object's printed representation. Thus, you can use a width to specify +a minimum spacing between columns with no risk of losing information. In the following three examples, @samp{%7s} specifies a minimum width of 7. In the first case, the string inserted in place of @samp{%7s} has @@ -851,6 +849,28 @@ @end group @end smallexample + All the specification characters allow an optional ``precision'' +before the character (after the width, if present). The precision is +a decimal-point @samp{.} followed by a digit-string. For the +floating-point specifications (%e, %f, %g), the precision specifies +how many decimal places to show; if zero, the decimal-point itself is +also omitted. For %s and %S, the precision truncates the string to +the given width, so @code{"%.3s"} shows only the first three +characters of the representation for @var{object}. Precision is +ignored for other specification characters. + +Immediately after the % and before the optional width and precision, +you can put certain ``flag'' characters. + +A space @var{" "} inserts a space for positive numbers (otherwise +nothing is inserted for positive numbers). This flag is ignored +except for %d, %e, %f, %g. + +The flag @var{"#"} indicates ``alternate form''. For %o it ensures +that the result begins with a 0. For %x and %X the result is prefixed +with ``0x'' or ``0X''. For %e, %f, and %g a decimal point is always +shown even if the precision is zero. + @node Case Conversion @comment node-name, next, previous, up @section Case Conversion in Lisp diff -r f002bd19cc34 -r 895e130cc8da make-dist --- a/make-dist Mon Jan 26 07:57:54 2004 +0000 +++ b/make-dist Mon Jan 26 21:22:42 2004 +0000 @@ -615,7 +615,7 @@ echo "Making links to \`lispref'" (cd lispref - ln `ls -1 *.texi | grep -v index.texi` ../${tempdir}/lispref + ln `ls -1 *.texi` ../${tempdir}/lispref ln *.aux *.cps *.fns *.kys *.vrs index.*perm ../${tempdir}/lispref ln *.txt *.el spellfile permute-index tindex.pl ../${tempdir}/lispref test -f README && ln README ../${tempdir}/lispref diff -r f002bd19cc34 -r 895e130cc8da man/ChangeLog --- a/man/ChangeLog Mon Jan 26 07:57:54 2004 +0000 +++ b/man/ChangeLog Mon Jan 26 21:22:42 2004 +0000 @@ -1,3 +1,9 @@ +2004-01-24 Richard M. Stallman + + * emacs.texi (Acknowledgments): Renamed from Acknowledgements. + Include it only @ifnotinfo. Patch the preceding and following + node headers to point to each other. + 2004-01-11 Glenn Morris * calendar.texi (Appointments): Update section. diff -r f002bd19cc34 -r 895e130cc8da man/emacs.texi --- a/man/emacs.texi Mon Jan 26 07:57:54 2004 +0000 +++ b/man/emacs.texi Mon Jan 26 21:22:42 2004 +0000 @@ -115,7 +115,6 @@ @menu * Distrib:: How to get the latest Emacs distribution. -* Acknowledgements:: Contributors to GNU Emacs. * Copying:: The GNU General Public License gives you permission to redistribute GNU Emacs on certain terms; it also explains that there is no warranty. @@ -902,7 +901,7 @@ manual. @xref{MS-DOS}, for information about using Emacs on MS-DOS. @end iftex -@node Distrib, Acknowledgements, Top, Top +@node Distrib, Copying, Top, Top @unnumbered Distribution GNU Emacs is @dfn{free software}; this means that everyone is free to @@ -956,8 +955,9 @@ might instead suggest ordering a CD-ROM from the Foundation occasionally, or subscribing to periodic updates. -@node Acknowledgements, Copying, Distrib, Top -@section Acknowledgements +@ifnotinfo +@node Acknowledgments, Copying, Distrib, Top +@section Acknowledgments Contributors to GNU Emacs include Per Abrahamsen, Jay K. Adams, Joe Arceneaux, Boaz Ben-Zvi, Jim Blandy, Terrence Brannon, Frank Bresz, @@ -1000,8 +1000,9 @@ Wilkinson, Mike Williams, Steven A. Wood, Dale R. Worley, Felix S. T. Wu, Tom Wurgler, Eli Zaretskii, Jamie Zawinski, Ian T. Zimmermann, Reto Zimmermann, and Neal Ziring. +@end ifnotinfo -@node Copying, GNU Free Documentation License, Acknowledgements, Top +@node Copying, GNU Free Documentation License, Distrib, Top @unnumbered GNU GENERAL PUBLIC LICENSE @center Version 2, June 1991 diff -r f002bd19cc34 -r 895e130cc8da src/ChangeLog --- a/src/ChangeLog Mon Jan 26 07:57:54 2004 +0000 +++ b/src/ChangeLog Mon Jan 26 21:22:42 2004 +0000 @@ -1,3 +1,18 @@ +2004-01-26 Andreas Schwab + + * print.c (print_preprocess): Declare size as EMACS_INT to not + lose bits. + (print_object): Likewise. + * alloc.c (Fpurecopy): Likewise. + +2004-01-25 Luc Teirlinck + + * window.c (Fwindow_minibuffer_p): Doc fix. + +2004-01-24 Jonathan Yavner + + * editfns.c (Fformat): Make both passes accept the same set of flags. + 2004-01-23 Kenichi Handa * fns.c (Fmd5): If OBJECT is a buffer different from the current diff -r f002bd19cc34 -r 895e130cc8da src/alloc.c --- a/src/alloc.c Mon Jan 26 07:57:54 2004 +0000 +++ b/src/alloc.c Mon Jan 26 21:22:42 2004 +0000 @@ -4231,12 +4231,13 @@ else if (COMPILEDP (obj) || VECTORP (obj)) { register struct Lisp_Vector *vec; - register int i, size; + register int i; + EMACS_INT size; size = XVECTOR (obj)->size; if (size & PSEUDOVECTOR_FLAG) size &= PSEUDOVECTOR_SIZE_MASK; - vec = XVECTOR (make_pure_vector ((EMACS_INT) size)); + vec = XVECTOR (make_pure_vector (size)); for (i = 0; i < size; i++) vec->contents[i] = Fpurecopy (XVECTOR (obj)->contents[i]); if (COMPILEDP (obj)) diff -r f002bd19cc34 -r 895e130cc8da src/editfns.c --- a/src/editfns.c Mon Jan 26 07:57:54 2004 +0000 +++ b/src/editfns.c Mon Jan 26 21:22:42 2004 +0000 @@ -3193,6 +3193,10 @@ The argument used for %d, %o, %x, %e, %f, %g or %c must be a number. Use %% to put a single % into the output. +The basic structure of a %-sequence is + % character +where flags is [- #0]+, width is [0-9]+, and precision is .[0-9]+ + usage: (format STRING &rest OBJECTS) */) (nargs, args) int nargs; @@ -3300,7 +3304,7 @@ where - flags ::= [#-* 0]+ + flags ::= [- #0]+ field-width ::= [0-9]+ precision ::= '.' [0-9]* @@ -3312,14 +3316,7 @@ digits to print after the '.' for floats, or the max. number of chars to print from a string. */ - /* NOTE the handling of specifiers here differs in some ways - from the libc model. There are bugs in this code that lead - to incorrect formatting when flags recognized by C but - neither parsed nor rejected here are used. Further - revisions will be made soon. */ - - /* incorrect list of flags to skip; will be fixed */ - while (index ("-*# 0", *format)) + while (index ("-0# ", *format)) ++format; if (*format >= '0' && *format <= '9') @@ -3403,7 +3400,7 @@ if (*format == 'c') { if (! SINGLE_BYTE_CHAR_P (XINT (args[n])) - /* Note: No one can remeber why we have to treat + /* Note: No one can remember why we have to treat the character 0 as a multibyte character here. But, until it causes a real problem, let's don't change it. */ @@ -3494,17 +3491,19 @@ discarded[format - format_start] = 1; format++; - /* Process a numeric arg and skip it. */ - /* NOTE atoi is the wrong thing to use here; will be fixed */ + while (index("-0# ", *format)) + { + if (*format == '-') + { + negative = 1; + } + discarded[format - format_start] = 1; + ++format; + } + minlen = atoi (format); - if (minlen < 0) - minlen = - minlen, negative = 1; - - /* NOTE the parsing here is not consistent with the first - pass, and neither attempt is what we want to do. Will be - fixed. */ - while ((*format >= '0' && *format <= '9') - || *format == '-' || *format == ' ' || *format == '.') + + while ((*format >= '0' && *format <= '9') || *format == '.') { discarded[format - format_start] = 1; format++; diff -r f002bd19cc34 -r 895e130cc8da src/print.c --- a/src/print.c Mon Jan 26 07:57:54 2004 +0000 +++ b/src/print.c Mon Jan 26 21:22:42 2004 +0000 @@ -1276,7 +1276,8 @@ print_preprocess (obj) Lisp_Object obj; { - int i, size; + int i; + EMACS_INT size; loop: if (STRINGP (obj) || CONSP (obj) || VECTORP (obj) @@ -1891,7 +1892,7 @@ } else { - int size = XVECTOR (obj)->size; + EMACS_INT size = XVECTOR (obj)->size; if (COMPILEDP (obj)) { PRINTCHAR ('#'); diff -r f002bd19cc34 -r 895e130cc8da src/window.c --- a/src/window.c Mon Jan 26 07:57:54 2004 +0000 +++ b/src/window.c Mon Jan 26 21:22:42 2004 +0000 @@ -307,7 +307,8 @@ } DEFUN ("window-minibuffer-p", Fwindow_minibuffer_p, Swindow_minibuffer_p, 0, 1, 0, - doc: /* Returns non-nil if WINDOW is a minibuffer window. */) + doc: /* Returns non-nil if WINDOW is a minibuffer window. +WINDOW defaults to the selected window. */) (window) Lisp_Object window; {