Commit 502ddf23 authored by Jim Blandy's avatar Jim Blandy

entered into RCS

parent f9f15513
/* 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 @@ With positive ARG, a non-empty line at the end counts as one line\n\
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);
......
......@@ -105,19 +105,14 @@ DEFUN ("documentation", Fdocumentation, Sdocumentation, 1, 2, 0,
"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 @@ string is passed through `substitute-command-keys'.")
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 @@ subcommands.)");
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. */
......
/* 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 @@ get_keymap_1 (object, error)
{
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)
......
/* 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 @@ COUNT is a repeat count, or nil for once, or 0 for infinite loop.")
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.");
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment