;;; page-ext.el --- extended page handling commands
-;; Copyright (C) 1990, 1991, 1993, 1994, 2002, 2003, 2004,
-;; 2005 Free Software Foundation, Inc.
+;; Copyright (C) 1990, 1991, 1993, 1994, 2001, 2002, 2003, 2004, 2005, 2006,
+;; 2007, 2008, 2009, 2010 Free Software Foundation, Inc.
-;; Maintainer: Robert J. Chassell <bob@gnu.org>
+;; Author: Robert J. Chassell <bob@gnu.org>
+;; (according to ack.texi)
;; Keywords: wp data
;; This file is part of GNU Emacs.
-;; GNU Emacs is free software; you can redistribute it and/or modify
+;; GNU Emacs is free software: you can redistribute it and/or modify
;; it under the terms of the GNU General Public License as published by
-;; the Free Software Foundation; either version 2, or (at your option)
-;; any later version.
+;; the Free Software Foundation, either version 3 of the License, or
+;; (at your option) any later version.
;; GNU Emacs is distributed in the hope that it will be useful,
;; but WITHOUT ANY WARRANTY; without even the implied warranty of
;; GNU General Public License for more details.
;; You should have received a copy of the GNU General Public License
-;; along with GNU Emacs; see the file COPYING. If not, write to the
-;; Free Software Foundation, Inc., 51 Franklin Street, Fifth Floor,
-;; Boston, MA 02110-1301, USA.
+;; along with GNU Emacs. If not, see <http://www.gnu.org/licenses/>.
;;; Commentary:
(if (not reset-p)
(setq page-delimiter regexp)
(setq page-delimiter original-page-delimiter))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "The value of `page-delimiter' is now: %s" page-delimiter)))
\f
(setq regexp pages-directory-previous-regexp)
(setq pages-directory-previous-regexp regexp))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "Creating directory for: %s "
(buffer-name)))
;; `standard-output' to the buffer named as its first argument,
;; but does not switch to that buffer.
(with-output-to-temp-buffer pages-directory-buffer
- (save-excursion
- (set-buffer standard-output)
+ (with-current-buffer standard-output
(pages-directory-mode)
(insert
"==== Pages Directory: use `C-c C-c' to go to page under cursor. ====" ?\n)
(set-buffer standard-output)
;; Put positions in increasing order to go with buffer.
(setq pages-pos-list (nreverse pages-pos-list))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "%d matching lines in: %s"
(length pages-pos-list) (buffer-name pages-target-buffer))))
(pop-to-buffer pages-directory-buffer)
(forward-line (if (= 0 pages-buffer-original-page)
1
pages-buffer-original-page))))
-(eval-when-compile
- (defvar pages-buffer-original-position)
- (defvar pages-buffer-original-page)
- (defvar pages-buffer-original-page))
+
+(defvar pages-buffer-original-position)
+(defvar pages-buffer-original-page)
+(defvar pages-buffer-original-page)
(defun pages-copy-header-and-position (count-lines-p)
"Copy page header and its position to the Pages Directory.
(defun pages-directory-goto-with-mouse (event)
"Go to the corresponding line under the mouse pointer in the pages buffer."
(interactive "e")
- (save-excursion
- (set-buffer (window-buffer (posn-window (event-end event))))
+ (with-current-buffer (window-buffer (posn-window (event-end event)))
(save-excursion
(goto-char (posn-point (event-end event)))
(pages-directory-goto))))
(list (if current-prefix-arg
(read-file-name "Filename: " pages-addresses-file-name))))
- (if (interactive-p)
+ (if (called-interactively-p 'interactive)
(message "Creating directory for: %s "
(or filename pages-addresses-file-name)))
(if (file-exists-p (or filename pages-addresses-file-name))
(or filename pages-addresses-file-name))))
(widen)
(pages-directory t nil nil)
- (pages-directory-address-mode)
+ ;; by RJC, 2006 Jun 11: including this causes failure; it results in
+ ;; the message "Buffer in which pages were found is deleted"
+ ;; (pages-directory-address-mode)
(setq pages-directory-buffer-narrowing-p
pages-directory-for-addresses-goto-narrowing-p)
(or pages-directory-for-addresses-buffer-keep-windows-p
(provide 'page-ext)
-;;; arch-tag: 2f311550-c6e0-4458-9c12-7f039c058bdb
+;; arch-tag: 2f311550-c6e0-4458-9c12-7f039c058bdb
;;; page-ext.el ends here