aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKaroly Lorentey2004-01-05 05:58:50 +0000
committerKaroly Lorentey2004-01-05 05:58:50 +0000
commit0221d2bfcbc9a3571fdbfbf3d8ad464aae4ffd24 (patch)
tree7a66b701aaab5c7f676880174d5a2d4720871f87
parent428a555ec5d5736a3eede739e9b42bd9d33b4364 (diff)
parent17b337762fe7df77aa8a6dfcea0109a267bea83d (diff)
downloademacs-0221d2bfcbc9a3571fdbfbf3d8ad464aae4ffd24.tar.gz
emacs-0221d2bfcbc9a3571fdbfbf3d8ad464aae4ffd24.zip
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
-rw-r--r--lib-src/ChangeLog4
-rw-r--r--lib-src/emacsclient.c2
-rw-r--r--lisp/ChangeLog37
-rw-r--r--lisp/emacs-lisp/copyright.el4
-rw-r--r--lisp/emacs-lisp/lisp-mnt.el1
-rw-r--r--lisp/progmodes/compile.el2
-rw-r--r--lisp/progmodes/grep.el5
-rw-r--r--lisp/speedbar.el4
-rw-r--r--lisp/subr.el5
-rw-r--r--lisp/textmodes/tex-mode.el12
-rw-r--r--lisp/wid-edit.el3
-rw-r--r--lispref/ChangeLog18
-rw-r--r--lispref/eval.texi1
-rw-r--r--lispref/frames.texi4
-rw-r--r--lispref/functions.texi67
-rw-r--r--lispref/hash.texi1
-rw-r--r--lispref/help.texi1
-rw-r--r--lispref/symbols.texi1
-rw-r--r--src/window.c25
19 files changed, 144 insertions, 53 deletions
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog
index 542761fda2f..0e6a568db49 100644
--- a/lib-src/ChangeLog
+++ b/lib-src/ChangeLog
@@ -1,3 +1,7 @@
12004-01-04 Andreas Schwab <schwab@suse.de>
2
3 * emacsclient.c (main): Fix socket name when using another user.
4
12003-12-27 Paul Eggert <eggert@twinsun.com> 52003-12-27 Paul Eggert <eggert@twinsun.com>
2 6
3 * rcs2log (rlog_options): Append -rbranchtag if CVS/Tag indicates 7 * rcs2log (rlog_options): Append -rbranchtag if CVS/Tag indicates
diff --git a/lib-src/emacsclient.c b/lib-src/emacsclient.c
index f45ca56c0d3..d737b2a11eb 100644
--- a/lib-src/emacsclient.c
+++ b/lib-src/emacsclient.c
@@ -470,7 +470,7 @@ main (argc, argv)
470 if (pw && (pw->pw_uid != geteuid ())) 470 if (pw && (pw->pw_uid != geteuid ()))
471 { 471 {
472 /* We're running under su, apparently. */ 472 /* We're running under su, apparently. */
473 sprintf (server.sun_path, "/tmp/esrv%d-%s", 473 sprintf (server.sun_path, "/tmp/emacs%d-%s/server",
474 (int) pw->pw_uid, system_name); 474 (int) pw->pw_uid, system_name);
475 sock_status = socket_status (server.sun_path); 475 sock_status = socket_status (server.sun_path);
476 oerrno = errno; 476 oerrno = errno;
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index de4f72cc020..14963f0ef8c 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,6 +1,38 @@
12004-01-04 Karl Berry <karl@gnu.org>
2
3 * emacs-lisp/copyright.el (copyright-regexp): allow the common
4 comment characters % and # in the copyright year notice,
5 as well as ;.
6
72004-01-04 Per Abrahamsen <abraham@dina.kvl.dk>
8
9 * wid-edit.el (default): Define dummy :value-delete.
10 Reported by Jesper Harder <harder@ifa.au.dk>.
11
122004-01-03 Richard M. Stallman <rms@gnu.org>
13
14 * progmodes/compile.el (compile-internal): Use point, not point-min,
15 for set-window-point.
16
17 * textmodes/tex-mode.el (latex-find-indent): Avoid error at end of buf.
18
19 * emacs-lisp/lisp-mnt.el (lm-section-end): require outline.
20
21 * progmodes/grep.el (grep-mode-map):
22 Don't remap next-line, previous-line.
23
242004-01-03 Eric M. Ludlam <eric@siege-engine.com>
25
26 * speedbar.el (speedbar-edit-line): Change regexp to position
27 the cursor on the first character of this line's button.
28
292004-01-03 Luc Teirlinck <teirllm@auburn.edu>
30
31 * subr.el (functionp): Doc fix.
32
12004-01-03 Jesper Harder <harder@ifa.au.dk> (tiny change) 332004-01-03 Jesper Harder <harder@ifa.au.dk> (tiny change)
2 34
3 * progmodes/idlwave.el (idlwave-make-tags): 35 * progmodes/idlwave.el (idlwave-make-tags):
4 * textmodes/flyspell.el (flyspell-large-region):. 36 * textmodes/flyspell.el (flyspell-large-region):.
5 * progmodes/make-mode.el (makefile-query-by-make-minus-q): 37 * progmodes/make-mode.el (makefile-query-by-make-minus-q):
6 * emulation/viper-util.el (viper-glob-unix-files): 38 * emulation/viper-util.el (viper-glob-unix-files):
@@ -69,6 +101,9 @@
69 101
702003-12-29 Richard M. Stallman <rms@gnu.org> 1022003-12-29 Richard M. Stallman <rms@gnu.org>
71 103
104 * mail/mail-utils.el (mail-unquote-printable-hexdigit):
105 Upcase the character.
106
72 * textmodes/flyspell.el (mail-mode-flyspell-verify): 107 * textmodes/flyspell.el (mail-mode-flyspell-verify):
73 Search for header separator alone on a line, literally, 108 Search for header separator alone on a line, literally,
74 and search for it backward, not forward. 109 and search for it backward, not forward.
diff --git a/lisp/emacs-lisp/copyright.el b/lisp/emacs-lisp/copyright.el
index fc0a5b74726..4532f7e5b77 100644
--- a/lisp/emacs-lisp/copyright.el
+++ b/lisp/emacs-lisp/copyright.el
@@ -1,6 +1,6 @@
1;;; copyright.el --- update the copyright notice in current buffer 1;;; copyright.el --- update the copyright notice in current buffer
2 2
3;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003 3;; Copyright (C) 1991, 92, 93, 94, 95, 1998, 2001, 2003, 2004
4;; Free Software Foundation, Inc. 4;; Free Software Foundation, Inc.
5 5
6;; Author: Daniel Pfeiffer <occitan@esperanto.org> 6;; Author: Daniel Pfeiffer <occitan@esperanto.org>
@@ -47,7 +47,7 @@ A value of nil means to search whole buffer."
47(defcustom copyright-regexp 47(defcustom copyright-regexp
48 "\\([©Ž©]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\ 48 "\\([©Ž©]\\|@copyright{}\\|[Cc]opyright\\s *:?\\s *\\(?:(C)\\)?\
49\\|[Cc]opyright\\s *:?\\s *[©Ž©]\\)\ 49\\|[Cc]opyright\\s *:?\\s *[©Ž©]\\)\
50\\s *\\([1-9]\\([-0-9, ';\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)" 50\\s *\\([1-9]\\([-0-9, ';%#\n\t]\\|\\s<\\|\\s>\\)*[0-9]+\\)"
51 "*What your copyright notice looks like. 51 "*What your copyright notice looks like.
52The second \\( \\) construct must match the years." 52The second \\( \\) construct must match the years."
53 :group 'copyright 53 :group 'copyright
diff --git a/lisp/emacs-lisp/lisp-mnt.el b/lisp/emacs-lisp/lisp-mnt.el
index aeb7fb2258d..245772dfc54 100644
--- a/lisp/emacs-lisp/lisp-mnt.el
+++ b/lisp/emacs-lisp/lisp-mnt.el
@@ -214,6 +214,7 @@ The end of the section is defined as the beginning of the next
214section of the same level or lower. The function 214section of the same level or lower. The function
215`lisp-outline-level' is used to compute the level of a section. 215`lisp-outline-level' is used to compute the level of a section.
216If no such section exists, return the end of the buffer." 216If no such section exists, return the end of the buffer."
217 (require 'outline) ;; for outline-regexp.
217 (let ((start (lm-section-start header))) 218 (let ((start (lm-section-start header)))
218 (when start 219 (when start
219 (save-excursion 220 (save-excursion
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el
index 6d76fe3384a..de050411411 100644
--- a/lisp/progmodes/compile.el
+++ b/lisp/progmodes/compile.el
@@ -754,7 +754,7 @@ Returns the compilation buffer created."
754 compilation-directory-stack (list default-directory)) 754 compilation-directory-stack (list default-directory))
755 (set-window-start outwin (point-min)) 755 (set-window-start outwin (point-min))
756 (or (eq outwin (selected-window)) 756 (or (eq outwin (selected-window))
757 (set-window-point outwin (point-min))) 757 (set-window-point outwin (point)))
758 ;; The setup function is called before compilation-set-window-height 758 ;; The setup function is called before compilation-set-window-height
759 ;; so it can set the compilation-window-height buffer locally. 759 ;; so it can set the compilation-window-height buffer locally.
760 (if compilation-process-setup-function 760 (if compilation-process-setup-function
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el
index 35a5780aa45..cb8fcf6e042 100644
--- a/lisp/progmodes/grep.el
+++ b/lisp/progmodes/grep.el
@@ -157,8 +157,9 @@ The following place holders should be present in the string:
157 (define-key map " " 'scroll-up) 157 (define-key map " " 'scroll-up)
158 (define-key map "\^?" 'scroll-down) 158 (define-key map "\^?" 'scroll-down)
159 159
160 (define-key map [remap next-line] 'compilation-next-error) 160 ;; This is intolerable -- rms
161 (define-key map [remap previous-line] 'compilation-previous-error) 161;;; (define-key map [remap next-line] 'compilation-next-error)
162;;; (define-key map [remap previous-line] 'compilation-previous-error)
162 163
163 (define-key map "\r" 'compile-goto-error) ;; ? 164 (define-key map "\r" 'compile-goto-error) ;; ?
164 (define-key map "n" 'next-error-no-select) 165 (define-key map "n" 'next-error-no-select)
diff --git a/lisp/speedbar.el b/lisp/speedbar.el
index 5eef1359fad..f8e9386585d 100644
--- a/lisp/speedbar.el
+++ b/lisp/speedbar.el
@@ -3410,7 +3410,9 @@ directory with these items."
3410 (if (re-search-forward "[]>?}] [^ ]" 3410 (if (re-search-forward "[]>?}] [^ ]"
3411 (save-excursion (end-of-line) (point)) 3411 (save-excursion (end-of-line) (point))
3412 t) 3412 t)
3413 (speedbar-do-function-pointer) 3413 (progn
3414 (forward-char -1)
3415 (speedbar-do-function-pointer))
3414 nil)) 3416 nil))
3415 (speedbar-do-function-pointer))) 3417 (speedbar-do-function-pointer)))
3416 3418
diff --git a/lisp/subr.el b/lisp/subr.el
index a2b09d6b63b..b251ab6573a 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -2205,7 +2205,10 @@ configuration."
2205 (eq (car object) 'frame-configuration))) 2205 (eq (car object) 'frame-configuration)))
2206 2206
2207(defun functionp (object) 2207(defun functionp (object)
2208 "Non-nil iff OBJECT is a type of object that can be called as a function." 2208 "Non-nil if OBJECT is any kind of function or a special form.
2209Also non-nil if OBJECT is a symbol and its function definition is
2210\(recursively) a function or special form. This does not include
2211macros."
2209 (or (and (symbolp object) (fboundp object) 2212 (or (and (symbolp object) (fboundp object)
2210 (condition-case nil 2213 (condition-case nil
2211 (setq object (indirect-function object)) 2214 (setq object (indirect-function object))
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el
index 87dc8fcbc00..68b408af081 100644
--- a/lisp/textmodes/tex-mode.el
+++ b/lisp/textmodes/tex-mode.el
@@ -2342,15 +2342,15 @@ There might be text before point."
2342 (+ indent (current-column) tex-indent-item)) 2342 (+ indent (current-column) tex-indent-item))
2343 (t 2343 (t
2344 (let ((col (current-column))) 2344 (let ((col (current-column)))
2345 (if (not (eq (char-syntax char) ?\()) 2345 (if (or (null char) (not (eq (char-syntax char) ?\()))
2346 ;; If the first char was not an open-paren, there's 2346 ;; If the first char was not an open-paren, there's
2347 ;; a risk that this is really not an argument to the 2347 ;; a risk that this is really not an argument to the
2348 ;; macro at all. 2348 ;; macro at all.
2349 (+ indent col) 2349 (+ indent col)
2350 (forward-sexp 1) 2350 (forward-sexp 1)
2351 (if (< (line-end-position) 2351 (if (< (line-end-position)
2352 (save-excursion (forward-comment (point-max)) 2352 (save-excursion (forward-comment (point-max))
2353 (point))) 2353 (point)))
2354 ;; we're indenting the first argument. 2354 ;; we're indenting the first argument.
2355 (min (current-column) (+ tex-indent-arg col)) 2355 (min (current-column) (+ tex-indent-arg col))
2356 (skip-syntax-forward " ") 2356 (skip-syntax-forward " ")
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el
index 63a254d1d67..2392ccdfb47 100644
--- a/lisp/wid-edit.el
+++ b/lisp/wid-edit.el
@@ -1,6 +1,6 @@
1;;; wid-edit.el --- Functions for creating and using widgets -*-byte-compile-dynamic: t;-*- 1;;; wid-edit.el --- Functions for creating and using widgets -*-byte-compile-dynamic: t;-*-
2;; 2;;
3;; Copyright (C) 1996,97,1999,2000,01,02,2003 Free Software Foundation, Inc. 3;; Copyright (C) 1996,97,1999,2000,01,02,2003, 2004 Free Software Foundation, Inc.
4;; 4;;
5;; Author: Per Abrahamsen <abraham@dina.kvl.dk> 5;; Author: Per Abrahamsen <abraham@dina.kvl.dk>
6;; Maintainer: FSF 6;; Maintainer: FSF
@@ -1348,6 +1348,7 @@ The value of the :type attribute should be an unconverted widget type."
1348 :copy 'identity 1348 :copy 'identity
1349 :value-set 'widget-default-value-set 1349 :value-set 'widget-default-value-set
1350 :value-inline 'widget-default-value-inline 1350 :value-inline 'widget-default-value-inline
1351 :value-delete 'ignore
1351 :default-get 'widget-default-default-get 1352 :default-get 'widget-default-default-get
1352 :menu-tag-get 'widget-default-menu-tag-get 1353 :menu-tag-get 'widget-default-menu-tag-get
1353 :validate #'ignore 1354 :validate #'ignore
diff --git a/lispref/ChangeLog b/lispref/ChangeLog
index b3b4abf2460..1ef5bca1d46 100644
--- a/lispref/ChangeLog
+++ b/lispref/ChangeLog
@@ -1,3 +1,21 @@
12004-01-03 Richard M. Stallman <rms@gnu.org>
2
3 * frames.texi (Frames and Windows): Delete frame-root-window.
4
52004-01-03 Luc Teirlinck <teirllm@auburn.edu>
6
7 * eval.texi, hash.texi, help.texi, symbols.texi: Add anchors.
8
9 * functions.texi: Various small changes in addition to the
10 following.
11 (What Is a Function): `functionp' returns nil for macros. Clarify
12 behavior of this and following functions for symbol arguments.
13 (Function Documentation): Add `\' in front of (fn @var{arglist})
14 and explain why.
15 (Defining Functions): Mention DOCSTRING argument to `defalias'.
16 Add anchor.
17 (Mapping Functions): Add anchor. Unquote nil in mapcar* example.
18
12004-01-01 Miles Bader <miles@gnu.org> 192004-01-01 Miles Bader <miles@gnu.org>
2 20
3 * display.texi (Buttons): New section. 21 * display.texi (Buttons): New section.
diff --git a/lispref/eval.texi b/lispref/eval.texi
index fcfde5849dd..7d1ebb9d307 100644
--- a/lispref/eval.texi
+++ b/lispref/eval.texi
@@ -313,6 +313,7 @@ symbol function indirection when calling @code{erste}.
313perform symbol function indirection explicitly. 313perform symbol function indirection explicitly.
314 314
315@c Emacs 19 feature 315@c Emacs 19 feature
316@anchor{Definition of indirect-function}
316@defun indirect-function function 317@defun indirect-function function
317This function returns the meaning of @var{function} as a function. If 318This function returns the meaning of @var{function} as a function. If
318@var{function} is a symbol, then it finds @var{function}'s function 319@var{function} is a symbol, then it finds @var{function}'s function
diff --git a/lispref/frames.texi b/lispref/frames.texi
index ec3c1c6dc7c..a9b29332200 100644
--- a/lispref/frames.texi
+++ b/lispref/frames.texi
@@ -933,10 +933,6 @@ selected window.
933 Conversely, selecting a window for Emacs with @code{select-window} also 933 Conversely, selecting a window for Emacs with @code{select-window} also
934makes that window selected within its frame. @xref{Selecting Windows}. 934makes that window selected within its frame. @xref{Selecting Windows}.
935 935
936@defun frame-root-window frame
937This function returns the window at the top left corner of @var{frame}.
938@end defun
939
940 Another function that (usually) returns one of the windows in a given 936 Another function that (usually) returns one of the windows in a given
941frame is @code{minibuffer-window}. @xref{Minibuffer Misc}. 937frame is @code{minibuffer-window}. @xref{Minibuffer Misc}.
942 938
diff --git a/lispref/functions.texi b/lispref/functions.texi
index 4ee101ca871..4b727e76506 100644
--- a/lispref/functions.texi
+++ b/lispref/functions.texi
@@ -113,10 +113,15 @@ byte compiler. @xref{Byte-Code Type}.
113@end table 113@end table
114 114
115@defun functionp object 115@defun functionp object
116This function returns @code{t} if @var{object} is any kind of function, 116This function returns @code{t} if @var{object} is any kind of
117or a special form or macro. 117function, or a special form, or, recursively, a symbol whose function
118definition is a function or special form. (This does not include
119macros.)
118@end defun 120@end defun
119 121
122Unlike @code{functionp}, the next three functions do @emph{not}
123treat a symbol as its function definition.
124
120@defun subrp object 125@defun subrp object
121This function returns @code{t} if @var{object} is a built-in function 126This function returns @code{t} if @var{object} is a built-in function
122(i.e., a Lisp primitive). 127(i.e., a Lisp primitive).
@@ -428,13 +433,14 @@ conventions different from the actual function arguments. Write
428text like this: 433text like this:
429 434
430@example 435@example
431(fn @var{arglist}) 436\(fn @var{arglist})
432@end example 437@end example
433 438
434@noindent 439@noindent
435following a blank line, with no newline following it inside the 440following a blank line, at the beginning of the line, with no newline
436documentation string. This feature is particularly useful for 441following it inside the documentation string. This feature is
437macro definitions. 442particularly useful for macro definitions. The @samp{\} is used to
443avoid confusing the Emacs motion commands.
438 444
439@node Function Names 445@node Function Names
440@section Naming a Function 446@section Naming a Function
@@ -571,9 +577,15 @@ defined is often done deliberately, and there is no way to distinguish
571deliberate redefinition from unintentional redefinition. 577deliberate redefinition from unintentional redefinition.
572@end defspec 578@end defspec
573 579
574@defun defalias name definition 580@anchor{Definition of defalias}
581@defun defalias name definition &optional docstring
575This special form defines the symbol @var{name} as a function, with 582This special form defines the symbol @var{name} as a function, with
576definition @var{definition} (which can be any valid Lisp function). 583definition @var{definition} (which can be any valid Lisp function).
584It returns @var{definition}.
585
586If @var{docstring} is non-@code{nil}, it becomes the function
587documentation of @var{name}. Otherwise, any documentation provided by
588@var{definition} is used.
577 589
578The proper place to use @code{defalias} is where a specific function 590The proper place to use @code{defalias} is where a specific function
579name is being defined---especially where that name appears explicitly in 591name is being defined---especially where that name appears explicitly in
@@ -587,7 +599,7 @@ records.
587@end defun 599@end defun
588 600
589 You cannot create a new primitive function with @code{defun} or 601 You cannot create a new primitive function with @code{defun} or
590@code{defalias}, but you use them to change the function definition of 602@code{defalias}, but you can use them to change the function definition of
591any symbol, even one such as @code{car} or @code{x-popup-menu} whose 603any symbol, even one such as @code{car} or @code{x-popup-menu} whose
592normal definition is a primitive. However, this is risky: for 604normal definition is a primitive. However, this is risky: for
593instance, it is next to impossible to redefine @code{car} without 605instance, it is next to impossible to redefine @code{car} without
@@ -700,8 +712,8 @@ primitive function; special forms and macros do not make sense in
700@end group 712@end group
701@end example 713@end example
702 714
703For an interesting example of using @code{apply}, see the description of 715For an interesting example of using @code{apply}, see @ref{Definition
704@code{mapcar}, in @ref{Mapping Functions}. 716of mapcar}.
705@end defun 717@end defun
706 718
707@cindex functionals 719@cindex functionals
@@ -726,19 +738,21 @@ This function ignores any arguments and returns @code{nil}.
726@section Mapping Functions 738@section Mapping Functions
727@cindex mapping functions 739@cindex mapping functions
728 740
729 A @dfn{mapping function} applies a given function to each element of a 741 A @dfn{mapping function} applies a given function (@emph{not} a
730list or other collection. Emacs Lisp has several such functions; 742special form or macro) to each element of a list or other collection.
731@code{mapcar} and @code{mapconcat}, which scan a list, are described 743Emacs Lisp has several such functions; @code{mapcar} and
732here. @xref{Creating Symbols}, for the function @code{mapatoms} which 744@code{mapconcat}, which scan a list, are described here.
733maps over the symbols in an obarray. @xref{Hash Access}, for the 745@xref{Definition of mapatoms}, for the function @code{mapatoms} which
734function @code{maphash} which maps over key/value associations in a 746maps over the symbols in an obarray. @xref{Definition of maphash},
735hash table. 747for the function @code{maphash} which maps over key/value associations
748in a hash table.
736 749
737 These mapping functions do not allow char-tables because a char-table 750 These mapping functions do not allow char-tables because a char-table
738is a sparse array whose nominal range of indices is very large. To map 751is a sparse array whose nominal range of indices is very large. To map
739over a char-table in a way that deals properly with its sparse nature, 752over a char-table in a way that deals properly with its sparse nature,
740use the function @code{map-char-table} (@pxref{Char-Tables}). 753use the function @code{map-char-table} (@pxref{Char-Tables}).
741 754
755@anchor{Definition of mapcar}
742@defun mapcar function sequence 756@defun mapcar function sequence
743@code{mapcar} applies @var{function} to each element of @var{sequence} 757@code{mapcar} applies @var{function} to each element of @var{sequence}
744in turn, and returns a list of the results. 758in turn, and returns a list of the results.
@@ -770,7 +784,7 @@ length of @var{sequence}.
770 "Apply FUNCTION to successive cars of all ARGS. 784 "Apply FUNCTION to successive cars of all ARGS.
771Return the list of results." 785Return the list of results."
772 ;; @r{If no list is exhausted,} 786 ;; @r{If no list is exhausted,}
773 (if (not (memq 'nil args)) 787 (if (not (memq nil args))
774 ;; @r{apply function to @sc{car}s.} 788 ;; @r{apply function to @sc{car}s.}
775 (cons (apply function (mapcar 'car args)) 789 (cons (apply function (mapcar 'car args))
776 (apply 'mapcar* function 790 (apply 'mapcar* function
@@ -961,8 +975,8 @@ to be used only as a function, and therefore can safely be compiled.
961Contrast this with @code{quote}, in @ref{Quoting}. 975Contrast this with @code{quote}, in @ref{Quoting}.
962@end defspec 976@end defspec
963 977
964 See @code{documentation} in @ref{Accessing Documentation}, for a 978 @xref{describe-symbols example}, for a realistic example using
965realistic example using @code{function} and an anonymous function. 979@code{function} and an anonymous function.
966 980
967@node Function Cells 981@node Function Cells
968@section Accessing Function Cell Contents 982@section Accessing Function Cell Contents
@@ -971,8 +985,8 @@ realistic example using @code{function} and an anonymous function.
971function cell of the symbol. The functions described here access, test, 985function cell of the symbol. The functions described here access, test,
972and set the function cell of symbols. 986and set the function cell of symbols.
973 987
974 See also the function @code{indirect-function} in @ref{Function 988 See also the function @code{indirect-function}. @xref{Definition of
975Indirection}. 989indirect-function}.
976 990
977@defun symbol-function symbol 991@defun symbol-function symbol
978@kindex void-function 992@kindex void-function
@@ -1027,8 +1041,9 @@ is a legitimate function.
1027 1041
1028@defun fmakunbound symbol 1042@defun fmakunbound symbol
1029This function makes @var{symbol}'s function cell void, so that a 1043This function makes @var{symbol}'s function cell void, so that a
1030subsequent attempt to access this cell will cause a @code{void-function} 1044subsequent attempt to access this cell will cause a
1031error. (See also @code{makunbound}, in @ref{Void Variables}.) 1045@code{void-function} error. It returns @var{symbol}. (See also
1046@code{makunbound}, in @ref{Void Variables}.)
1032 1047
1033@example 1048@example
1034@group 1049@group
@@ -1064,7 +1079,7 @@ There are three normal uses of this function:
1064Copying one symbol's function definition to another---in other words, 1079Copying one symbol's function definition to another---in other words,
1065making an alternate name for a function. (If you think of this as the 1080making an alternate name for a function. (If you think of this as the
1066definition of the new name, you should use @code{defalias} instead of 1081definition of the new name, you should use @code{defalias} instead of
1067@code{fset}; see @ref{Defining Functions}.) 1082@code{fset}; see @ref{Definition of defalias}.)
1068 1083
1069@item 1084@item
1070Giving a symbol a function definition that is not a list and therefore 1085Giving a symbol a function definition that is not a list and therefore
@@ -1305,7 +1320,7 @@ See @ref{Anonymous Functions}.
1305See @ref{Calling Functions}. 1320See @ref{Calling Functions}.
1306 1321
1307@item indirect-function 1322@item indirect-function
1308See @ref{Function Indirection}. 1323See @ref{Definition of indirect-function}.
1309 1324
1310@item interactive 1325@item interactive
1311See @ref{Using Interactive}. 1326See @ref{Using Interactive}.
diff --git a/lispref/hash.texi b/lispref/hash.texi
index a27894fa24b..909c7fb0b7c 100644
--- a/lispref/hash.texi
+++ b/lispref/hash.texi
@@ -205,6 +205,7 @@ table.
205@end defun 205@end defun
206 206
207@tindex maphash 207@tindex maphash
208@anchor{Definition of maphash}
208@defun maphash function table 209@defun maphash function table
209This function calls @var{function} once for each of the associations in 210This function calls @var{function} once for each of the associations in
210@var{table}. The function @var{function} should accept two 211@var{table}. The function @var{function} should accept two
diff --git a/lispref/help.texi b/lispref/help.texi
index 343ffb66078..dc14b0226b5 100644
--- a/lispref/help.texi
+++ b/lispref/help.texi
@@ -156,6 +156,7 @@ Here is an example of using the two functions, @code{documentation} and
156@code{documentation-property}, to display the documentation strings for 156@code{documentation-property}, to display the documentation strings for
157several symbols in a @samp{*Help*} buffer. 157several symbols in a @samp{*Help*} buffer.
158 158
159@anchor{describe-symbols example}
159@smallexample 160@smallexample
160@group 161@group
161(defun describe-symbols (pattern) 162(defun describe-symbols (pattern)
diff --git a/lispref/symbols.texi b/lispref/symbols.texi
index 6cde2115259..632f2cc5174 100644
--- a/lispref/symbols.texi
+++ b/lispref/symbols.texi
@@ -360,6 +360,7 @@ This variable is the standard obarray for use by @code{intern} and
360@code{read}. 360@code{read}.
361@end defvar 361@end defvar
362 362
363@anchor{Definition of mapatoms}
363@defun mapatoms function &optional obarray 364@defun mapatoms function &optional obarray
364This function calls @var{function} once with each symbol in the obarray 365This function calls @var{function} once with each symbol in the obarray
365@var{obarray}. Then it returns @code{nil}. If @var{obarray} is 366@var{obarray}. Then it returns @code{nil}. If @var{obarray} is
diff --git a/src/window.c b/src/window.c
index c4d896532b1..f3f3c6b8bf0 100644
--- a/src/window.c
+++ b/src/window.c
@@ -394,6 +394,17 @@ decode_window (window)
394 return XWINDOW (window); 394 return XWINDOW (window);
395} 395}
396 396
397static struct window *
398decode_any_window (window)
399 register Lisp_Object window;
400{
401 if (NILP (window))
402 return XWINDOW (selected_window);
403
404 CHECK_WINDOW (window);
405 return XWINDOW (window);
406}
407
397DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, 408DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0,
398 doc: /* Return the buffer that WINDOW is displaying. */) 409 doc: /* Return the buffer that WINDOW is displaying. */)
399 (window) 410 (window)
@@ -407,7 +418,7 @@ DEFUN ("window-height", Fwindow_height, Swindow_height, 0, 1, 0,
407 (window) 418 (window)
408 Lisp_Object window; 419 Lisp_Object window;
409{ 420{
410 return decode_window (window)->total_lines; 421 return decode_any_window (window)->total_lines;
411} 422}
412 423
413DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0, 424DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0,
@@ -418,7 +429,7 @@ use (let ((edges (window-edges))) (- (nth 2 edges) (nth 0 edges))). */)
418 (window) 429 (window)
419 Lisp_Object window; 430 Lisp_Object window;
420{ 431{
421 return make_number (window_box_text_cols (decode_window (window))); 432 return make_number (window_box_text_cols (decode_any_window (window)));
422} 433}
423 434
424DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, 435DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0,
@@ -491,7 +502,7 @@ To get the edges of the actual text area, use `window-inside-edges'. */)
491 (window) 502 (window)
492 Lisp_Object window; 503 Lisp_Object window;
493{ 504{
494 register struct window *w = decode_window (window); 505 register struct window *w = decode_any_window (window);
495 506
496 return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)), 507 return Fcons (make_number (WINDOW_LEFT_EDGE_COL (w)),
497 Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)), 508 Fcons (make_number (WINDOW_TOP_EDGE_LINE (w)),
@@ -511,7 +522,7 @@ To get the edges of the actual text area, use `window-inside-pixel-edges'. */)
511 (window) 522 (window)
512 Lisp_Object window; 523 Lisp_Object window;
513{ 524{
514 register struct window *w = decode_window (window); 525 register struct window *w = decode_any_window (window);
515 526
516 return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)), 527 return Fcons (make_number (WINDOW_LEFT_EDGE_X (w)),
517 Fcons (make_number (WINDOW_TOP_EDGE_Y (w)), 528 Fcons (make_number (WINDOW_TOP_EDGE_Y (w)),
@@ -530,7 +541,7 @@ display margins, fringes, header line, and/or mode line. */)
530 (window) 541 (window)
531 Lisp_Object window; 542 Lisp_Object window;
532{ 543{
533 register struct window *w = decode_window (window); 544 register struct window *w = decode_any_window (window);
534 545
535 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w) 546 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_COL (w)
536 + WINDOW_LEFT_MARGIN_COLS (w) 547 + WINDOW_LEFT_MARGIN_COLS (w)
@@ -554,7 +565,7 @@ display margins, fringes, header line, and/or mode line. */)
554 (window) 565 (window)
555 Lisp_Object window; 566 Lisp_Object window;
556{ 567{
557 register struct window *w = decode_window (window); 568 register struct window *w = decode_any_window (window);
558 569
559 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w) 570 return list4 (make_number (WINDOW_BOX_LEFT_EDGE_X (w)
560 + WINDOW_LEFT_MARGIN_WIDTH (w) 571 + WINDOW_LEFT_MARGIN_WIDTH (w)
@@ -773,7 +784,7 @@ If they are in the windows's left or right marginal areas, `left-margin'\n\
773 int x, y; 784 int x, y;
774 Lisp_Object lx, ly; 785 Lisp_Object lx, ly;
775 786
776 CHECK_LIVE_WINDOW (window); 787 CHECK_WINDOW (window);
777 w = XWINDOW (window); 788 w = XWINDOW (window);
778 f = XFRAME (w->frame); 789 f = XFRAME (w->frame);
779 CHECK_CONS (coordinates); 790 CHECK_CONS (coordinates);