unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* define-generic-mode: unexpected handling of comment-end
@ 2004-11-24  9:46 Kai Grossjohann
  2004-11-24 14:03 ` Stefan Monnier
  0 siblings, 1 reply; 3+ messages in thread
From: Kai Grossjohann @ 2004-11-24  9:46 UTC (permalink / raw)


It seems that it doesn't work to specify ("# " . "") for comments:

Debugger entered--Lisp error: (args-out-of-range "" 0)
  generic-mode-set-comments((("# " . "")))
  generic-mode-internal(baselib-config-mode (("# " . "")) ("include") nil nil)
  baselib-config-mode()
  set-auto-mode-0(baselib-config-mode nil)
  set-auto-mode()
  normal-mode(t)
  after-find-file(nil nil t t nil)
  revert-buffer(t)
  call-interactively(revert-buffer)

Specifying ("# " . nil) instead works as I intended ("# " . "") to work.

Shouldn't the documentation say that comment-end is handled specially?

Here's the code:

(define-generic-mode
  'baselib-config-mode                  ;name
  '(("# " . nil))                       ;comment-list
  '("include")                          ;keyword-list
  nil                                   ;font-lock-list
  '("\\.cfg\\'")                        ;auto-mode-list
  nil                                   ;function-list
  "Mode for editing baselib config files.")

Kai

^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2004-11-25  9:54 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-24  9:46 define-generic-mode: unexpected handling of comment-end Kai Grossjohann
2004-11-24 14:03 ` Stefan Monnier
2004-11-25  9:54   ` Kai Grossjohann

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).