# HG changeset patch # User Karoly Lorentey # Date 1073282330 0 # Node ID 0b195559ccf5c305d5dc0a9692e8d259e91e7ec3 # Parent 7900111db01c4325d74962d2a95561253787bb2a# Parent 837280979573984e3b1386b67b112b1cfe083fae Merged in changes from CVS HEAD Patches applied: * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-17 Update from CVS * miles@gnu.org--gnu-2004/emacs--cvs-trunk--0--patch-18 Update from CVS git-archimport-id: lorentey@elte.hu--2004/emacs--multi-tty--0--patch-45 diff -r 7900111db01c -r 0b195559ccf5 lib-src/ChangeLog --- a/lib-src/ChangeLog Mon Jan 05 05:54:35 2004 +0000 +++ b/lib-src/ChangeLog Mon Jan 05 05:58:50 2004 +0000 @@ -1,3 +1,7 @@ +2004-01-04 Andreas Schwab + + * emacsclient.c (main): Fix socket name when using another user. + 2003-12-27 Paul Eggert * rcs2log (rlog_options): Append -rbranchtag if CVS/Tag indicates diff -r 7900111db01c -r 0b195559ccf5 lib-src/emacsclient.c --- a/lib-src/emacsclient.c Mon Jan 05 05:54:35 2004 +0000 +++ b/lib-src/emacsclient.c Mon Jan 05 05:58:50 2004 +0000 @@ -470,7 +470,7 @@ if (pw && (pw->pw_uid != geteuid ())) { /* We're running under su, apparently. */ - sprintf (server.sun_path, "/tmp/esrv%d-%s", + sprintf (server.sun_path, "/tmp/emacs%d-%s/server", (int) pw->pw_uid, system_name); sock_status = socket_status (server.sun_path); oerrno = errno; diff -r 7900111db01c -r 0b195559ccf5 lisp/ChangeLog --- a/lisp/ChangeLog Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/ChangeLog Mon Jan 05 05:58:50 2004 +0000 @@ -1,6 +1,38 @@ +2004-01-04 Karl Berry + + * emacs-lisp/copyright.el (copyright-regexp): allow the common + comment characters % and # in the copyright year notice, + as well as ;. + +2004-01-04 Per Abrahamsen + + * wid-edit.el (default): Define dummy :value-delete. + Reported by Jesper Harder . + +2004-01-03 Richard M. Stallman + + * progmodes/compile.el (compile-internal): Use point, not point-min, + for set-window-point. + + * textmodes/tex-mode.el (latex-find-indent): Avoid error at end of buf. + + * emacs-lisp/lisp-mnt.el (lm-section-end): require outline. + + * progmodes/grep.el (grep-mode-map): + Don't remap next-line, previous-line. + +2004-01-03 Eric M. Ludlam + + * speedbar.el (speedbar-edit-line): Change regexp to position + the cursor on the first character of this line's button. + +2004-01-03 Luc Teirlinck + + * subr.el (functionp): Doc fix. + 2004-01-03 Jesper Harder (tiny change) - * progmodes/idlwave.el (idlwave-make-tags): + * progmodes/idlwave.el (idlwave-make-tags): * textmodes/flyspell.el (flyspell-large-region):. * progmodes/make-mode.el (makefile-query-by-make-minus-q): * emulation/viper-util.el (viper-glob-unix-files): @@ -69,6 +101,9 @@ 2003-12-29 Richard M. Stallman + * mail/mail-utils.el (mail-unquote-printable-hexdigit): + Upcase the character. + * textmodes/flyspell.el (mail-mode-flyspell-verify): Search for header separator alone on a line, literally, and search for it backward, not forward. diff -r 7900111db01c -r 0b195559ccf5 lisp/emacs-lisp/copyright.el --- a/lisp/emacs-lisp/copyright.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/emacs-lisp/copyright.el Mon Jan 05 05:58:50 2004 +0000 @@ -1,6 +1,6 @@ ;;; copyright.el --- update the copyright notice in current buffer -;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003 +;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003, 2004 ;; Free Software Foundation, Inc. ;; Author: Daniel Pfeiffer @@ -47,7 +47,7 @@ (defcustom copyright-regexp "\\([]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ \\|[Cc]opyright\\s *:?\\s *[]\\)\ -\\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" +\\s *\\([1-9]\\([-0-9, ';%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" "*What your copyright notice looks like. The second \\( \\) construct must match the years." :group 'copyright diff -r 7900111db01c -r 0b195559ccf5 lisp/emacs-lisp/lisp-mnt.el --- a/lisp/emacs-lisp/lisp-mnt.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/emacs-lisp/lisp-mnt.el Mon Jan 05 05:58:50 2004 +0000 @@ -214,6 +214,7 @@ section of the same level or lower. The function `lisp-outline-level' is used to compute the level of a section. If no such section exists, return the end of the buffer." + (require 'outline) ;; for outline-regexp. (let ((start (lm-section-start header))) (when start (save-excursion diff -r 7900111db01c -r 0b195559ccf5 lisp/progmodes/compile.el --- a/lisp/progmodes/compile.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/progmodes/compile.el Mon Jan 05 05:58:50 2004 +0000 @@ -754,7 +754,7 @@ compilation-directory-stack (list default-directory)) (set-window-start outwin (point-min)) (or (eq outwin (selected-window)) - (set-window-point outwin (point-min))) + (set-window-point outwin (point))) ;; The setup function is called before compilation-set-window-height ;; so it can set the compilation-window-height buffer locally. (if compilation-process-setup-function diff -r 7900111db01c -r 0b195559ccf5 lisp/progmodes/grep.el --- a/lisp/progmodes/grep.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/progmodes/grep.el Mon Jan 05 05:58:50 2004 +0000 @@ -157,8 +157,9 @@ (define-key map " " 'scroll-up) (define-key map "\^?" 'scroll-down) - (define-key map [remap next-line] 'compilation-next-error) - (define-key map [remap previous-line] 'compilation-previous-error) + ;; This is intolerable -- rms +;;; (define-key map [remap next-line] 'compilation-next-error) +;;; (define-key map [remap previous-line] 'compilation-previous-error) (define-key map "\r" 'compile-goto-error) ;; ? (define-key map "n" 'next-error-no-select) diff -r 7900111db01c -r 0b195559ccf5 lisp/speedbar.el --- a/lisp/speedbar.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/speedbar.el Mon Jan 05 05:58:50 2004 +0000 @@ -3410,7 +3410,9 @@ (if (re-search-forward "[]>?}] [^ ]" (save-excursion (end-of-line) (point)) t) - (speedbar-do-function-pointer) + (progn + (forward-char -1) + (speedbar-do-function-pointer)) nil)) (speedbar-do-function-pointer))) diff -r 7900111db01c -r 0b195559ccf5 lisp/subr.el --- a/lisp/subr.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/subr.el Mon Jan 05 05:58:50 2004 +0000 @@ -2205,7 +2205,10 @@ (eq (car object) 'frame-configuration))) (defun functionp (object) - "Non-nil iff OBJECT is a type of object that can be called as a function." + "Non-nil if OBJECT is any kind of function or a special form. +Also non-nil if OBJECT is a symbol and its function definition is +\(recursively) a function or special form. This does not include +macros." (or (and (symbolp object) (fboundp object) (condition-case nil (setq object (indirect-function object)) diff -r 7900111db01c -r 0b195559ccf5 lisp/textmodes/tex-mode.el --- a/lisp/textmodes/tex-mode.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/textmodes/tex-mode.el Mon Jan 05 05:58:50 2004 +0000 @@ -2342,15 +2342,15 @@ (+ indent (current-column) tex-indent-item)) (t (let ((col (current-column))) - (if (not (eq (char-syntax char) ?\()) + (if (or (null char) (not (eq (char-syntax char) ?\())) ;; If the first char was not an open-paren, there's ;; a risk that this is really not an argument to the ;; macro at all. - (+ indent col) - (forward-sexp 1) - (if (< (line-end-position) - (save-excursion (forward-comment (point-max)) - (point))) + (+ indent col) + (forward-sexp 1) + (if (< (line-end-position) + (save-excursion (forward-comment (point-max)) + (point))) ;; we're indenting the first argument. (min (current-column) (+ tex-indent-arg col)) (skip-syntax-forward " ") diff -r 7900111db01c -r 0b195559ccf5 lisp/wid-edit.el --- a/lisp/wid-edit.el Mon Jan 05 05:54:35 2004 +0000 +++ b/lisp/wid-edit.el Mon Jan 05 05:58:50 2004 +0000 @@ -1,6 +1,6 @@ ;;; wid-edit.el --- Functions for creating and using widgets -*-byte-compile-dynamic: t;-*- ;; -;; Copyright (C) 1996,97,1999,2000,01,02,2003 Free Software Foundation, Inc. +;; Copyright (C) 1996,97,1999,2000,01,02,2003, 2004 Free Software Foundation, Inc. ;; ;; Author: Per Abrahamsen ;; Maintainer: FSF @@ -1348,6 +1348,7 @@ :copy 'identity :value-set 'widget-default-value-set :value-inline 'widget-default-value-inline + :value-delete 'ignore :default-get 'widget-default-default-get :menu-tag-get 'widget-default-menu-tag-get :validate #'ignore diff -r 7900111db01c -r 0b195559ccf5 lispref/ChangeLog --- a/lispref/ChangeLog Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/ChangeLog Mon Jan 05 05:58:50 2004 +0000 @@ -1,3 +1,21 @@ +2004-01-03 Richard M. Stallman + + * frames.texi (Frames and Windows): Delete frame-root-window. + +2004-01-03 Luc Teirlinck + + * eval.texi, hash.texi, help.texi, symbols.texi: Add anchors. + + * functions.texi: Various small changes in addition to the + following. + (What Is a Function): `functionp' returns nil for macros. Clarify + behavior of this and following functions for symbol arguments. + (Function Documentation): Add `\' in front of (fn @var{arglist}) + and explain why. + (Defining Functions): Mention DOCSTRING argument to `defalias'. + Add anchor. + (Mapping Functions): Add anchor. Unquote nil in mapcar* example. + 2004-01-01 Miles Bader * display.texi (Buttons): New section. diff -r 7900111db01c -r 0b195559ccf5 lispref/eval.texi --- a/lispref/eval.texi Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/eval.texi Mon Jan 05 05:58:50 2004 +0000 @@ -313,6 +313,7 @@ perform symbol function indirection explicitly. @c Emacs 19 feature +@anchor{Definition of indirect-function} @defun indirect-function function This function returns the meaning of @var{function} as a function. If @var{function} is a symbol, then it finds @var{function}'s function diff -r 7900111db01c -r 0b195559ccf5 lispref/frames.texi --- a/lispref/frames.texi Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/frames.texi Mon Jan 05 05:58:50 2004 +0000 @@ -933,10 +933,6 @@ Conversely, selecting a window for Emacs with @code{select-window} also makes that window selected within its frame. @xref{Selecting Windows}. -@defun frame-root-window frame -This function returns the window at the top left corner of @var{frame}. -@end defun - Another function that (usually) returns one of the windows in a given frame is @code{minibuffer-window}. @xref{Minibuffer Misc}. diff -r 7900111db01c -r 0b195559ccf5 lispref/functions.texi --- a/lispref/functions.texi Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/functions.texi Mon Jan 05 05:58:50 2004 +0000 @@ -113,10 +113,15 @@ @end table @defun functionp object -This function returns @code{t} if @var{object} is any kind of function, -or a special form or macro. +This function returns @code{t} if @var{object} is any kind of +function, or a special form, or, recursively, a symbol whose function +definition is a function or special form. (This does not include +macros.) @end defun +Unlike @code{functionp}, the next three functions do @emph{not} +treat a symbol as its function definition. + @defun subrp object This function returns @code{t} if @var{object} is a built-in function (i.e., a Lisp primitive). @@ -428,13 +433,14 @@ text like this: @example -(fn @var{arglist}) +\(fn @var{arglist}) @end example @noindent -following a blank line, with no newline following it inside the -documentation string. This feature is particularly useful for -macro definitions. +following a blank line, at the beginning of the line, with no newline +following it inside the documentation string. This feature is +particularly useful for macro definitions. The @samp{\} is used to +avoid confusing the Emacs motion commands. @node Function Names @section Naming a Function @@ -571,9 +577,15 @@ deliberate redefinition from unintentional redefinition. @end defspec -@defun defalias name definition +@anchor{Definition of defalias} +@defun defalias name definition &optional docstring This special form defines the symbol @var{name} as a function, with definition @var{definition} (which can be any valid Lisp function). +It returns @var{definition}. + +If @var{docstring} is non-@code{nil}, it becomes the function +documentation of @var{name}. Otherwise, any documentation provided by +@var{definition} is used. The proper place to use @code{defalias} is where a specific function name is being defined---especially where that name appears explicitly in @@ -587,7 +599,7 @@ @end defun You cannot create a new primitive function with @code{defun} or -@code{defalias}, but you use them to change the function definition of +@code{defalias}, but you can use them to change the function definition of any symbol, even one such as @code{car} or @code{x-popup-menu} whose normal definition is a primitive. However, this is risky: for instance, it is next to impossible to redefine @code{car} without @@ -700,8 +712,8 @@ @end group @end example -For an interesting example of using @code{apply}, see the description of -@code{mapcar}, in @ref{Mapping Functions}. +For an interesting example of using @code{apply}, see @ref{Definition +of mapcar}. @end defun @cindex functionals @@ -726,19 +738,21 @@ @section Mapping Functions @cindex mapping functions - A @dfn{mapping function} applies a given function to each element of a -list or other collection. Emacs Lisp has several such functions; -@code{mapcar} and @code{mapconcat}, which scan a list, are described -here. @xref{Creating Symbols}, for the function @code{mapatoms} which -maps over the symbols in an obarray. @xref{Hash Access}, for the -function @code{maphash} which maps over key/value associations in a -hash table. + A @dfn{mapping function} applies a given function (@emph{not} a +special form or macro) to each element of a list or other collection. +Emacs Lisp has several such functions; @code{mapcar} and +@code{mapconcat}, which scan a list, are described here. +@xref{Definition of mapatoms}, for the function @code{mapatoms} which +maps over the symbols in an obarray. @xref{Definition of maphash}, +for the function @code{maphash} which maps over key/value associations +in a hash table. These mapping functions do not allow char-tables because a char-table is a sparse array whose nominal range of indices is very large. To map over a char-table in a way that deals properly with its sparse nature, use the function @code{map-char-table} (@pxref{Char-Tables}). +@anchor{Definition of mapcar} @defun mapcar function sequence @code{mapcar} applies @var{function} to each element of @var{sequence} in turn, and returns a list of the results. @@ -770,7 +784,7 @@ "Apply FUNCTION to successive cars of all ARGS. Return the list of results." ;; @r{If no list is exhausted,} - (if (not (memq 'nil args)) + (if (not (memq nil args)) ;; @r{apply function to @sc{car}s.} (cons (apply function (mapcar 'car args)) (apply 'mapcar* function @@ -961,8 +975,8 @@ Contrast this with @code{quote}, in @ref{Quoting}. @end defspec - See @code{documentation} in @ref{Accessing Documentation}, for a -realistic example using @code{function} and an anonymous function. + @xref{describe-symbols example}, for a realistic example using +@code{function} and an anonymous function. @node Function Cells @section Accessing Function Cell Contents @@ -971,8 +985,8 @@ function cell of the symbol. The functions described here access, test, and set the function cell of symbols. - See also the function @code{indirect-function} in @ref{Function -Indirection}. + See also the function @code{indirect-function}. @xref{Definition of +indirect-function}. @defun symbol-function symbol @kindex void-function @@ -1027,8 +1041,9 @@ @defun fmakunbound symbol This function makes @var{symbol}'s function cell void, so that a -subsequent attempt to access this cell will cause a @code{void-function} -error. (See also @code{makunbound}, in @ref{Void Variables}.) +subsequent attempt to access this cell will cause a +@code{void-function} error. It returns @var{symbol}. (See also +@code{makunbound}, in @ref{Void Variables}.) @example @group @@ -1064,7 +1079,7 @@ Copying one symbol's function definition to another---in other words, making an alternate name for a function. (If you think of this as the definition of the new name, you should use @code{defalias} instead of -@code{fset}; see @ref{Defining Functions}.) +@code{fset}; see @ref{Definition of defalias}.) @item Giving a symbol a function definition that is not a list and therefore @@ -1305,7 +1320,7 @@ See @ref{Calling Functions}. @item indirect-function -See @ref{Function Indirection}. +See @ref{Definition of indirect-function}. @item interactive See @ref{Using Interactive}. diff -r 7900111db01c -r 0b195559ccf5 lispref/hash.texi --- a/lispref/hash.texi Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/hash.texi Mon Jan 05 05:58:50 2004 +0000 @@ -205,6 +205,7 @@ @end defun @tindex maphash +@anchor{Definition of maphash} @defun maphash function table This function calls @var{function} once for each of the associations in @var{table}. The function @var{function} should accept two diff -r 7900111db01c -r 0b195559ccf5 lispref/help.texi --- a/lispref/help.texi Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/help.texi Mon Jan 05 05:58:50 2004 +0000 @@ -156,6 +156,7 @@ @code{documentation-property}, to display the documentation strings for several symbols in a @samp{*Help*} buffer. +@anchor{describe-symbols example} @smallexample @group (defun describe-symbols (pattern) diff -r 7900111db01c -r 0b195559ccf5 lispref/symbols.texi --- a/lispref/symbols.texi Mon Jan 05 05:54:35 2004 +0000 +++ b/lispref/symbols.texi Mon Jan 05 05:58:50 2004 +0000 @@ -360,6 +360,7 @@ @code{read}. @end defvar +@anchor{Definition of mapatoms} @defun mapatoms function &optional obarray This function calls @var{function} once with each symbol in the obarray @var{obarray}. Then it returns @code{nil}. If @var{obarray} is diff -r 7900111db01c -r 0b195559ccf5 src/window.c --- a/src/window.c Mon Jan 05 05:54:35 2004 +0000 +++ b/src/window.c Mon Jan 05 05:58:50 2004 +0000 @@ -394,6 +394,17 @@ return XWINDOW (window); } +static struct window * +decode_any_window (window) + register Lisp_Object window; +{ + if (NILP (window)) + return XWINDOW (selected_window); + + CHECK_WINDOW (window); + return XWINDOW (window); +} + DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, doc: /* Return the buffer that WINDOW is displaying. */) (window) @@ -407,7 +418,7 @@ (window) Lisp_Object window; { - return decode_window (window)->total_lines; + return decode_any_window (window)->total_lines; } DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0, @@ -418,7 +429,7 @@ (window) Lisp_Object window; { - return make_number (window_box_text_cols (decode_window (window))); + return make_number (window_box_text_cols (decode_any_window (window))); } DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, @@ -491,7 +502,7 @@ (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), @@ -511,7 +522,7 @@ (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), @@ -530,7 +541,7 @@ (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) + WINDOW_LEFT_MARGIN_COLS (w) @@ -554,7 +565,7 @@ (window) Lisp_Object window; { - register struct window *w = decode_window (window); + register struct window *w = decode_any_window (window); return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) + WINDOW_LEFT_MARGIN_WIDTH (w) @@ -773,7 +784,7 @@ int x, y; Lisp_Object lx, ly; - CHECK_LIVE_WINDOW (window); + CHECK_WINDOW (window); w = XWINDOW (window); f = XFRAME (w->frame); CHECK_CONS (coordinates);