Re: Tiny helper function
Felix Gatzemeier <[email protected]>
| Newsgroups | gmane.emacs.psgml.devel |
|---|---|
| Message-ID | <[email protected]> |
Hello! >>>>> "SB" == Steinar Bang <[email protected]> writes: >>>>> Felix Gatzemeier <[email protected]>: FG> As useful as it is to have the comments telling the user what FG> kinds of elements are expected, as annoying is it to keep FG> removing them (IMHO). SB> [snip!] FG> This has been working for a while for me (Using a custom FG> extension of DocBook) now, and I was just wondering whether FG> anybody else finds this useful --- or whether I've just FG> overlooked a switch ;-) SB> I'm a bit unsure of what your function does. If it ensures SB> that just a single comment is inserted, then the answer is no. It doesn't insert, it removes. So you can have the comment for required elements inserted (which I generally have, more as a reminder that _something_ will have to go there), without being bothered having to remove them. If you insert a required element in the whitespace before or after that comment, the comment is removed. It feels like replacing the comment with the element. SB> If your function insures that no comment is ever inserted, you SB> can instead try setting: (setq SB> sgml-insert-missing-element-comment nil) That's not quite what I want, as the comments are sometimes useful. Come to think of it, a useful extension would be to re-check whether more elements would be required, in something like ((a|b),(c|d)). And if that were added (or is present) in sgml-insert-element, this helper function may misbehave and remove that new comment in things like ((a|b),(a|b)). Well, it's an 80/20 thing. Best wishes, -- Felix H. Gatzemeier [email protected] Office Phone: (0(049)241)80-21313 Disclaimer: I do not speak for anyone but myself. Please do not send me mails containing documents in proprietary formats (such as Microsoft Word) unless you really need to. ------------------------------------------------------- This SF.Net email is sponsored by: INetU Attention Web Developers & Consultants: Become An INetU Hosting Partner. Refer Dedicated Servers. We Manage Them. You Get 10% Monthly Commission! INetU Dedicated Managed Hosting http://www.inetu.net/partner/index.php