(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.
This commit is contained in:
Stefan Monnier 2000-12-21 23:26:09 +00:00
parent 80e0ca99ce
commit 3ad93d8dc4
2 changed files with 10 additions and 12 deletions

View file

@ -1,3 +1,11 @@
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

View file

@ -166,16 +166,6 @@ Used to determine if files in fundamental mode should be put into
:type 'regexp
)
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Inline functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
(defsubst generic-read-type ()
(completing-read
"Generic Type: "
(mapcar (lambda (elt) (list (symbol-name (car elt))))
nil t))
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
;; Functions
;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;
@ -216,7 +206,7 @@ See the file generic-x.el for some examples of `define-generic-mode'."
;; 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)
@ -275,7 +265,7 @@ comment characters, keywords, and the like.)
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