emacs-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 23.0.50; ielm doesn't handle comments


From: Bastien
Subject: Re: 23.0.50; ielm doesn't handle comments
Date: Fri, 15 Feb 2008 00:41:14 +0000
User-agent: Gnus/5.110007 (No Gnus v0.7) Emacs/23.0.60 (gnu/linux)

Lawrence Mitchell <address@hidden> writes:

> Bastien Guerry wrote:
>
>
> [...]
>
>
>>> (defun ielm-trim-comments (string)
>>>  "Trim comments in STRING."
>>>  (let ((pos (previous-single-property-change
>>>           (length string) 'face string)))
>>>    (if (eq (get-text-property pos 'face)
>>>         'font-lock-comment-face)
>>>     (substring string 0 pos))))
>
> This breaks if the user doesn't use font-lock.

Right.  I have come up with another solution, not relying on font-lock,
but this one doesn't allow the double-quote character in comments.

Please improve it if you can.  If no objection/suggestion until next
week, I'll apply this one.

Attachment: ieml.el.patch
Description: Text Data

-- 
Bastien

reply via email to

[Prev in Thread] Current Thread [Next in Thread]