aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1994-04-25 19:55:45 +0000
committerKarl Heuer1994-04-25 19:55:45 +0000
commitfbe58183e7e91da5ec819f205dfb53ece238335a (patch)
tree52cb51cbfd5ce604720b19e6687318d00dcbb997
parent6a608e8ebf03dcb873fbe3002e1c6f3402c52b4a (diff)
downloademacs-fbe58183e7e91da5ec819f205dfb53ece238335a.tar.gz
emacs-fbe58183e7e91da5ec819f205dfb53ece238335a.zip
(desktop-internal-v2s): Make structure match docstring.
-rw-r--r--lisp/desktop.el12
1 files changed, 6 insertions, 6 deletions
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 6b7fe0cf3d6..9bbc8490df2 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -191,7 +191,7 @@ If the function returns t then the buffer is considered created.")
191;; ---------------------------------------------------------------------------- 191;; ----------------------------------------------------------------------------
192(defun desktop-internal-v2s (val) 192(defun desktop-internal-v2s (val)
193 "Convert VALUE to a pair (quote . txt) where txt is a string that when read 193 "Convert VALUE to a pair (quote . txt) where txt is a string that when read
194and evaluated yields value. quote may be 'may (value may be quoted), 194and evaluated yields value. quote may be 'may (value may be quoted),
195'must (values must be quoted), or nil (value may not be quoted)." 195'must (values must be quoted), or nil (value may not be quoted)."
196 (cond 196 (cond
197 ((or (numberp val) (stringp val) (null val) (eq t val)) 197 ((or (numberp val) (stringp val) (null val) (eq t val))
@@ -222,13 +222,13 @@ and evaluated yields value. quote may be 'may (value may be quoted),
222 (cdr-q.txt (desktop-internal-v2s (cdr val)))) 222 (cdr-q.txt (desktop-internal-v2s (cdr val))))
223 (cond 223 (cond
224 ((or (null (car car-q.txt)) (null (car cdr-q.txt))) 224 ((or (null (car car-q.txt)) (null (car cdr-q.txt)))
225 (cons nil (concat "(cons " 225 (cons nil (concat "(cons "
226 (if (eq (car car-q.txt) 'must) "'") 226 (if (eq (car car-q.txt) 'must) "'")
227 (cdr car-q.txt) " " 227 (cdr car-q.txt) " "
228 (if (eq (car cdr-q.txt) 'must) "'") 228 (if (eq (car cdr-q.txt) 'must) "'")
229 (cdr cdr-q.txt) ")"))) 229 (cdr cdr-q.txt) ")")))
230 ((consp (cdr val)) 230 ((consp (cdr val))
231 (cons 'must (concat "(" (cdr car-q.txt) 231 (cons 'must (concat "(" (cdr car-q.txt)
232 " " (substring (cdr cdr-q.txt) 1 -1) ")"))) 232 " " (substring (cdr cdr-q.txt) 1 -1) ")")))
233 ((null (cdr val)) 233 ((null (cdr val))
234 (cons 'must (concat "(" (cdr car-q.txt) ")"))) 234 (cons 'must (concat "(" (cdr car-q.txt) ")")))
@@ -246,7 +246,7 @@ and evaluated yields value. quote may be 'may (value may be quoted),
246 " (list 'lambda '() (list 'set-marker mk " 246 " (list 'lambda '() (list 'set-marker mk "
247 pos " (get-buffer " buf ")))) mk)")))) 247 pos " (get-buffer " buf ")))) mk)"))))
248 (t ; save as text 248 (t ; save as text
249 (prin1-to-string (prin1-to-string val))))) 249 (cons nil (prin1-to-string (prin1-to-string val))))))
250 250
251(defun desktop-value-to-string (val) 251(defun desktop-value-to-string (val)
252 "Convert VALUE to a string that when read evaluates to the same value. Not 252 "Convert VALUE to a string that when read evaluates to the same value. Not