• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /macosx-10.10/emacs-93/emacs/lisp/

Lines Matching +defs:function +defs:list

81 ;; `list-faces-display' shows the faces in a different order than
82 ;; this menu, which could be confusing. I do /not/ sort the list
114 Each element is itself a list: the car is the name of the face,
118 The faces specifically mentioned in this list are put at the top of
148 added to the Face menu, and need not be in this list.
151 list includes symbols which are not defined as faces, they
163 it will remove any faces not explicitly in the list."
257 (define-key map [dc] (cons (purecopy "Display Colors") 'list-colors-display))
258 (define-key map [df] (cons (purecopy "Display Faces") 'list-faces-display))
265 (define-key map [s1] (list (purecopy "--"))))
272 (define-key map [s2] (list (purecopy "--")))
294 (defcustom facemenu-add-face-function nil
296 This function is passed the FACE to set and END of text to change, and must
299 function)
303 "String to insert or function called at end of text to change or nil.
304 This function is passed the FACE to set, and must return a string which is
308 function)
311 (defcustom facemenu-remove-face-function nil
312 "When non-nil, this is a function called to remove faces.
313 This function is passed the START and END of text to change.
314 May also be t meaning to use `facemenu-add-face-function'."
317 function)
334 (facemenu-complete-face-list facemenu-keybindings)))
348 the list of faces to be used. For any other value of FACE,
349 to \"apply\" it means putting FACE at the front of the list
351 along in the list that would be completely overridden by
356 (interactive (list (progn
378 (interactive (list (progn
401 (interactive (list (progn
415 This function is designed to be called from a menu; FACE is determined
428 (interactive (list last-command-event
437 (list (list (if (string= (match-string 1 fn) "f")
506 (defun list-colors-display (&optional list buffer-name)
508 If the optional argument LIST is non-nil, it should be a list of
509 colors to display. Otherwise, this command computes a list of
513 (when (and (null list) (> (display-color-cells) 0))
514 (setq list (list-colors-duplicates (defined-colors)))
517 (let ((lc (nthcdr (1- (display-color-cells)) list)))
524 (if temp-buffer-show-function
525 (list-colors-print list)
526 ;; Call list-colors-print from temp-buffer-show-hook
527 ;; to get the right value of window-width in list-colors-print
530 (lambda () (list-colors-print list)) nil t)))))
532 (defun list-colors-print (list)
533 (dolist (color list)
539 (setq color (list color)))
561 (defun list-colors-duplicates (&optional list)
562 "Return a list of colors with grouped duplicate colors.
563 If a color has no duplicates, then the element of the returned list
564 has the form '(COLOR-NAME). The element of the returned list with
566 This function uses the predicate `facemenu-color-equal' to compare
568 be a list of colors to display. Otherwise, this function uses
569 a list of colors that the current display can handle."
570 (let* ((list (mapcar 'list (or list (defined-colors))))
571 (l list))
580 list))
585 This function queries the display system to find out what the color
596 that will be removed from the list.
597 If `facemenu-add-face-function' and maybe `facemenu-end-add-face' are non-nil,
602 effect. See `facemenu-remove-face-function'."
605 (not (eq facemenu-remove-face-function t)))
606 (if facemenu-remove-face-function
607 (funcall facemenu-remove-face-function start end)
612 (if facemenu-add-face-function
618 (funcall facemenu-add-face-function face end)))
636 (list prev)))
646 (list self-insert-face)))
652 (defun facemenu-active-faces (face-list &optional frame)
659 (if (consp (car face-list))
660 (face-attributes-as-vector (car face-list))
661 (or (internal-lisp-face-p (car face-list) frame)
662 (check-face (car face-list))))))
663 (active-list (list (car face-list)))
664 (face-list (cdr face-list))
666 (while face-list
668 (if (consp (car face-list))
669 (face-attributes-as-vector (car face-list))
670 (or (internal-lisp-face-p (car face-list) frame)
671 (check-face (car face-list)))))
679 (setq active-list (cons (car face-list) active-list)))
680 (setq face-list (cdr face-list)))
681 (nreverse active-list)))
690 function menu-val)
710 (cdr (symbol-function menu))))
713 (setq function (intern (concat "facemenu-set-" name)))
714 (fset function
724 (define-key 'facemenu-keymap key (cons name function))
725 (define-key menu key (cons name function)))
730 function 'facemenu-set-face-from-menu
731 menu-val (symbol-function menu))
734 (define-key-after menu-val key (cons name function)
736 (define-key menu key (cons name function))))))
762 (cdr (symbol-function menu)))
765 (function 'facemenu-set-face-from-menu)
766 (menu-val (symbol-function menu)))
769 (define-key-after menu-val key (cons color function)
771 (define-key menu key (cons color function)))))
774 (defun facemenu-complete-face-list (&optional oldlist)
775 "Return list of all faces that look different.
777 differently from any face already on the list.
778 The faces on ALIST will end up at the end of the returned list, in reverse
780 (let ((list (nreverse (mapcar 'car oldlist))))
783 (if (not (memq new-face list))
784 (setq list (cons new-face list)))
786 (nreverse (face-list)))
787 list))
789 (defun facemenu-iterate (func list)
792 (while (and list (not (funcall func (car list))))
793 (setq list (cdr list)))
794 (car list))