Mercurial > emacs
comparison lisp/desktop.el @ 9521:d53ed4fd05ca
(desktop-internal-v2s): Remove all text properties from strings.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Thu, 13 Oct 1994 21:47:50 +0000 |
parents | eecf5ae5a194 |
children | b25efd6c4f30 |
comparison
equal
deleted
inserted
replaced
9520:5187a4159d16 | 9521:d53ed4fd05ca |
---|---|
214 (defun desktop-internal-v2s (val) | 214 (defun desktop-internal-v2s (val) |
215 "Convert VALUE to a pair (quote . txt) where txt is a string that when read | 215 "Convert VALUE to a pair (quote . txt) where txt is a string that when read |
216 and evaluated yields value. quote may be 'may (value may be quoted), | 216 and evaluated yields value. quote may be 'may (value may be quoted), |
217 'must (values must be quoted), or nil (value may not be quoted)." | 217 'must (values must be quoted), or nil (value may not be quoted)." |
218 (cond | 218 (cond |
219 ((or (numberp val) (stringp val) (null val) (eq t val)) | 219 ((or (numberp val) (null val) (eq t val)) |
220 (cons 'may (prin1-to-string val))) | 220 (cons 'may (prin1-to-string val))) |
221 ((stringp val) | |
222 ;; Get rid of text properties because we cannot read them | |
223 (cons 'may (prin1-to-string (format "%s" val)))) | |
221 ((symbolp val) | 224 ((symbolp val) |
222 (cons 'must (prin1-to-string val))) | 225 (cons 'must (prin1-to-string val))) |
223 ((vectorp val) | 226 ((vectorp val) |
224 (let* ((special nil) | 227 (let* ((special nil) |
225 (pass1 (mapcar | 228 (pass1 (mapcar |
446 t))) | 449 t))) |
447 ;; ---------------------------------------------------------------------------- | 450 ;; ---------------------------------------------------------------------------- |
448 (defun desktop-buffer-rmail () "Load an RMAIL file." | 451 (defun desktop-buffer-rmail () "Load an RMAIL file." |
449 (if (eq 'rmail-mode mam) | 452 (if (eq 'rmail-mode mam) |
450 (condition-case error | 453 (condition-case error |
451 (progn (rmail-input fn) t) | 454 (progn (rmail-input fn) t) |
452 (file-locked | 455 (file-locked |
453 (kill-buffer (current-buffer)) | 456 (kill-buffer (current-buffer)) |
454 'ignored)))) | 457 'ignored)))) |
455 ;; ---------------------------------------------------------------------------- | 458 ;; ---------------------------------------------------------------------------- |
456 (defun desktop-buffer-mh () "Load a folder in the mh system." | 459 (defun desktop-buffer-mh () "Load a folder in the mh system." |
457 (if (eq 'mh-folder-mode mam) | 460 (if (eq 'mh-folder-mode mam) |
458 (progn | 461 (progn |
459 (require 'mh-e) | 462 (require 'mh-e) |