Mercurial > emacs
changeset 647:529171c8b71c
entered into RCS
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 18 May 1992 08:13:37 +0000 |
parents | e283d4164aca |
children | 70b112526394 |
files | src/cmds.c src/doc.c src/keymap.c src/macros.c |
diffstat | 4 files changed, 20 insertions(+), 29 deletions(-) [+] |
line wrap: on
line diff
--- a/src/cmds.c Fri May 15 21:56:59 1992 +0000 +++ b/src/cmds.c Mon May 18 08:13:37 1992 +0000 @@ -1,11 +1,11 @@ /* Simple built-in editing commands. - Copyright (C) 1985 Free Software Foundation, Inc. + Copyright (C) 1985, 1992 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) +the Free Software Foundation; either version 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -94,7 +94,8 @@ pos = scan_buffer ('\n', pos2, count - negp, &shortage); if (shortage > 0 && (negp - || (ZV >= BEGV + || (ZV > BEGV + && pos != pos2 && FETCH_CHAR (pos - 1) != '\n'))) shortage--; SET_PT (pos);
--- a/src/doc.c Fri May 15 21:56:59 1992 +0000 +++ b/src/doc.c Mon May 18 08:13:37 1992 +0000 @@ -105,19 +105,14 @@ "Return the documentation string of FUNCTION.\n\ Unless a non-nil second argument is given, the\n\ string is passed through `substitute-command-keys'.") - (fun1, raw) - Lisp_Object fun1, raw; + (function, raw) + Lisp_Object function, raw; { Lisp_Object fun; Lisp_Object funcar; Lisp_Object tem, doc; - fun = fun1; - while (XTYPE (fun) == Lisp_Symbol) - { - QUIT; - fun = Fsymbol_function (fun); - } + fun = Findirect_function (function); switch (XTYPE (fun)) { @@ -149,11 +144,11 @@ funcar = Fcar (fun); if (XTYPE (funcar) != Lisp_Symbol) return Fsignal (Qinvalid_function, Fcons (fun, Qnil)); - if (XSYMBOL (funcar) == XSYMBOL (Qkeymap)) + else if (EQ (funcar, Qkeymap)) return build_string ("Prefix command (definition is a keymap associating keystrokes with\n\ subcommands.)"); - if (XSYMBOL (funcar) == XSYMBOL (Qlambda) - || XSYMBOL (funcar) == XSYMBOL (Qautoload)) + else if (EQ (funcar, Qlambda) + || EQ (funcar, Qautoload)) { tem = Fcar (Fcdr (Fcdr (fun))); if (XTYPE (tem) == Lisp_String) @@ -162,10 +157,12 @@ doc = get_doc_string (XFASTINT (tem)); else return Qnil; + + break; } - if (XSYMBOL (funcar) == XSYMBOL (Qmocklisp)) + else if (EQ (funcar, Qmocklisp)) return Qnil; - if (XSYMBOL (funcar) == XSYMBOL (Qmacro)) + else if (EQ (funcar, Qmacro)) return Fdocumentation (Fcdr (fun), raw); /* Fall through to the default to report an error. */
--- a/src/keymap.c Fri May 15 21:56:59 1992 +0000 +++ b/src/keymap.c Mon May 18 08:13:37 1992 +0000 @@ -1,11 +1,11 @@ /* Manipulation of keymaps - Copyright (C) 1985, 1986, 1987, 1988 Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1987, 1988, 1992 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) +the Free Software Foundation; either version 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -174,12 +174,7 @@ { register Lisp_Object tem; - tem = object; - while (XTYPE (tem) == Lisp_Symbol && !EQ (tem, Qunbound)) - { - tem = XSYMBOL (tem)->function; - QUIT; - } + tem = indirect_function (object); if (CONSP (tem) && EQ (XCONS (tem)->car, Qkeymap)) return tem; if (error)
--- a/src/macros.c Fri May 15 21:56:59 1992 +0000 +++ b/src/macros.c Mon May 18 08:13:37 1992 +0000 @@ -1,11 +1,11 @@ /* Keyboard macros. - Copyright (C) 1985, 1986 Free Software Foundation, Inc. + Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc. This file is part of GNU Emacs. GNU Emacs is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by -the Free Software Foundation; either version 1, or (at your option) +the Free Software Foundation; either version 2, or (at your option) any later version. GNU Emacs is distributed in the hope that it will be useful, @@ -201,9 +201,7 @@ prefixarg = Fprefix_numeric_value (prefixarg), repeat = XINT (prefixarg); - final = macro; - while (XTYPE (final) == Lisp_Symbol && !EQ (final, Qunbound)) - final = XSYMBOL (final)->function; + final = indirect_function (macro); if (XTYPE (final) != Lisp_String && XTYPE (final) != Lisp_Vector) error ("Keyboard macros must be strings or vectors.");