emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] Changes to emacs/lisp/man.el


From: Richard M . Stallman
Subject: [Emacs-diffs] Changes to emacs/lisp/man.el
Date: Sat, 23 Jul 2005 18:51:33 -0400

Index: emacs/lisp/man.el
diff -c emacs/lisp/man.el:1.149 emacs/lisp/man.el:1.150
*** emacs/lisp/man.el:1.149     Mon Jul  4 23:08:56 2005
--- emacs/lisp/man.el   Sat Jul 23 22:51:33 2005
***************
*** 352,357 ****
--- 352,358 ----
  (make-variable-buffer-local 'Man-page-mode-string)
  (make-variable-buffer-local 'Man-original-frame)
  (make-variable-buffer-local 'Man-arguments)
+ (put 'Man-arguments 'permanent-local t)
  
  (setq-default Man-sections-alist nil)
  (setq-default Man-refpages-alist nil)
***************
*** 1005,1012 ****
            (if Man-fontify-manpage-flag
                (Man-fontify-manpage)
              (Man-cleanup-manpage))
            (run-hooks 'Man-cooked-hook)
!           (Man-mode)
            (set-buffer-modified-p nil)
            ))
        ;; Restore case-fold-search before calling
--- 1006,1020 ----
            (if Man-fontify-manpage-flag
                (Man-fontify-manpage)
              (Man-cleanup-manpage))
+ 
            (run-hooks 'Man-cooked-hook)
!         (Man-mode)
! 
!         (if (not Man-page-list)
!             (let ((args Man-arguments))
!               (kill-buffer (current-buffer))
!               (error "Can't find the %s manpage" args)))
! 
            (set-buffer-modified-p nil)
            ))
        ;; Restore case-fold-search before calling
***************
*** 1082,1088 ****
    (Man-build-page-list)
    (Man-strip-page-headers)
    (Man-unindent)
!   (Man-goto-page 1)
    (run-mode-hooks 'Man-mode-hook))
  
  (defsubst Man-build-section-alist ()
--- 1090,1096 ----
    (Man-build-page-list)
    (Man-strip-page-headers)
    (Man-unindent)
!   (Man-goto-page 1 t)
    (run-mode-hooks 'Man-mode-hook))
  
  (defsubst Man-build-section-alist ()
***************
*** 1342,1376 ****
    (interactive)
    (quit-window))
  
! (defun Man-goto-page (page)
    "Go to the manual page on page PAGE."
    (interactive
     (if (not Man-page-list)
!        (let ((args Man-arguments))
!        (kill-buffer (current-buffer))
!        (error "Can't find the %s manpage" args))
       (if (= (length Man-page-list) 1)
         (error "You're looking at the only manpage in the buffer")
         (list (read-minibuffer (format "Go to manpage [1-%d]: "
                                      (length Man-page-list)))))))
!   (if (not Man-page-list)
!       (let ((args Man-arguments))
!       (kill-buffer (current-buffer))
!       (error "Can't find the %s manpage" args)))
!   (if (or (< page 1)
!         (> page (length Man-page-list)))
!       (error "No manpage %d found" page))
!   (let* ((page-range (nth (1- page) Man-page-list))
!        (page-start (car page-range))
!        (page-end (car (cdr page-range))))
!     (setq Man-current-page page
!         Man-page-mode-string (Man-make-page-mode-string))
!     (widen)
!     (goto-char page-start)
!     (narrow-to-region page-start page-end)
!     (Man-build-section-alist)
!     (Man-build-references-alist)
!     (goto-char (point-min))))
  
  
  (defun Man-next-manpage ()
--- 1350,1381 ----
    (interactive)
    (quit-window))
  
! (defun Man-goto-page (page noerror)
    "Go to the manual page on page PAGE."
    (interactive
     (if (not Man-page-list)
!        (error "Not a man page buffer")
       (if (= (length Man-page-list) 1)
         (error "You're looking at the only manpage in the buffer")
         (list (read-minibuffer (format "Go to manpage [1-%d]: "
                                      (length Man-page-list)))))))
!   (if (and (not Man-page-list) (not noerror))
!       (error "Not a man page buffer"))
!   (when Man-page-list
!     (if (or (< page 1)
!           (> page (length Man-page-list)))
!       (error "No manpage %d found" page))
!     (let* ((page-range (nth (1- page) Man-page-list))
!          (page-start (car page-range))
!          (page-end (car (cdr page-range))))
!       (setq Man-current-page page
!           Man-page-mode-string (Man-make-page-mode-string))
!       (widen)
!       (goto-char page-start)
!       (narrow-to-region page-start page-end)
!       (Man-build-section-alist)
!       (Man-build-references-alist)
!       (goto-char (point-min)))))
  
  
  (defun Man-next-manpage ()




reply via email to

[Prev in Thread] Current Thread [Next in Thread]