Function: artist-compute-popup-menu-table-sub

artist-compute-popup-menu-table-sub is a byte-compiled function defined in artist.el.gz.

Signature

(artist-compute-popup-menu-table-sub MENU-TABLE)

Documentation

Compute operation table suitable for x-popup-menu from MENU-TABLE.

Source Code

;; Defined in /usr/src/emacs/lisp/textmodes/artist.el.gz
(defun artist-compute-popup-menu-table-sub (menu-table)
  "Compute operation table suitable for `x-popup-menu' from MENU-TABLE."
  (mapcar
   (lambda (element)
     (let ((element-tag (artist-mt-get-tag element)))
       (cond ((eq element-tag 'graphics-operation)
	      (let* ((info-part (artist-mt-get-info-part element))
		     (descr     (artist-go-get-desc info-part))
		     (unshifted (artist-go-get-unshifted info-part))
		     (symbol    (artist-go-get-symbol unshifted)))
		(list descr symbol)))

	     ((eq element-tag 'function-call)
	      (let* ((info-part (artist-mt-get-info-part element))
		     (keyword   (artist-fc-get-keyword info-part))
		     (symbol    (artist-fc-get-symbol info-part)))
		(list keyword symbol)))

	     ((eq element-tag 'separator)
	      '("" ""))

	     ((eq element-tag 'menu)
	      (let* ((info-part (artist-mt-get-info-part element))
		     (title     (artist-mn-get-title info-part))
		     (items     (artist-mn-get-items info-part)))
		(cons title (artist-compute-popup-menu-table-sub items))))

	     (t
	      (error "Internal error: unknown element-tag: \"%s\""
		     element-tag)))))
   menu-table))