all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* Fontifying one char strings.
@ 2005-10-16 15:16 Michael Cadilhac
  2005-10-16 15:29 ` Jesper Harder
  0 siblings, 1 reply; 4+ messages in thread
From: Michael Cadilhac @ 2005-10-16 15:16 UTC (permalink / raw)



[-- Attachment #1.1: Type: text/plain, Size: 1483 bytes --]


  Hello !

  In a docstring, if I have :

  "`nil' if blahblah, `t' otherwise.",

  only nil will be fontified with font-lock-constant-face.

  I'm wondering why  this should be that way,  I'm using the following
  patch without being annoyed:

*** emacs/lisp/font-lock.el	2005-10-16 17:07:12.000000000 +0200
--- emacs/lisp/font-lock.el	2005-10-16 17:07:30.000000000 +0200
***************
*** 2077,2083 ****
         ;; Words inside \\[] tend to be for `substitute-command-keys'.
         ("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
         ;; Words inside `' tend to be symbol names.
!        ("`\\(\\sw\\sw+\\)'" 1 font-lock-constant-face prepend)
         ;; Constant values.
         ("\\<:\\sw+\\>" 0 font-lock-builtin-face)
         ;; ELisp and CLisp `&' keywords as types.
--- 2077,2083 ----
         ;; Words inside \\[] tend to be for `substitute-command-keys'.
         ("\\\\\\\\\\[\\(\\sw+\\)]" 1 font-lock-constant-face prepend)
         ;; Words inside `' tend to be symbol names.
!        ("`\\(\\sw+\\)'" 1 font-lock-constant-face prepend)
         ;; Constant values.
         ("\\<:\\sw+\\>" 0 font-lock-builtin-face)
         ;; ELisp and CLisp `&' keywords as types.

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 08.70.65.13.14 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

[-- Attachment #1.2: Type: application/pgp-signature, Size: 188 bytes --]

[-- Attachment #2: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

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

* Re: Fontifying one char strings.
  2005-10-16 15:16 Fontifying one char strings Michael Cadilhac
@ 2005-10-16 15:29 ` Jesper Harder
  2005-10-16 15:49   ` Michael Cadilhac
  2005-10-17  4:33   ` Richard M. Stallman
  0 siblings, 2 replies; 4+ messages in thread
From: Jesper Harder @ 2005-10-16 15:29 UTC (permalink / raw)


Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:

>   In a docstring, if I have :
>
>   "`nil' if blahblah, `t' otherwise.",

nil and t in docstrings shouldn't be quoted. This convention is
described somewhere in the Emacs manual.

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

* Re: Fontifying one char strings.
  2005-10-16 15:29 ` Jesper Harder
@ 2005-10-16 15:49   ` Michael Cadilhac
  2005-10-17  4:33   ` Richard M. Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Michael Cadilhac @ 2005-10-16 15:49 UTC (permalink / raw)


Jesper Harder <jesper.harder@gmail.com> writes:

> Michael Cadilhac <michael.cadilhac-@t-lrde.epita.fr> writes:
>
>>   In a docstring, if I have :
>>
>>   "`nil' if blahblah, `t' otherwise.",
>
> nil and t in docstrings shouldn't be quoted. This convention is
> described somewhere in the Emacs manual.

  And what about comments ?

-- 
    Michael Cadilhac, a.k.a. Micha [mika] |
                    Epita/LRDE promo 2007 |  Please note that you should
  2 rue de la Convention | 08.70.65.13.14 |  s/-@t-/@/ my mail address.
94270 Le Kremlin Bicetre | 06.23.20.31.30 |

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

* Re: Fontifying one char strings.
  2005-10-16 15:29 ` Jesper Harder
  2005-10-16 15:49   ` Michael Cadilhac
@ 2005-10-17  4:33   ` Richard M. Stallman
  1 sibling, 0 replies; 4+ messages in thread
From: Richard M. Stallman @ 2005-10-17  4:33 UTC (permalink / raw)
  Cc: emacs-devel

    >   In a docstring, if I have :
    >
    >   "`nil' if blahblah, `t' otherwise.",

    nil and t in docstrings shouldn't be quoted. This convention is
    described somewhere in the Emacs manual.

That is true.  However, there is still the question of what to do
about other one-letter symbol names, should they appear.

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

end of thread, other threads:[~2005-10-17  4:33 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-10-16 15:16 Fontifying one char strings Michael Cadilhac
2005-10-16 15:29 ` Jesper Harder
2005-10-16 15:49   ` Michael Cadilhac
2005-10-17  4:33   ` Richard M. Stallman

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.