]> code.delx.au - gnu-emacs/commitdiff
* files.el (recover-session): Error if there are no previous
authorJohn Paul Wallington <jpw@pobox.com>
Fri, 14 Mar 2003 22:38:46 +0000 (22:38 +0000)
committerJohn Paul Wallington <jpw@pobox.com>
Fri, 14 Mar 2003 22:38:46 +0000 (22:38 +0000)
sessions to recover.

* subr.el (posn-col-row): Simplify.

* arc-mode.el (archive-subtype, archive-file-list-start)
(archive-file-list-end, archive-proper-file-start)
(archive-read-only, archive-local-name, archive-mode-map)
(archive-file-name-indent, archive-remote)
(archive-alternate-display, archive-superior-buffer)
(archive-subfile-mode): Doc fixes.

lisp/ChangeLog
lisp/arc-mode.el
lisp/files.el
lisp/subr.el

index d305ea16a656293af1a9c7b92c8779041ac159f2..91dafdfbcd420dabb8d37e684070fd8417263338 100644 (file)
@@ -1,3 +1,17 @@
+2003-03-14  John Paul Wallington  <jpw@gnu.org>
+
+       * files.el (recover-session): Error if there are no previous
+       sessions to recover.
+
+       * subr.el (posn-col-row): Simplify.
+
+       * arc-mode.el (archive-subtype, archive-file-list-start)
+       (archive-file-list-end, archive-proper-file-start)
+       (archive-read-only, archive-local-name, archive-mode-map)
+       (archive-file-name-indent, archive-remote)
+       (archive-alternate-display, archive-superior-buffer)
+       (archive-subfile-mode): Doc fixes.
+
 2003-03-14  Stefan Monnier  <monnier@cs.yale.edu>
 
        * textmodes/outline.el (outline-level): Demote it to defvar.
index 76eaef21c56bc062e3f15331c3cf0ada631f3ec3..2c2569bb970bdde79f8ac4b207f384857b9ba808 100644 (file)
@@ -324,16 +324,16 @@ Archive and member name will be added."
 ;; -------------------------------------------------------------------------
 ;; Section: Variables
 
-(defvar archive-subtype nil "*Symbol describing archive type.")
-(defvar archive-file-list-start nil "*Position of first contents line.")
-(defvar archive-file-list-end nil "*Position just after last contents line.")
-(defvar archive-proper-file-start nil "*Position of real archive's start.")
-(defvar archive-read-only nil "*Non-nil if the archive is read-only on disk.")
-(defvar archive-local-name nil "*Name of local copy of remote archive.")
-(defvar archive-mode-map nil "*Local keymap for archive mode listings.")
-(defvar archive-file-name-indent nil "*Column where file names start.")
-
-(defvar archive-remote nil "*Non-nil if the archive is outside file system.")
+(defvar archive-subtype nil "Symbol describing archive type.")
+(defvar archive-file-list-start nil "Position of first contents line.")
+(defvar archive-file-list-end nil "Position just after last contents line.")
+(defvar archive-proper-file-start nil "Position of real archive's start.")
+(defvar archive-read-only nil "Non-nil if the archive is read-only on disk.")
+(defvar archive-local-name nil "Name of local copy of remote archive.")
+(defvar archive-mode-map nil "Local keymap for archive mode listings.")
+(defvar archive-file-name-indent nil "Column where file names start.")
+
+(defvar archive-remote nil "Non-nil if the archive is outside file system.")
 (make-variable-buffer-local 'archive-remote)
 (put 'archive-remote 'permanent-local t)
 
@@ -341,14 +341,14 @@ Archive and member name will be added."
 (make-variable-buffer-local 'archive-member-coding-system)
 
 (defvar archive-alternate-display nil
-  "*Non-nil when alternate information is shown.")
+  "Non-nil when alternate information is shown.")
 (make-variable-buffer-local 'archive-alternate-display)
 (put 'archive-alternate-display 'permanent-local t)
 
-(defvar archive-superior-buffer nil "*In archive members, points to archive.")
+(defvar archive-superior-buffer nil "In archive members, points to archive.")
 (put 'archive-superior-buffer 'permanent-local t)
 
-(defvar archive-subfile-mode nil "*Non-nil in archive member buffers.")
+(defvar archive-subfile-mode nil "Non-nil in archive member buffers.")
 (make-variable-buffer-local 'archive-subfile-mode)
 (put 'archive-subfile-mode 'permanent-local t)
 
index 7b975d7c9961f3ff9a5b019378075a8fae90ea24..acfea07992f5c46d5351a23e9308776bbbca2972 100644 (file)
@@ -3467,7 +3467,13 @@ Then you'll be asked about a number of files to recover."
       (error "You set `auto-save-list-file-prefix' to disable making session files"))
   (let ((dir (file-name-directory auto-save-list-file-prefix)))
     (unless (file-directory-p dir)
-      (make-directory dir t)))
+      (make-directory dir t))
+    (unless (directory-files dir nil
+                            (concat "\\`" (regexp-quote
+                                           (file-name-nondirectory
+                                            auto-save-list-file-prefix)))
+                            t)
+      (error "No previous sessions to recover")))
   (let ((ls-lisp-support-shell-wildcards t))
     (dired (concat auto-save-list-file-prefix "*")
           (concat dired-listing-switches "t")))
index 11e6869ffcd90c1d87ce0d9fc17f9a37f0650789..fab48872966e963bc94568a1f933e9448384a3ff 100644 (file)
@@ -656,9 +656,7 @@ as returned by the `event-start' and `event-end' functions.
 For a scroll-bar event, the result column is 0, and the row
 corresponds to the vertical position of the click in the scroll bar."
   (let* ((pair   (nth 2 position))
-        (window (posn-window position))
-        (vspacing (or (frame-parameter (window-frame window) 'line-spacing)
-                      default-line-spacing)))
+        (window (posn-window position)))
     (if (eq (if (consp (nth 1 position))
                (car (nth 1 position))
              (nth 1 position))
@@ -672,7 +670,9 @@ corresponds to the vertical position of the click in the scroll bar."
        (let* ((frame (if (framep window) window (window-frame window)))
               (x (/ (car pair) (frame-char-width frame)))
               (y (/ (cdr pair) (+ (frame-char-height frame)
-                                  (or vspacing 0)))))
+                                  (or (frame-parameter frame 'line-spacing)
+                                      default-line-spacing
+                                      0)))))
          (cons x y))))))
 
 (defsubst posn-timestamp (position)