Репозиторий ALT Linux backports/2.4
Последнее обновление: 9 июля 2008 | Пакетов: 497 | Посещений: 1585066
 поиск   регистрация   авторизация 
 
Группа :: Редакторы
Пакет: emacs22

 Главная   Изменения   Спек   Патчи   Загрузить   Bugs and FR 

Патч: emacs-22.0.50-saveplace_check_cell.patch


--- emacs/lisp/saveplace.el	2006-02-07 13:07:52 +0500
+++ emacs/lisp/saveplace.el.check	2006-02-12 03:24:37 +0500
@@ -121,7 +121,7 @@
 
 (defcustom save-place-skip-check-regexp
   ;; thanks to ange-ftp-name-format
-  "\\`/\\(?:cdrom\\|floppy\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)"
+  "\\`/\\(?:cdrom\\|floppy\\|usbdisk\\|mnt\\|\\(?:[^@/:]*@\\)?[^@/:]*[^@/:.]:\\)"
   "Regexp whose file names shall not be checked for readability.
 
 When forgetting unreadable files, file names matching this regular
@@ -248,7 +248,22 @@
                 (setq save-place-alist
                       (car (read-from-string
                             (buffer-substring (point-min) (point-max)))))
-
+		;; Exclude from save-place-alist elements, that is not
+		;; cons cell
+		;; This is needed for correct work with erroneous
+		;; ~/.emacs-places files (see for detail bug #9053 in
+		;; bugzilla.altlinux.org)
+		(unless (null save-place-alist)
+		  ;; first, check all except first
+		  (let ((fmprev save-place-alist) (fmcur (cdr save-place-alist)))
+		    (while fmcur
+		      (if (consp (car fmcur))
+			  (setq fmprev fmcur)
+			(setcdr fmprev (cdr fmcur)))
+		      (setq fmcur (cdr fmcur))))
+		  ;; test first pair, keep it if OK, otherwise 2nd element
+		  (unless (consp (car save-place-alist))
+		    (setq save-place-alist (cdr save-place-alist))))
                 ;; If there is a limit, and we're over it, then we'll
                 ;; have to truncate the end of the list:
                 (if save-place-limit
 
design & coding: Vladimir Lettiev aka crux © 2004-2005