mirror of
https://git.savannah.gnu.org/git/emacs.git
synced 2024-12-16 09:50:25 +00:00
(generic-mode-internal): Fix 2005-03-31 change.
(define-generic-mode): Ditto. Fix debug declaration.
This commit is contained in:
parent
a049b36c46
commit
5eee025da0
@ -226,7 +226,7 @@ You can specify keyword arguments without specifying a docstring.
|
||||
|
||||
See the file generic-x.el for some examples of `define-generic-mode'."
|
||||
(declare (debug (sexp def-form def-form def-form form def-form
|
||||
&optional stringp))
|
||||
[&optional stringp] &rest [keywordp form]))
|
||||
(indent 1))
|
||||
|
||||
;; Backward compatibility.
|
||||
@ -239,20 +239,20 @@ See the file generic-x.el for some examples of `define-generic-mode'."
|
||||
(push docstring custom-keyword-args)
|
||||
(setq docstring nil))
|
||||
|
||||
(let* ((mode-name (symbol-name mode))
|
||||
(let* ((name (symbol-name mode))
|
||||
(pretty-name (capitalize (replace-regexp-in-string
|
||||
"-mode\\'" "" mode-name)))
|
||||
(mode-hook (intern (concat mode-name "-hook"))))
|
||||
"-mode\\'" "" name)))
|
||||
(mode-hook (intern (concat name "-hook"))))
|
||||
|
||||
(unless (plist-get custom-keyword-args :group)
|
||||
(setq custom-keyword-args
|
||||
(plist-put custom-keyword-args
|
||||
:group `',(intern (replace-regexp-in-string
|
||||
"-mode\\'" "" mode-name)))))
|
||||
"-mode\\'" "" name)))))
|
||||
|
||||
`(progn
|
||||
;; Add a new entry.
|
||||
(add-to-list 'generic-mode-list ,mode-name)
|
||||
(add-to-list 'generic-mode-list ,name)
|
||||
|
||||
;; Add it to auto-mode-alist
|
||||
(dolist (re ,auto-mode-list)
|
||||
@ -275,10 +275,10 @@ See the file generic-x.el for some examples of `define-generic-mode'."
|
||||
(defun generic-mode-internal (mode comment-list keyword-list
|
||||
font-lock-list function-list)
|
||||
"Go into the generic mode MODE."
|
||||
(let* ((mode-name (symbol-name mode))
|
||||
(let* ((name (symbol-name mode))
|
||||
(pretty-name (capitalize (replace-regexp-in-string
|
||||
"-mode\\'" "" mode-name)))
|
||||
(mode-hook (intern (concat mode-name "-hook"))))
|
||||
"-mode\\'" "" name)))
|
||||
(mode-hook (intern (concat name "-hook"))))
|
||||
|
||||
(kill-all-local-variables)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user