emacs-diffs
[Top][All Lists]
Advanced

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

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


From: Miles Bader
Subject: [Emacs-diffs] Changes to emacs/lisp/help-mode.el
Date: Fri, 04 Apr 2003 01:22:18 -0500

Index: emacs/lisp/help-mode.el
diff -c emacs/lisp/help-mode.el:1.14 emacs/lisp/help-mode.el:1.15
*** emacs/lisp/help-mode.el:1.14        Tue Jul 16 12:02:35 2002
--- emacs/lisp/help-mode.el     Mon Feb 10 16:52:30 2003
***************
*** 443,473 ****
  ;;;###autoload
  (defun help-xref-on-pp (from to)
    "Add xrefs for symbols in `pp's output between FROM and TO."
!   (let ((ost (syntax-table)))
!     (unwind-protect
!       (save-excursion
!         (save-restriction
!           (set-syntax-table emacs-lisp-mode-syntax-table)
!           (narrow-to-region from to)
!           (goto-char (point-min))
!           (condition-case nil
!               (while (not (eobp))
!                 (cond
!                  ((looking-at "\"") (forward-sexp 1))
!                  ((looking-at "#<") (search-forward ">" nil 'move))
!                  ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
!                   (let* ((sym (intern-soft (match-string 1)))
!                          (type (cond ((fboundp sym) 'help-function)
!                                      ((or (memq sym '(t nil))
!                                           (keywordp sym))
!                                       nil)
!                                      ((and sym (boundp sym))
!                                       'help-variable))))
!                     (when type (help-xref-button 1 type sym)))
!                   (goto-char (match-end 1)))
!                  (t (forward-char 1))))
!             (error nil))))
!       (set-syntax-table ost))))
  
  
  ;; Additional functions for (re-)creating types of help buffers.
--- 443,471 ----
  ;;;###autoload
  (defun help-xref-on-pp (from to)
    "Add xrefs for symbols in `pp's output between FROM and TO."
!   (if (> (- to from) 5000) nil
!     (with-syntax-table emacs-lisp-mode-syntax-table
!       (save-excursion
!       (save-restriction
!         (narrow-to-region from to)
!         (goto-char (point-min))
!         (condition-case nil
!             (while (not (eobp))
!               (cond
!                ((looking-at "\"") (forward-sexp 1))
!                ((looking-at "#<") (search-forward ">" nil 'move))
!                ((looking-at "\\(\\(\\sw\\|\\s_\\)+\\)")
!                 (let* ((sym (intern-soft (match-string 1)))
!                        (type (cond ((fboundp sym) 'help-function)
!                                    ((or (memq sym '(t nil))
!                                         (keywordp sym))
!                                     nil)
!                                    ((and sym (boundp sym))
!                                     'help-variable))))
!                   (when type (help-xref-button 1 type sym)))
!                 (goto-char (match-end 1)))
!                (t (forward-char 1))))
!           (error nil)))))))
  
  
  ;; Additional functions for (re-)creating types of help buffers.




reply via email to

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