Gnus development mailing list
 help / color / mirror / Atom feed
* gnus-emphasis-alist
@ 1996-10-30 12:19 Kai Grossjohann
  1996-10-30 12:29 ` gnus-emphasis-alist Kai Grossjohann
  1996-10-30 13:46 ` gnus-emphasis-alist Hrvoje Niksic
  0 siblings, 2 replies; 4+ messages in thread
From: Kai Grossjohann @ 1996-10-30 12:19 UTC (permalink / raw)


Hi,

is /this/ a common-enough way to codify italics to be added to the
default gnus-emphasis-alist?

kai
-- 
Life is hard and then you die.


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

* Re: gnus-emphasis-alist
  1996-10-30 12:19 gnus-emphasis-alist Kai Grossjohann
@ 1996-10-30 12:29 ` Kai Grossjohann
  1996-10-30 13:46 ` gnus-emphasis-alist Hrvoje Niksic
  1 sibling, 0 replies; 4+ messages in thread
From: Kai Grossjohann @ 1996-10-30 12:29 UTC (permalink / raw)


>>>>> Kai Grossjohann writes:

  Kai> Hi, is /this/ a common-enough way to codify italics to be added
  Kai> to the default gnus-emphasis-alist?

Never mind, it's in the default already.  Silly me :-(

kai
-- 
Life is hard and then you die.


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

* Re: gnus-emphasis-alist
  1996-10-30 12:19 gnus-emphasis-alist Kai Grossjohann
  1996-10-30 12:29 ` gnus-emphasis-alist Kai Grossjohann
@ 1996-10-30 13:46 ` Hrvoje Niksic
  1 sibling, 0 replies; 4+ messages in thread
From: Hrvoje Niksic @ 1996-10-30 13:46 UTC (permalink / raw)
  Cc: ding

Kai Grossjohann (grossjohann@charly.informatik.uni-dortmund.de) wrote:
> is /this/ a common-enough way to codify italics to be added to the
> default gnus-emphasis-alist?

That's what I wondered too.  BTW, it causes trouble in some obscure
places.

-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
The end of the world is coming...  SAVE YOUR BUFFERS!


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

* gnus-emphasis-alist
@ 1996-10-29 20:40 Hrvoje Niksic
  0 siblings, 0 replies; 4+ messages in thread
From: Hrvoje Niksic @ 1996-10-29 20:40 UTC (permalink / raw)


Since I have started using gnus-emphasis-alist, I have noticed that
the default was not too well chosen.  Try to press `W e' while viewing
this test example:

---example---
*test* something
something
_test_ something test_something_test _something test_ _something_
_something
test_
2*3*4
---end---

It is obviously wrong.  `something' in `test_something_test' is
highlighted, which shouldn't be, whereas `_something test_' is not
highlighted, whereas it probably should be.  I have worked a little on
that problem, and came up with the following regexps:

(setq gnus-emphasis-alist
  '(("\\(\\s-+\\|^\\)\\(_\\(\\w+\\([ \C-i]+\\w+\\)*\\)_\\)\\(\\s-+\\|$\\)" 2 3 underline)
    ("\\W\\(/\\(\\w+\\)/\\)\\W" 1 2 italic)
    ("\\(_\\*\\|\\*_\\)\\(\\w+\\)\\(_\\*\\|\\*_\\)" 0 2 bold-underline)
    ("\\(\\s-+\\|^\\)\\(*\\(\\w+\\)\\*\\)\\(\\s-+\\|$\\)" 2 3 bold))
  )

For these to work, a tiny buglet in article.el must be patched.
article.el jumps from regexp to regexp by stepping over _whole_
regexps, whereas I would like to step over the invisible part.  If you
apply the following patch and use the above regexps, you get behaviour
much more reasonable than default.

Is anyone willing to try out my changes?  Can they become the default?

*** article.el.orig	Fri Oct 11 12:07:35 1996
--- article.el	Tue Oct 29 21:15:10 1996
***************
*** 903,909 ****
  	     (match-beginning visible) (match-end visible) 'emphasis)
  	    (put-text-property 
  	     (match-beginning visible) (match-end visible)
! 	     'face face)))))))
  
  (provide 'article)
  
--- 903,910 ----
  	     (match-beginning visible) (match-end visible) 'emphasis)
  	    (put-text-property 
  	     (match-beginning visible) (match-end visible)
! 	     'face face)
! 	    (goto-char (match-end invisible))))))))
  
  (provide 'article)
  


-- 
Hrvoje Niksic <hniksic@srce.hr> | Student at FER Zagreb, Croatia
--------------------------------+--------------------------------
`VI' - An editor used by those heretics that don't subscribe to
       the Emacs religion.


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

end of thread, other threads:[~1996-10-30 13:46 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
1996-10-30 12:19 gnus-emphasis-alist Kai Grossjohann
1996-10-30 12:29 ` gnus-emphasis-alist Kai Grossjohann
1996-10-30 13:46 ` gnus-emphasis-alist Hrvoje Niksic
  -- strict thread matches above, loose matches on Subject: below --
1996-10-29 20:40 gnus-emphasis-alist Hrvoje Niksic

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).