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
e5714620
Commit
e5714620
authored
Nov 04, 2002
by
Juanma Barranquero
Browse files
(desktop-relative-file-names): New variable.
(desktop-save): Use it.
parent
570050dc
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
60 additions
and
46 deletions
+60
-46
lisp/ChangeLog
lisp/ChangeLog
+6
-1
lisp/desktop.el
lisp/desktop.el
+54
-45
No files found.
lisp/ChangeLog
View file @
e5714620
2002-11-04 Robert Fenk <Robert.Fenk@gmx.de> (tiny change)
* desktop.el (desktop-relative-file-names): New variable.
(desktop-save): Use it.
2002-11-03 Andre Spiegel <spiegel@gnu.org>
* vc.el (vc-dired-mode): Adapt dired-move-to-filename-regexp to
...
...
@@ -415,7 +420,7 @@
(cp866): Delete this alias.
("Bulgarian"): Fix the value of `input-method'.
2002-10-16 Luc Teirlinck <teirllm@mail.auburn.edu>
(tiny change)
2002-10-16 Luc Teirlinck <teirllm@mail.auburn.edu>
* dired-aux.el (dired-add-entry): Put point in correct position
before inserting marker char.
...
...
lisp/desktop.el
View file @
e5714620
...
...
@@ -471,6 +471,11 @@ MODE is the major mode."
(
and
(
null
filename
)
(
memq
mode
desktop-buffer-modes-to-save
))))))
;; ----------------------------------------------------------------------------
(
defcustom
desktop-relative-file-names
nil
"*Store relative file names in the desktop file."
:type
'boolean
:group
'desktop
)
(
defun
desktop-save
(
dirname
)
"Save the Desktop file. Parameter DIRNAME specifies where to save desktop."
(
interactive
"DDirectory to save desktop file in: "
)
...
...
@@ -481,42 +486,46 @@ MODE is the major mode."
(
mapcar
(
function
(
lambda
(
b
)
(
set-buffer
b
)
(
list
(
buffer-file-name
)
(
buffer-name
)
major-mode
;; minor modes
(
let
(
ret
)
(
mapcar
#'
(
lambda
(
mim
)
(
and
(
boundp
mim
)
(
symbol-value
mim
)
(
setq
ret
(
cons
(
let
((
special
(
assq
mim
desktop-minor-mode-table
)))
(
if
special
(
cadr
special
)
mim
))
ret
))))
(
mapcar
#'
car
minor-mode-alist
))
ret
)
(
point
)
(
list
(
mark
t
)
mark-active
)
buffer-read-only
(
run-hook-with-args-until-success
'desktop-buffer-misc-functions
)
(
let
((
locals
desktop-locals-to-save
)
(
loclist
(
buffer-local-variables
))
(
ll
))
(
while
locals
(
let
((
here
(
assq
(
car
locals
)
loclist
)))
(
if
here
(
setq
ll
(
cons
here
ll
))
(
if
(
member
(
car
locals
)
loclist
)
(
setq
ll
(
cons
(
car
locals
)
ll
)))))
(
setq
locals
(
cdr
locals
)))
ll
)
)))
(
set-buffer
b
)
(
list
(
let
((
bn
(
buffer-file-name
)))
(
if
bn
(
if
desktop-relative-file-names
(
file-relative-name
bn
dirname
)
bn
)))
(
buffer-name
)
major-mode
;; minor modes
(
let
(
ret
)
(
mapcar
#'
(
lambda
(
mim
)
(
and
(
boundp
mim
)
(
symbol-value
mim
)
(
setq
ret
(
cons
(
let
((
special
(
assq
mim
desktop-minor-mode-table
)))
(
if
special
(
cadr
special
)
mim
))
ret
))))
(
mapcar
#'
car
minor-mode-alist
))
ret
)
(
point
)
(
list
(
mark
t
)
mark-active
)
buffer-read-only
(
run-hook-with-args-until-success
'desktop-buffer-misc-functions
)
(
let
((
locals
desktop-locals-to-save
)
(
loclist
(
buffer-local-variables
))
(
ll
))
(
while
locals
(
let
((
here
(
assq
(
car
locals
)
loclist
)))
(
if
here
(
setq
ll
(
cons
here
ll
))
(
if
(
member
(
car
locals
)
loclist
)
(
setq
ll
(
cons
(
car
locals
)
ll
)))))
(
setq
locals
(
cdr
locals
)))
ll
)
)))
(
buffer-list
))))
(
buf
(
get-buffer-create
"*desktop*"
)))
(
set-buffer
buf
)
...
...
@@ -537,15 +546,15 @@ MODE is the major mode."
(
insert
"\n;; Buffer section:\n"
)
(
mapcar
(
function
(
lambda
(
l
)
(
if
(
apply
'desktop-save-buffer-p
l
)
(
progn
(
insert
desktop-create-buffer-form
)
(
mapcar
(
function
(
lambda
(
e
)
(
insert
"\n "
(
desktop-value-to-string
e
))))
l
)
(
insert
")\n\n"
)))))
(
if
(
apply
'desktop-save-buffer-p
l
)
(
progn
(
insert
desktop-create-buffer-form
)
(
mapcar
(
function
(
lambda
(
e
)
(
insert
"\n "
(
desktop-value-to-string
e
))))
l
)
(
insert
")\n\n"
)))))
info
)
(
setq
default-directory
dirname
)
(
if
(
file-exists-p
filename
)
(
delete-file
filename
))
...
...
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