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
ed2f7fc8
Commit
ed2f7fc8
authored
Mar 05, 1996
by
Richard M. Stallman
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
(desktop-list*): New function.
(desktop-internal-v2s): Generate output using desktop-list*.
parent
52b9a931
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
18 additions
and
13 deletions
+18
-13
lisp/desktop.el
lisp/desktop.el
+18
-13
No files found.
lisp/desktop.el
View file @
ed2f7fc8
...
...
@@ -217,6 +217,17 @@ the like shorter.")
nil
(
signal
(
car
err
)
(
cdr
err
)))))))
;; ----------------------------------------------------------------------------
(
defun
desktop-list*
(
&rest
args
)
(
if
(
null
(
cdr
args
))
(
car
args
)
(
setq
args
(
nreverse
args
))
(
let
((
value
(
cons
(
nth
1
args
)
(
car
args
))))
(
setq
args
(
cdr
(
cdr
args
)))
(
while
args
(
setq
value
(
cons
(
car
args
)
value
))
(
setq
args
(
cdr
args
)))
value
)))
(
defun
desktop-internal-v2s
(
val
)
"Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE.
TXT is a string that when read and evaluated yields value.
...
...
@@ -254,6 +265,7 @@ QUOTE may be `may' (value may be quoted),
((
consp
val
)
(
let
((
p
val
)
newlist
use-list*
anynil
)
(
while
(
consp
p
)
(
let
((
q.txt
(
desktop-internal-v2s
(
car
p
))))
...
...
@@ -263,22 +275,15 @@ QUOTE may be `may' (value may be quoted),
(
if
p
(
let
((
last
(
desktop-internal-v2s
p
))
(
el
(
car
newlist
)))
(
setcar
newlist
(
if
(
or
anynil
(
setq
anynil
(
null
(
car
last
))))
(
cons
nil
(
concat
"(cons "
(
if
(
eq
(
car
el
)
'must
)
"'"
""
)
(
cdr
el
)
" "
(
if
(
eq
(
car
last
)
'must
)
"'"
""
)
(
cdr
last
)
")"
))
(
cons
'must
(
concat
(
cdr
el
)
" . "
(
cdr
last
)))))))
(
or
anynil
(
setq
anynil
(
null
(
car
last
))))
(
or
anynil
(
setq
newlist
(
cons
'
(
must
.
"."
)
newlist
)))
(
setq
use-list*
t
)
(
setq
newlist
(
cons
last
newlist
))))
(
setq
newlist
(
nreverse
newlist
))
(
if
anynil
(
cons
nil
(
concat
"(list "
(
concat
(
if
use-list*
"(desktop-list* "
"(list "
)
(
mapconcat
(
lambda
(
el
)
(
if
(
eq
(
car
el
)
'must
)
(
concat
"'"
(
cdr
el
))
...
...
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