From 194600a8fa08104045698f0a9be6d6c3fe8b8f7e Mon Sep 17 00:00:00 2001 From: John Paul Wallington Date: Fri, 14 Mar 2003 22:38:46 +0000 Subject: [PATCH] * 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. --- lisp/ChangeLog | 14 ++++++++++++++ lisp/arc-mode.el | 26 +++++++++++++------------- lisp/files.el | 8 +++++++- lisp/subr.el | 8 ++++---- 4 files changed, 38 insertions(+), 18 deletions(-) diff --git a/lisp/ChangeLog b/lisp/ChangeLog index d305ea16a65..91dafdfbcd4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog @@ -1,3 +1,17 @@ +2003-03-14 John Paul Wallington + + * 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 * textmodes/outline.el (outline-level): Demote it to defvar. diff --git a/lisp/arc-mode.el b/lisp/arc-mode.el index 76eaef21c56..2c2569bb970 100644 --- a/lisp/arc-mode.el +++ b/lisp/arc-mode.el @@ -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) diff --git a/lisp/files.el b/lisp/files.el index 7b975d7c996..acfea07992f 100644 --- a/lisp/files.el +++ b/lisp/files.el @@ -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"))) diff --git a/lisp/subr.el b/lisp/subr.el index 11e6869ffcd..fab48872966 100644 --- a/lisp/subr.el +++ b/lisp/subr.el @@ -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) -- 2.11.4.GIT