Espen Skoglund <[EMAIL PROTECTED]> wrote:
> Ran checkdoc and fixed all the suggestions there. Been a while since
> I wrote this thing. At that time you were told not to include doc
> strings unless necessary. Seems things have changed since then.
Thanks for doing that!
Strangely, the following does eval in Emacs-21 :
(defun header-regexpify (str)
"Escape the characters *+-\^$ in STR. Return the new string."
(let ((start 0)
(ret "")
match prev)
(while (setq match (string-match "[*+\\-\\\\^$]" str start))
(setq prev start
start (match-end 0)
ret (concat ret (substring str prev match) "\\"
(substring str (match-beginning 0) start))))
(concat ret (substring str start))))
-> Invalid modifier in string
> > 2- Shouldn't this be a minor-mode ? That would avoid the global keymap
> > bindings and would reduce the autoload cookies to only the minor-mode
> > command.
>
> Yeah. I don't know. I guess it depends on the usage scenario. Do
> you suggest that you first enable the minor mode before invoking the
> command to insert file or function headers?
That's what I thought. Someone how uses it a lot on certain file types
would probably invoke it within a hook.
> And how about automatic
> updates when saving the buffer? How does that play along with minor
> modes? I honestly don't know/can't remember.
I haven't realy done anything more than quickly try the code, so I'm not
familiar enough to know how it updates files it handles. I'll try to
use it a bit (unless you have an example case to describe).
Thanks again,
Peter
--
To UNSUBSCRIBE, email to [EMAIL PROTECTED]
with a subject of "unsubscribe". Trouble? Contact [EMAIL PROTECTED]