Local Variables: elementary question

Andreas Roehler andreas.roehler at online.de
Mon May 18 15:32:25 EDT 2009


Uwe Brauer wrote:
>>>>>> "Andreas" == Andreas Roehler <andreas.roehler at online.de> writes:
> 
>    > Uwe Brauer wrote:
>    >>>>>>> "Stephen" == Stephen J Turnbull <stephen at xemacs.org> writes:
>    >> 
>    >> > Uwe Brauer writes:
>    >> >> Is there any package or function which allows me to actualise the values
>    >> >> which are defined in Local Variables?
>    >> 
>    >> > I don't understand what you mean by "actualize".  The variables are
>    >> > automatically read when you read the file.  To write new values is a
>    >> > little complicated, and depends on the context.
>    >> 
>    >> That is what I meant.
>    >> 
>    >> Its about the primitive hack I wrote for 'permanent' footnotes.
>    >> The variable which controls the footnote numbering is called
>    >> counter-value.
>    >> 
>    >> Now I have to save this variable when closing the file.
>    >> Either by 
>    >> write-file-hooks 
>    >> or 
>    >> kill-buffer-hook 
>    >> 
>    >> Or something like this.
>    >> 
>    >> My first intent was something like this.
>    >> 
>    >> (defun my-insert-counter-value ()
>    >> (interactive)
>    >> (save-excursion
>    >> (goto-char (point-max))
>    >> (search-backward ";;; counter-value:")
>    >> (beginning-of-line 1)
>    >> (search-forward ";;; counter-value:")
>    >> (kill-line)
>    >> (insert (concat " " (format "%d" counter-value) " "))))
>    >> 
>    >> However I have to include the case that there might be no Local-Variable
>    >> in this file.
>    >> 
>    >> Uwe 
>    >> 
>    >> _______________________________________________
>    >> XEmacs-Beta mailing list
>    >> XEmacs-Beta at xemacs.org
>    >> http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
>    >> 
> 
>    > Hi Uwe,
> 
>    > footnote.el was buggy. I wrote a fix several month ago, using GNU
>    > that time.  Footnote didn't detect already existing footnotes
>    > correctly.  Should you be interested, I may look for the stuff.
> 
>    > Andreas
> 
> 
> Indeed I would be very much interested.
> 
> I have written a primitive hack, which uses the counter pkg and regexp
> search for navigation. If you can generalist footnote.el that would be
> great. Where can I find you version?
> 
> Uwe 
> 
> 

here it is.




-------------- next part --------------
A non-text attachment was scrubbed...
Name: footnote-init.el
Type: text/x-emacs-lisp
Size: 3763 bytes
Desc: not available
Url : http://calypso.tux.org/pipermail/xemacs-beta/attachments/20090518/21da4dab/attachment.bin 


More information about the XEmacs-Beta mailing list