aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorJuanma Barranquero2004-02-29 23:13:58 +0000
committerJuanma Barranquero2004-02-29 23:13:58 +0000
commit05f1c4ec55e17cb72356efac83b0be3e2a89321d (patch)
tree6180a7f8f1e87d750ddc166b5fbe8822ccafbf1c
parentbf9ac69bcf772b2610ae452a8fabc405ca78c10e (diff)
downloademacs-05f1c4ec55e17cb72356efac83b0be3e2a89321d.tar.gz
emacs-05f1c4ec55e17cb72356efac83b0be3e2a89321d.zip
(desktop-file-version, desktop-after-read-hook): Fix typos.
(desktop-clear-preserve-buffers): Remove redundant info in docstring already shown by the obsolescence message. (desktop-truncate, desktop-internal-v2s, desktop-value-to-string): Change argument name to match docstring.
-rw-r--r--lisp/ChangeLog15
-rw-r--r--lisp/desktop.el47
2 files changed, 38 insertions, 24 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index b945703cb57..1a53c41a03d 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,18 @@
12004-03-01 Juanma Barranquero <lektu@terra.es>
2
3 * desktop.el (desktop-file-version)
4 (desktop-after-read-hook): Fix typos.
5 (desktop-clear-preserve-buffers): Remove redundant info in
6 docstring already shown by the obsolescence message.
7 (desktop-truncate, desktop-internal-v2s)
8 (desktop-value-to-string): Change argument name to match
9 docstring.
10
11 * emulation/tpu-edt.el (tpu-set-mark): Fix typo in docstring.
12
13 * eshell/em-smart.el (eshell-smart-maybe-jump-to-end): Fix typo in
14 docstring.
15
12004-02-29 Kai Grossjohann <kai.grossjohann@gmx.net> 162004-02-29 Kai Grossjohann <kai.grossjohann@gmx.net>
2 17
3 Version 2.0.39 of Tramp released. 18 Version 2.0.39 of Tramp released.
diff --git a/lisp/desktop.el b/lisp/desktop.el
index 0cff5e5a21f..beac1f39005 100644
--- a/lisp/desktop.el
+++ b/lisp/desktop.el
@@ -90,7 +90,7 @@
90 (mapcar 'require '(info dired reporter))) 90 (mapcar 'require '(info dired reporter)))
91 91
92(defvar desktop-file-version "206" 92(defvar desktop-file-version "206"
93 "Verion number of desktop file format. 93 "Version number of desktop file format.
94Written into the desktop file and used at desktop read to provide 94Written into the desktop file and used at desktop read to provide
95backward compatibility.") 95backward compatibility.")
96 96
@@ -163,7 +163,7 @@ May e.g. be used to show a dired buffer."
163 :group 'desktop) 163 :group 'desktop)
164 164
165(defcustom desktop-after-read-hook nil 165(defcustom desktop-after-read-hook nil
166 "Normal hook run after a sucessful `desktop-read'. 166 "Normal hook run after a successful `desktop-read'.
167May e.g. be used to show a buffer list." 167May e.g. be used to show a buffer list."
168 :type 'hook 168 :type 'hook
169 :group 'desktop) 169 :group 'desktop)
@@ -212,8 +212,7 @@ to the value obtained by evaluateing FORM."
212;; Maintained for backward compatibility 212;; Maintained for backward compatibility
213(defcustom desktop-clear-preserve-buffers nil 213(defcustom desktop-clear-preserve-buffers nil
214 "*List of buffer names that `desktop-clear' should not delete. 214 "*List of buffer names that `desktop-clear' should not delete.
215This variable is maintained for backward compatibility only. Use 215This variable is maintained for backward compatibility only."
216`desktop-clear-preserve-buffers-regexp' instead."
217 :type '(repeat string) 216 :type '(repeat string)
218 :group 'desktop) 217 :group 'desktop)
219(make-obsolete-variable 'desktop-clear-preserve-buffers 218(make-obsolete-variable 'desktop-clear-preserve-buffers
@@ -349,9 +348,9 @@ this table."
349 "Hooks run after all buffers are loaded; intended for internal use.") 348 "Hooks run after all buffers are loaded; intended for internal use.")
350 349
351;; ---------------------------------------------------------------------------- 350;; ----------------------------------------------------------------------------
352(defun desktop-truncate (l n) 351(defun desktop-truncate (list n)
353 "Truncate LIST to at most N elements destructively." 352 "Truncate LIST to at most N elements destructively."
354 (let ((here (nthcdr (1- n) l))) 353 (let ((here (nthcdr (1- n) list)))
355 (if (consp here) 354 (if (consp here)
356 (setcdr here nil)))) 355 (setcdr here nil))))
357 356
@@ -424,22 +423,22 @@ is nil, ask the user where to save the desktop."
424 value))) 423 value)))
425 424
426;; ---------------------------------------------------------------------------- 425;; ----------------------------------------------------------------------------
427(defun desktop-internal-v2s (val) 426(defun desktop-internal-v2s (value)
428 "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE. 427 "Convert VALUE to a pair (QUOTE . TXT); (eval (read TXT)) gives VALUE.
429TXT is a string that when read and evaluated yields value. 428TXT is a string that when read and evaluated yields value.
430QUOTE may be `may' (value may be quoted), 429QUOTE may be `may' (value may be quoted),
431`must' (values must be quoted), or nil (value may not be quoted)." 430`must' (values must be quoted), or nil (value may not be quoted)."
432 (cond 431 (cond
433 ((or (numberp val) (null val) (eq t val)) 432 ((or (numberp value) (null value) (eq t value))
434 (cons 'may (prin1-to-string val))) 433 (cons 'may (prin1-to-string value)))
435 ((stringp val) 434 ((stringp value)
436 (let ((copy (copy-sequence val))) 435 (let ((copy (copy-sequence value)))
437 (set-text-properties 0 (length copy) nil copy) 436 (set-text-properties 0 (length copy) nil copy)
438 ;; Get rid of text properties because we cannot read them 437 ;; Get rid of text properties because we cannot read them
439 (cons 'may (prin1-to-string copy)))) 438 (cons 'may (prin1-to-string copy))))
440 ((symbolp val) 439 ((symbolp value)
441 (cons 'must (prin1-to-string val))) 440 (cons 'must (prin1-to-string value)))
442 ((vectorp val) 441 ((vectorp value)
443 (let* ((special nil) 442 (let* ((special nil)
444 (pass1 (mapcar 443 (pass1 (mapcar
445 (lambda (el) 444 (lambda (el)
@@ -447,7 +446,7 @@ QUOTE may be `may' (value may be quoted),
447 (if (null (car res)) 446 (if (null (car res))
448 (setq special t)) 447 (setq special t))
449 res)) 448 res))
450 val))) 449 value)))
451 (if special 450 (if special
452 (cons nil (concat "(vector " 451 (cons nil (concat "(vector "
453 (mapconcat (lambda (el) 452 (mapconcat (lambda (el)
@@ -458,8 +457,8 @@ QUOTE may be `may' (value may be quoted),
458 " ") 457 " ")
459 ")")) 458 ")"))
460 (cons 'may (concat "[" (mapconcat 'cdr pass1 " ") "]"))))) 459 (cons 'may (concat "[" (mapconcat 'cdr pass1 " ") "]")))))
461 ((consp val) 460 ((consp value)
462 (let ((p val) 461 (let ((p value)
463 newlist 462 newlist
464 use-list* 463 use-list*
465 anynil) 464 anynil)
@@ -489,13 +488,13 @@ QUOTE may be `may' (value may be quoted),
489 ")")) 488 ")"))
490 (cons 'must 489 (cons 'must
491 (concat "(" (mapconcat 'cdr newlist " ") ")"))))) 490 (concat "(" (mapconcat 'cdr newlist " ") ")")))))
492 ((subrp val) 491 ((subrp value)
493 (cons nil (concat "(symbol-function '" 492 (cons nil (concat "(symbol-function '"
494 (substring (prin1-to-string val) 7 -1) 493 (substring (prin1-to-string value) 7 -1)
495 ")"))) 494 ")")))
496 ((markerp val) 495 ((markerp value)
497 (let ((pos (prin1-to-string (marker-position val))) 496 (let ((pos (prin1-to-string (marker-position value)))
498 (buf (prin1-to-string (buffer-name (marker-buffer val))))) 497 (buf (prin1-to-string (buffer-name (marker-buffer value)))))
499 (cons nil (concat "(let ((mk (make-marker)))" 498 (cons nil (concat "(let ((mk (make-marker)))"
500 " (add-hook 'desktop-delay-hook" 499 " (add-hook 'desktop-delay-hook"
501 " (list 'lambda '() (list 'set-marker mk " 500 " (list 'lambda '() (list 'set-marker mk "
@@ -504,12 +503,12 @@ QUOTE may be `may' (value may be quoted),
504 (cons 'may "\"Unprintable entity\"")))) 503 (cons 'may "\"Unprintable entity\""))))
505 504
506;; ---------------------------------------------------------------------------- 505;; ----------------------------------------------------------------------------
507(defun desktop-value-to-string (val) 506(defun desktop-value-to-string (value)
508 "Convert VALUE to a string that when read evaluates to the same value. 507 "Convert VALUE to a string that when read evaluates to the same value.
509Not all types of values are supported." 508Not all types of values are supported."
510 (let* ((print-escape-newlines t) 509 (let* ((print-escape-newlines t)
511 (float-output-format nil) 510 (float-output-format nil)
512 (quote.txt (desktop-internal-v2s val)) 511 (quote.txt (desktop-internal-v2s value))
513 (quote (car quote.txt)) 512 (quote (car quote.txt))
514 (txt (cdr quote.txt))) 513 (txt (cdr quote.txt)))
515 (if (eq quote 'must) 514 (if (eq quote 'must)