From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.help Subject: Re: Seeking advice on writing a "line-based" major mode Date: Wed, 17 Jun 2015 21:50:14 -0400 Organization: A noiseless patient Spider Message-ID: References: <87wpzf9q38.fsf@mbork.pl> <871thmpbh7.fsf@tromey.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1434592528 3184 80.91.229.3 (18 Jun 2015 01:55:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 18 Jun 2015 01:55:28 +0000 (UTC) To: help-gnu-emacs@gnu.org Original-X-From: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Thu Jun 18 03:55:24 2015 Return-path: Envelope-to: geh-help-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Z5P2z-0001eM-Vm for geh-help-gnu-emacs@m.gmane.org; Thu, 18 Jun 2015 03:55:18 +0200 Original-Received: from localhost ([::1]:49927 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Z5P2y-0005o9-TJ for geh-help-gnu-emacs@m.gmane.org; Wed, 17 Jun 2015 21:55:16 -0400 Original-Path: usenet.stanford.edu!news.glorb.com!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail Original-Newsgroups: gnu.emacs.help Original-Lines: 15 Injection-Info: mx02.eternal-september.org; posting-host="57a6bd8b47e5d85183f0e9788fd6074b"; logging-data="3345"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/yTvpr8YJBy3ARnVnc3JU6" User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/25.0.50 (gnu/linux) Cancel-Lock: sha1:FX97x8JzgNogicqBtFV+kY6F6q4= sha1:vhQIsHPO19ppH1P8BFBqQjGnqRU= Original-Xref: usenet.stanford.edu gnu.emacs.help:212745 X-BeenThere: help-gnu-emacs@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: Users list for the GNU Emacs text editor List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Original-Sender: help-gnu-emacs-bounces+geh-help-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.help:105029 Archived-At: > correctly that I can just safely (setq my-ewoc (ewoc-create ...)), > knowing that the old one will be GC'ed automatically? You don't need to re-create the ewoc, but you can instead clear it (e.g. with ewoc-filter) and then re-fill it. > Also, I'd like to color various entries in my ewoc, using different > faces. Do I get it correctly that I should assign them faces right > after `insert'ing them in my pretty-printing function? Sounds fine, yes. Sometimes it's more convenient to assign the face to the strings before you insert them, but either way work fine. Stefan