diff options
| author | Karoly Lorentey | 2004-01-05 05:58:50 +0000 |
|---|---|---|
| committer | Karoly Lorentey | 2004-01-05 05:58:50 +0000 |
| commit | 0221d2bfcbc9a3571fdbfbf3d8ad464aae4ffd24 (patch) | |
| tree | 7a66b701aaab5c7f676880174d5a2d4720871f87 | |
| parent | 428a555ec5d5736a3eede739e9b42bd9d33b4364 (diff) | |
| parent | 17b337762fe7df77aa8a6dfcea0109a267bea83d (diff) | |
| download | emacs-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/ChangeLog | 4 | ||||
| -rw-r--r-- | lib-src/emacsclient.c | 2 | ||||
| -rw-r--r-- | lisp/ChangeLog | 37 | ||||
| -rw-r--r-- | lisp/emacs-lisp/copyright.el | 4 | ||||
| -rw-r--r-- | lisp/emacs-lisp/lisp-mnt.el | 1 | ||||
| -rw-r--r-- | lisp/progmodes/compile.el | 2 | ||||
| -rw-r--r-- | lisp/progmodes/grep.el | 5 | ||||
| -rw-r--r-- | lisp/speedbar.el | 4 | ||||
| -rw-r--r-- | lisp/subr.el | 5 | ||||
| -rw-r--r-- | lisp/textmodes/tex-mode.el | 12 | ||||
| -rw-r--r-- | lisp/wid-edit.el | 3 | ||||
| -rw-r--r-- | lispref/ChangeLog | 18 | ||||
| -rw-r--r-- | lispref/eval.texi | 1 | ||||
| -rw-r--r-- | lispref/frames.texi | 4 | ||||
| -rw-r--r-- | lispref/functions.texi | 67 | ||||
| -rw-r--r-- | lispref/hash.texi | 1 | ||||
| -rw-r--r-- | lispref/help.texi | 1 | ||||
| -rw-r--r-- | lispref/symbols.texi | 1 | ||||
| -rw-r--r-- | src/window.c | 25 |
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 @@ | |||
| 1 | 2004-01-04 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * emacsclient.c (main): Fix socket name when using another user. | ||
| 4 | |||
| 1 | 2003-12-27 Paul Eggert <eggert@twinsun.com> | 5 | 2003-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 @@ | |||
| 1 | 2004-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 | |||
| 7 | 2004-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 | |||
| 12 | 2004-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 | |||
| 24 | 2004-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 | |||
| 29 | 2004-01-03 Luc Teirlinck <teirllm@auburn.edu> | ||
| 30 | |||
| 31 | * subr.el (functionp): Doc fix. | ||
| 32 | |||
| 1 | 2004-01-03 Jesper Harder <harder@ifa.au.dk> (tiny change) | 33 | 2004-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 | ||
| 70 | 2003-12-29 Richard M. Stallman <rms@gnu.org> | 102 | 2003-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. |
| 52 | The second \\( \\) construct must match the years." | 52 | The 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 | |||
| 214 | section of the same level or lower. The function | 214 | section 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. |
| 216 | If no such section exists, return the end of the buffer." | 216 | If 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. |
| 2209 | Also non-nil if OBJECT is a symbol and its function definition is | ||
| 2210 | \(recursively) a function or special form. This does not include | ||
| 2211 | macros." | ||
| 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 @@ | |||
| 1 | 2004-01-03 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * frames.texi (Frames and Windows): Delete frame-root-window. | ||
| 4 | |||
| 5 | 2004-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 | |||
| 1 | 2004-01-01 Miles Bader <miles@gnu.org> | 19 | 2004-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}. | |||
| 313 | perform symbol function indirection explicitly. | 313 | perform 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 |
| 317 | This function returns the meaning of @var{function} as a function. If | 318 | This 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 |
| 934 | makes that window selected within its frame. @xref{Selecting Windows}. | 934 | makes that window selected within its frame. @xref{Selecting Windows}. |
| 935 | 935 | ||
| 936 | @defun frame-root-window frame | ||
| 937 | This 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 |
| 941 | frame is @code{minibuffer-window}. @xref{Minibuffer Misc}. | 937 | frame 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 |
| 116 | This function returns @code{t} if @var{object} is any kind of function, | 116 | This function returns @code{t} if @var{object} is any kind of |
| 117 | or a special form or macro. | 117 | function, or a special form, or, recursively, a symbol whose function |
| 118 | definition is a function or special form. (This does not include | ||
| 119 | macros.) | ||
| 118 | @end defun | 120 | @end defun |
| 119 | 121 | ||
| 122 | Unlike @code{functionp}, the next three functions do @emph{not} | ||
| 123 | treat a symbol as its function definition. | ||
| 124 | |||
| 120 | @defun subrp object | 125 | @defun subrp object |
| 121 | This function returns @code{t} if @var{object} is a built-in function | 126 | This 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 | |||
| 428 | text like this: | 433 | text 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 |
| 435 | following a blank line, with no newline following it inside the | 440 | following a blank line, at the beginning of the line, with no newline |
| 436 | documentation string. This feature is particularly useful for | 441 | following it inside the documentation string. This feature is |
| 437 | macro definitions. | 442 | particularly useful for macro definitions. The @samp{\} is used to |
| 443 | avoid 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 | |||
| 571 | deliberate redefinition from unintentional redefinition. | 577 | deliberate 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 | ||
| 575 | This special form defines the symbol @var{name} as a function, with | 582 | This special form defines the symbol @var{name} as a function, with |
| 576 | definition @var{definition} (which can be any valid Lisp function). | 583 | definition @var{definition} (which can be any valid Lisp function). |
| 584 | It returns @var{definition}. | ||
| 585 | |||
| 586 | If @var{docstring} is non-@code{nil}, it becomes the function | ||
| 587 | documentation of @var{name}. Otherwise, any documentation provided by | ||
| 588 | @var{definition} is used. | ||
| 577 | 589 | ||
| 578 | The proper place to use @code{defalias} is where a specific function | 590 | The proper place to use @code{defalias} is where a specific function |
| 579 | name is being defined---especially where that name appears explicitly in | 591 | name 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 |
| 591 | any symbol, even one such as @code{car} or @code{x-popup-menu} whose | 603 | any symbol, even one such as @code{car} or @code{x-popup-menu} whose |
| 592 | normal definition is a primitive. However, this is risky: for | 604 | normal definition is a primitive. However, this is risky: for |
| 593 | instance, it is next to impossible to redefine @code{car} without | 605 | instance, 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 | ||
| 703 | For an interesting example of using @code{apply}, see the description of | 715 | For an interesting example of using @code{apply}, see @ref{Definition |
| 704 | @code{mapcar}, in @ref{Mapping Functions}. | 716 | of 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 |
| 730 | list or other collection. Emacs Lisp has several such functions; | 742 | special form or macro) to each element of a list or other collection. |
| 731 | @code{mapcar} and @code{mapconcat}, which scan a list, are described | 743 | Emacs Lisp has several such functions; @code{mapcar} and |
| 732 | here. @xref{Creating Symbols}, for the function @code{mapatoms} which | 744 | @code{mapconcat}, which scan a list, are described here. |
| 733 | maps over the symbols in an obarray. @xref{Hash Access}, for the | 745 | @xref{Definition of mapatoms}, for the function @code{mapatoms} which |
| 734 | function @code{maphash} which maps over key/value associations in a | 746 | maps over the symbols in an obarray. @xref{Definition of maphash}, |
| 735 | hash table. | 747 | for the function @code{maphash} which maps over key/value associations |
| 748 | in 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 |
| 738 | is a sparse array whose nominal range of indices is very large. To map | 751 | is a sparse array whose nominal range of indices is very large. To map |
| 739 | over a char-table in a way that deals properly with its sparse nature, | 752 | over a char-table in a way that deals properly with its sparse nature, |
| 740 | use the function @code{map-char-table} (@pxref{Char-Tables}). | 753 | use 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} |
| 744 | in turn, and returns a list of the results. | 758 | in 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. |
| 771 | Return the list of results." | 785 | Return 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. | |||
| 961 | Contrast this with @code{quote}, in @ref{Quoting}. | 975 | Contrast 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 |
| 965 | realistic 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. | |||
| 971 | function cell of the symbol. The functions described here access, test, | 985 | function cell of the symbol. The functions described here access, test, |
| 972 | and set the function cell of symbols. | 986 | and 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 |
| 975 | Indirection}. | 989 | indirect-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 |
| 1029 | This function makes @var{symbol}'s function cell void, so that a | 1043 | This function makes @var{symbol}'s function cell void, so that a |
| 1030 | subsequent attempt to access this cell will cause a @code{void-function} | 1044 | subsequent attempt to access this cell will cause a |
| 1031 | error. (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: | |||
| 1064 | Copying one symbol's function definition to another---in other words, | 1079 | Copying one symbol's function definition to another---in other words, |
| 1065 | making an alternate name for a function. (If you think of this as the | 1080 | making an alternate name for a function. (If you think of this as the |
| 1066 | definition of the new name, you should use @code{defalias} instead of | 1081 | definition 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 |
| 1070 | Giving a symbol a function definition that is not a list and therefore | 1085 | Giving a symbol a function definition that is not a list and therefore |
| @@ -1305,7 +1320,7 @@ See @ref{Anonymous Functions}. | |||
| 1305 | See @ref{Calling Functions}. | 1320 | See @ref{Calling Functions}. |
| 1306 | 1321 | ||
| 1307 | @item indirect-function | 1322 | @item indirect-function |
| 1308 | See @ref{Function Indirection}. | 1323 | See @ref{Definition of indirect-function}. |
| 1309 | 1324 | ||
| 1310 | @item interactive | 1325 | @item interactive |
| 1311 | See @ref{Using Interactive}. | 1326 | See @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 |
| 209 | This function calls @var{function} once for each of the associations in | 210 | This 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 |
| 157 | several symbols in a @samp{*Help*} buffer. | 157 | several 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 |
| 364 | This function calls @var{function} once with each symbol in the obarray | 365 | This 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 | ||
| 397 | static struct window * | ||
| 398 | decode_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 | |||
| 397 | DEFUN ("window-buffer", Fwindow_buffer, Swindow_buffer, 0, 1, 0, | 408 | DEFUN ("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 | ||
| 413 | DEFUN ("window-width", Fwindow_width, Swindow_width, 0, 1, 0, | 424 | DEFUN ("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 | ||
| 424 | DEFUN ("window-hscroll", Fwindow_hscroll, Swindow_hscroll, 0, 1, 0, | 435 | DEFUN ("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); |