Index: etc/NEWS =================================================================== RCS file: /cvsroot/emacs/emacs/etc/NEWS,v retrieving revision 1.786 diff -u -r1.786 NEWS --- etc/NEWS 3 Feb 2003 20:55:30 -0000 1.786 +++ etc/NEWS 5 Feb 2003 19:31:13 -0000 @@ -1150,6 +1150,8 @@ * Lisp Changes in Emacs 21.4 +** New ?\_ escape character for space. + ** New variables `gc-elapsed' and `gcs-done' provide extra information on garbage collection. Index: lisp/ChangeLog =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/ChangeLog,v retrieving revision 1.4811 diff -u -r1.4811 ChangeLog --- lisp/ChangeLog 4 Feb 2003 17:07:42 -0000 1.4811 +++ lisp/ChangeLog 5 Feb 2003 19:31:14 -0000 @@ -1,3 +1,8 @@ +2003-02-05 Edward O'Connor + * emacs-lisp/checkdoc.el (checkdoc-rogue-space-check-engine): + Replace end-of-line `? ' and `?\ ' with `?\_' instead of + requiring a manual fix. + 2003-02-04 Richard M. Stallman * term.el (term-raw-map): Set it up at load time. Index: lisp/emacs-lisp/checkdoc.el =================================================================== RCS file: /cvsroot/emacs/emacs/lisp/emacs-lisp/checkdoc.el,v retrieving revision 1.34 diff -u -r1.34 checkdoc.el --- lisp/emacs-lisp/checkdoc.el 4 Feb 2003 12:53:34 -0000 1.34 +++ lisp/emacs-lisp/checkdoc.el 5 Feb 2003 19:31:14 -0000 @@ -2112,21 +2112,17 @@ ;; If end is nil, it means end of buffer to search anyway (or ;; Check for an error if `? ' or `?\ ' is used at the end of a line. - ;; (It's dangerous) + ;; This is bad beause `delete-trailing-whitespace' and similar tools + ;; may remove this space. (progn (goto-char start) (while (and (not msg) (re-search-forward "\\?\\\\?[ \t][ \t]*$" end t)) (setq msg "Don't use `? ' at the end of a line. \ -News agents may remove it" +Replace with ?\\_?" s (match-beginning 0) e (match-end 0) f t) - ;; If interactive is passed down, give them a chance to fix things. - (if (and interact (y-or-n-p (concat msg ". Fix? "))) - (progn - (checkdoc-recursive-edit msg) - (setq msg nil) - (goto-char s) - (beginning-of-line))))) + ;; Replace `? ' and `?\ ' with `?\_'. + (checkdoc-autofix-ask-replace s e msg "?\\_"))) ;; Check for, and potentially remove whitespace appearing at the ;; end of different lines. (progn Index: lispref/ChangeLog =================================================================== RCS file: /cvsroot/emacs/emacs/lispref/ChangeLog,v retrieving revision 1.63 diff -u -r1.63 ChangeLog --- lispref/ChangeLog 31 Jan 2003 15:21:47 -0000 1.63 +++ lispref/ChangeLog 5 Feb 2003 19:31:14 -0000 @@ -1,3 +1,8 @@ +2003-02-05 Edward O'Connor + + * objects.texi (Character Type): Added documentation for new ?\_ + escape character. + 2003-01-31 Joe Buehler * os.texi (System Environment): Added cygwin system-type. Index: lispref/objects.texi =================================================================== RCS file: /cvsroot/emacs/emacs/lispref/objects.texi,v retrieving revision 1.32 diff -u -r1.32 objects.texi --- lispref/objects.texi 4 Feb 2003 14:47:54 -0000 1.32 +++ lispref/objects.texi 5 Feb 2003 19:31:14 -0000 @@ -258,11 +258,13 @@ You can use the same syntax for punctuation characters, but it is often a good idea to add a @samp{\} so that the Emacs commands for -editing Lisp code don't get confused. For example, @samp{?\ } is the +editing Lisp code don't get confused. For example, @samp{?\ } is a way to write the space character. If the character is @samp{\}, you @emph{must} use a second @samp{\} to quote it: @samp{?\\}. @cindex whitespace +@cindex space +@cindex @samp{\_} @cindex bell character @cindex @samp{\a} @cindex backspace @@ -279,12 +281,14 @@ @cindex @samp{\r} @cindex escape @cindex @samp{\e} - You can express the characters Control-g, backspace, tab, newline, -vertical tab, formfeed, return, del, and escape as @samp{?\a}, -@samp{?\b}, @samp{?\t}, @samp{?\n}, @samp{?\v}, @samp{?\f}, -@samp{?\r}, @samp{?\d}, and @samp{?\e}, respectively. Thus, + You can express the characters space, Control-g, backspace, tab, +newline, vertical tab, formfeed, return, del, and escape as +@samp{?\_}, @samp{?\a}, @samp{?\b}, @samp{?\t}, @samp{?\n}, +@samp{?\v}, @samp{?\f}, @samp{?\r}, @samp{?\d}, and @samp{?\e}, +respectively. Thus, @example +?\_ @result{} 32 ; @r{space, @key{SPC}} ?\a @result{} 7 ; @r{@kbd{C-g}} ?\b @result{} 8 ; @r{backspace, @key{BS}, @kbd{C-h}} ?\t @result{} 9 ; @r{tab, @key{TAB}, @kbd{C-i}} @@ -455,8 +459,8 @@ @samp{()\|;'`"#.,} to avoid confusing the Emacs commands for editing Lisp code. Also add a backslash before whitespace characters such as space, tab, newline and formfeed. However, it is cleaner to use one of -the easily readable escape sequences, such as @samp{\t}, instead of an -actual whitespace character such as a tab. +the easily readable escape sequences, such as @samp{\t} or @samp{\_}, +instead of an actual whitespace character such as a tab or space. @node Symbol Type @subsection Symbol Type Index: src/ChangeLog =================================================================== RCS file: /cvsroot/emacs/emacs/src/ChangeLog,v retrieving revision 1.3081 diff -u -r1.3081 ChangeLog --- src/ChangeLog 4 Feb 2003 11:52:10 -0000 1.3081 +++ src/ChangeLog 5 Feb 2003 19:31:14 -0000 @@ -1,3 +1,7 @@ +2003-02-05 Edward O'Connor + + * lread.c (read_escape): Handle new ?\_ escape character. + 2003-02-04 Richard M. Stallman * keyboard.c (echo_now): Update before_command_echo_length. Index: src/lread.c =================================================================== RCS file: /cvsroot/emacs/emacs/src/lread.c,v retrieving revision 1.305 diff -u -r1.305 lread.c --- src/lread.c 4 Feb 2003 14:03:12 -0000 1.305 +++ src/lread.c 5 Feb 2003 19:31:15 -0000 @@ -1655,6 +1655,8 @@ return '\v'; case '\n': return -1; + case '_': + return ' '; case ' ': if (stringp) return -1;