Mercurial > emacs
comparison lisp/generic.el @ 60595:b392b963c10b
(define-generic-mode): Let generic-mode-list be a list of strings;
test membership with equal.
author | Lute Kamstra <lute@gnu.org> |
---|---|
date | Mon, 14 Mar 2005 11:06:20 +0000 |
parents | 275bfc016770 |
children | 1771db839aa6 30ad2795fdab |
comparison
equal
deleted
inserted
replaced
60594:362e4cd2e9f8 | 60595:b392b963c10b |
---|---|
1 ;;; generic.el --- defining simple major modes with comment and font-lock | 1 ;;; generic.el --- defining simple major modes with comment and font-lock |
2 ;; | 2 ;; |
3 ;; Copyright (C) 1997, 1999, 2004 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1997, 1999, 2004, 2005 Free Software Foundation, Inc. |
4 ;; | 4 ;; |
5 ;; Author: Peter Breton <pbreton@cs.umb.edu> | 5 ;; Author: Peter Breton <pbreton@cs.umb.edu> |
6 ;; Created: Fri Sep 27 1996 | 6 ;; Created: Fri Sep 27 1996 |
7 ;; Keywords: generic, comment, font-lock | 7 ;; Keywords: generic, comment, font-lock |
8 | 8 |
213 FUNCTION-LIST is a list of functions to call to do some additional setup. | 213 FUNCTION-LIST is a list of functions to call to do some additional setup. |
214 | 214 |
215 See the file generic-x.el for some examples of `define-generic-mode'." | 215 See the file generic-x.el for some examples of `define-generic-mode'." |
216 | 216 |
217 ;; Add a new entry | 217 ;; Add a new entry |
218 (unless (assq name generic-mode-list) | 218 (add-to-list 'generic-mode-list (symbol-name name)) |
219 (push (list (symbol-name name)) generic-mode-list)) | |
220 | 219 |
221 ;; Add it to auto-mode-alist | 220 ;; Add it to auto-mode-alist |
222 (dolist (re auto-mode-list) | 221 (dolist (re auto-mode-list) |
223 (add-to-list 'auto-mode-alist (cons re name))) | 222 (add-to-list 'auto-mode-alist (cons re name))) |
224 | 223 |