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
emacs
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
1
Issues
1
List
Boards
Labels
Service Desk
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Operations
Operations
Incidents
Environments
Packages & Registries
Packages & Registries
Container Registry
Analytics
Analytics
CI / CD
Repository
Value Stream
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
emacs
emacs
Commits
83b5d757
Commit
83b5d757
authored
Jul 19, 1992
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
*** empty log message ***
parent
fd5285f3
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
19 deletions
+23
-19
lisp/register.el
lisp/register.el
+23
-5
lisp/window.el
lisp/window.el
+0
-14
No files found.
lisp/register.el
View file @
83b5d757
...
@@ -51,20 +51,38 @@ Argument is a character, naming the register."
...
@@ -51,20 +51,38 @@ Argument is a character, naming the register."
(
interactive
"cPoint to register: \nP"
)
(
interactive
"cPoint to register: \nP"
)
(
set-register
char
(
if
arg
(
current-frame-configuration
)
(
point-marker
))))
(
set-register
char
(
if
arg
(
current-frame-configuration
)
(
point-marker
))))
(
defun
window-configuration-to-register
(
char
arg
)
"Store the window configuration of the selected frame in register REGISTER.
Use \\[jump-to-register] to restore the configuration.
Argument is a character, naming the register."
(
interactive
"cPoint to register: \nP"
)
(
set-register
char
(
current-window-configuration
)))
(
defun
frame-configuration-to-register
(
char
arg
)
"Store the window configuration of all frames in register REGISTER.
Use \\[jump-to-register] to restore the configuration.
Argument is a character, naming the register."
(
interactive
"cPoint to register: \nP"
)
(
set-register
char
(
current-frame-configuration
)))
(
fset
'register-to-point
'jump-to-register
)
(
fset
'register-to-point
'jump-to-register
)
(
defun
jump-to-register
(
char
)
(
defun
jump-to-register
(
char
)
"Move point to location stored in a register.
"Move point to location stored in a 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."
Argument is a character, naming the register."
(
interactive
"cJump to register: "
)
(
interactive
"cJump to register: "
)
(
let
((
val
(
get-register
char
)))
(
let
((
val
(
get-register
char
)))
(
condition-case
()
(
condition-case
()
(
set-frame-configuration
val
)
(
set-frame-configuration
val
)
(
error
(
error
(
if
(
markerp
val
)
(
if
(
window-configuration-p
val
)
(
progn
(
set-window-configuration
val
)
(
switch-to-buffer
(
marker-buffer
val
))
(
if
(
markerp
val
)
(
goto-char
val
))
(
progn
(
error
"Register doesn't contain a buffer position or frame configuration"
))))))
(
switch-to-buffer
(
marker-buffer
val
))
(
goto-char
val
))
(
error
"Register doesn't contain a buffer position or configuration"
)))))))
;(defun number-to-register (arg char)
;(defun number-to-register (arg char)
; "Store a number in a register.
; "Store a number in a register.
...
...
lisp/window.el
View file @
83b5d757
...
@@ -110,22 +110,8 @@ ARG columns. No arg means split equally."
...
@@ -110,22 +110,8 @@ ARG columns. No arg means split equally."
(
interactive
"p"
)
(
interactive
"p"
)
(
shrink-window
arg
t
))
(
shrink-window
arg
t
))
(
defun
window-config-to-register
(
name
)
"Save the current window configuration in register REG (a letter).
It can be later retrieved using \\[M-x register-to-window-config]."
(
interactive
"cSave window configuration in register: "
)
(
set-register
name
(
current-window-configuration
)))
(
defun
register-to-window-config
(
name
)
"Restore (make current) the window configuration in register REG (a letter).
Use with a register previously set with \\[window-config-to-register]."
(
interactive
"cRestore window configuration from register: "
)
(
set-window-configuration
(
get-register
name
)))
(
define-key
ctl-x-map
"2"
'split-window-vertically
)
(
define-key
ctl-x-map
"2"
'split-window-vertically
)
(
define-key
ctl-x-map
"3"
'split-window-horizontally
)
(
define-key
ctl-x-map
"3"
'split-window-horizontally
)
(
define-key
ctl-x-map
"6"
'window-config-to-register
)
(
define-key
ctl-x-map
"7"
'register-to-window-config
)
(
define-key
ctl-x-map
"}"
'enlarge-window-horizontally
)
(
define-key
ctl-x-map
"}"
'enlarge-window-horizontally
)
(
define-key
ctl-x-map
"{"
'shrink-window-horizontally
)
(
define-key
ctl-x-map
"{"
'shrink-window-horizontally
)
...
...
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