Function: help-xref-on-pp

help-xref-on-pp is an autoloaded and byte-compiled function defined in help-mode.el.gz.

Signature

(help-xref-on-pp FROM TO)

Documentation

Add xrefs for symbols in pps output between FROM and TO.

Source Code

;; Defined in /usr/src/emacs/lisp/help-mode.el.gz
;;;###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 help-mode-syntax-table
      (save-excursion
	(save-restriction
	  (narrow-to-region from to)
	  (goto-char (point-min))
	  (ignore-errors
	    (while (not (eobp))
	      (cond
	       ((looking-at-p "\"") (forward-sexp 1))
	       ((looking-at-p "#<") (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
					 (or (boundp sym)
					     (get sym
						  'variable-documentation)))
				    'help-variable))))
		  (when type (help-xref-button 1 type sym)))
		(goto-char (match-end 1)))
	       (t (forward-char 1))))))))))