+2000-12-21 Stefan Monnier <monnier@cs.yale.edu>
+
+ * generic.el (generic-read-type): Undo last change, inline into
+ `generic-mode' and then remove.
+ (generic-mode): Inline generic-read-type.
+ (define-generic-mode): Push the symbol name rather than the symbol
+ onto generic-mode-list.
+
2000-12-21 Gerd Moellmann <gerd@gnu.org>
* generic.el (generic-read-type): Build an alist for
:type 'regexp
)
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-;; Inline functions
-;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
-
-(defsubst generic-read-type ()
- (completing-read
- "Generic Type: "
- (mapcar (lambda (elt) (list (symbol-name (car elt))))
- nil t))
-
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Add a new entry
(unless (assq name generic-mode-list)
- (push (list name) generic-mode-list))
+ (push (list (symbol-name name)) generic-mode-list))
;; Add it to auto-mode-alist
(dolist (re auto-mode-list)
To define a generic-mode, use the function `define-generic-mode'.
Some generic modes are defined in `generic-x.el'."
(interactive
- (list (generic-read-type)))
+ (list (completing-read "Generic Type: " generic-mode-list nil t)))
(funcall (intern type)))
;;; Comment Functionality