Path: utzoo!utgpu!jarvis.csri.toronto.edu!cs.utexas.edu!execu!sequoia!natinst!bigtex!rena!kogwy!titcca!etlcom!handa From: handa@etl.go.jp (Kenichi Handa) Newsgroups: gnu.emacs Subject: Re: highlighting regions Message-ID: Date: 3 Dec 89 11:21:47 GMT References: <8912010303.AA04365@tardis.isi.edu> Sender: news@etl.go.jp Distribution: gnu Organization: Electrotechnical Lab., Japan. Lines: 42 In-reply-to: katz@VENERA.ISI.EDU's message of 1 Dec 89 03:03:03 GMT In article <8912010303.AA04365@tardis.isi.edu> katz@VENERA.ISI.EDU writes: |Is there ever going to be highlighting of regions in GNU Emacs? Does |anyone know of patches to do this either running on any terminal that |supports reverse video or under X? It seems like it should be easy to |do when running under X. (I don't really need such things, but some |users here want it). I have modified buffer.[ch], dispextern.h, dispnew.h, xdisp.c, x11term.h and wrote attribute.el for setting character attributes between two markers. Once attributes are set in certain region, characters inserted later in that region also have the same attribute. Currently supported attributes are 'inverse (or to say highlight)' and 'underline'. My modification is effective only under X. If there's many requests, I'll post the patches. --- Ken'ichi HANDA PS. Functions defined in attribute.el: attribute-on-region: Sets an charater attribute ATTR within the region on. Currently supported attributes are 'underline' and 'inverse'. Called from program, takes two optional arguments FROM and TO. If FROM or TO is NIL, (point-min) or (point-max) is used instead. Information of attribute is stored in buffer local variables underlined-region and inversed-region, but manipulating these variabels directly may cause serious problems. attribute-off-region: Sets an charater attribute ATTR within the region off. See the function attribute-on-region for more detail. attribute-get-attribute: Returns a list of attribute ranges at POS. An attribute range is a list of three elements, attribute type, the starting point, and the ending point. POS is an optional argument and the default is the current point. Brought to you by Super Global Mega Corp .com