Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
502ddf23
Commit
502ddf23
authored
May 18, 1992
by
Jim Blandy
Browse files
entered into RCS
parent
f9f15513
Changes
4
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
20 additions
and
29 deletions
+20
-29
src/cmds.c
src/cmds.c
+4
-3
src/doc.c
src/doc.c
+10
-13
src/keymap.c
src/keymap.c
+3
-8
src/macros.c
src/macros.c
+3
-5
No files found.
src/cmds.c
View file @
502ddf23
/* 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
);
...
...
src/doc.c
View file @
502ddf23
...
...
@@ -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'."
)
(
fun
1
,
raw
)
Lisp_Object
fun
1
,
raw
;
(
fun
ction
,
raw
)
Lisp_Object
fun
ction
,
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. */
...
...
src/keymap.c
View file @
502ddf23
/* 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
)
...
...
src/macros.c
View file @
502ddf23
/* 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."
);
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment