Function: info-lookup-add-help*

info-lookup-add-help* is a byte-compiled function defined in info-look.el.gz.

Signature

(info-lookup-add-help* MAYBE &rest ARG)

Source Code

;; Defined in /usr/src/emacs/lisp/info-look.el.gz
(defun info-lookup-add-help* (maybe &rest arg)
  (let (topic mode regexp ignore-case doc-spec
	      parse-rule other-modes keyword value
              doc-spec-function)
    (setq topic 'symbol
	  mode major-mode
	  regexp "\\w+")
    (while arg
      (setq keyword (car arg))
      (or (symbolp keyword)
	  (error "Junk in argument list \"%S\"" arg))
      (setq arg (cdr arg))
      (and (null arg)
	   (error "Keyword \"%S\" is missing an argument" keyword))
      (setq value (car arg)
	    arg (cdr arg))
      (cond ((eq keyword :topic)
	     (setq topic value))
	    ((eq keyword :mode)
	     (setq mode value))
	    ((eq keyword :regexp)
	     (setq regexp value))
	    ((eq keyword :ignore-case)
	     (setq ignore-case value))
	    ((eq keyword :doc-spec)
	     (setq doc-spec value))
	    ((eq keyword :doc-spec-function)
	     (setq doc-spec-function value))
	    ((eq keyword :parse-rule)
	     (setq parse-rule value))
	    ((eq keyword :other-modes)
	     (setq other-modes value))
	    (t
	     (error "Unknown keyword \"%S\"" keyword))))
    (or (and maybe (info-lookup->mode-value topic mode))
	(let* ((data (list regexp ignore-case doc-spec parse-rule other-modes
                           doc-spec-function))
	       (topic-cell (or (assoc topic info-lookup-alist)
			       (car (setq info-lookup-alist
					  (cons (cons topic nil)
						info-lookup-alist)))))
	       (mode-cell (assoc mode topic-cell)))
	  (if (null mode-cell)
	      (setcdr topic-cell (cons (cons mode data) (cdr topic-cell)))
	    (setcdr mode-cell data))))
    nil))