all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* A patch for lisp-mode font lock with defstruct
@ 2005-06-07  0:57 David McCabe
  0 siblings, 0 replies; only message in thread
From: David McCabe @ 2005-06-07  0:57 UTC (permalink / raw)


[-- Attachment #1: Type: text/plain, Size: 842 bytes --]

Hello.

I noticed while editing Common Lisp code that emacs does not correctly
highlight the docstring of defstruct expressions, but highlights them
as if they were regular old strings.

This is a small patch against emacs CVS which rectifies the problem by
specifying the doc-string-elt property for defstruct. I'm using the
multi-tty branch, but I doubt this makes any difference here.

I'm not 100% sure that this is the correct place to make this
modification; I haven't fully explored how the different dialects of
Lisp are handled by lisp-mode; it appears to be primarily centered
around Elisp. But since Elisp defstruct is compatible with Common Lisp
defstruct (at least as far as the position of its docstring goes), I
don't see how this could actually break anything.

Thank you for your time.

-- 
David McCabe

[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: lisp-mode.el.patch --]
[-- Type: text/x-patch; name="lisp-mode.el.patch", Size: 465 bytes --]

--- /usr/local/share/emacs/22.0.50/lisp/emacs-lisp/lisp-mode.el	2005-06-04 14:56:10.000000000 -0700
+++ .emacs-lisp/lisp-mode.el	2005-06-06 17:42:14.997807320 -0700
@@ -129,6 +129,7 @@
 (put 'defmacro 'doc-string-elt 3)
 (put 'defmacro* 'doc-string-elt 3)
 (put 'defsubst 'doc-string-elt 3)
+(put 'defstruct 'doc-string-elt 2)
 (put 'define-skeleton 'doc-string-elt 2)
 (put 'define-derived-mode 'doc-string-elt 4)
 (put 'define-compilation-mode 'doc-string-elt 3)

[-- Attachment #3: Type: text/plain, Size: 149 bytes --]

_______________________________________________
Bug-gnu-emacs mailing list
Bug-gnu-emacs@gnu.org
http://lists.gnu.org/mailman/listinfo/bug-gnu-emacs

^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2005-06-07  0:57 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-07  0:57 A patch for lisp-mode font lock with defstruct David McCabe

Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.