Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
What's new
7
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
22073dda
Commit
22073dda
authored
May 09, 1993
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(jump-to-register): Allow file name "in" a register.
parent
e532b016
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
2 deletions
+8
-2
lisp/register.el
lisp/register.el
+8
-2
No files found.
lisp/register.el
View file @
22073dda
...
...
@@ -34,14 +34,16 @@
"Alist of elements (NAME . CONTENTS), one for each Emacs register.
NAME is a character (a number). CONTENTS is a string, number,
frame configuration, mark or list.
A list represents a rectangle; its elements are strings."
)
A list of strings represents a rectangle.
A list of the form (file . NAME) represents the file named NAME."
)
(
defun
get-register
(
char
)
"Return contents of Emacs register named CHAR, or nil if none."
(
cdr
(
assq
char
register-alist
)))
(
defun
set-register
(
char
value
)
"Set contents of Emacs register named CHAR to VALUE. Returns VALUE."
"Set contents of Emacs register named CHAR to VALUE. Returns VALUE.
See the documentation of the variable `register-alist' for possible VALUE."
(
let
((
aelt
(
assq
char
register-alist
)))
(
if
aelt
(
setcdr
aelt
value
)
...
...
@@ -74,6 +76,8 @@ Argument is a character, naming the register."
(
defalias
'register-to-point
'jump-to-register
)
(
defun
jump-to-register
(
char
)
"Move point to location stored in a register.
If the register contains a file name, find that file.
\(To put a file name in a register, you must use `set-register'.)
If the register contains a window configuration (one frame) or a frame
configuration (all frames), restore that frame or all frames accordingly.
Argument is a character, naming the register."
...
...
@@ -87,6 +91,8 @@ Argument is a character, naming the register."
((
markerp
val
)
(
switch-to-buffer
(
marker-buffer
val
))
(
goto-char
val
))
((
and
(
consp
val
)
(
eq
(
car
val
)
'file
))
(
find-file
(
cdr
val
)))
(
t
(
error
"Register doesn't contain a buffer position or configuration"
)))))
...
...
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