[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[AUCTeX-devel] Re: Contribution to AUCTeXâ

From: Ralf Angeli
Subject: [AUCTeX-devel] Re: Contribution to AUCTeXâ
Date: Sun, 18 Jul 2010 17:34:36 +0200

Please keep the mailing list copied!

* Vincent Belaïche (2010-07-12) writes:

>> removed the whitespace from the file in the CVS repository so that you
>> don't have to clutter the patch with it anymore.
> Please find attached the updated patch (no change in my contribution,
> only in the .old that was updated w.r.t repository)


>> I haven't had the chance to look more deeply into the other changes and
>> discussion topics, but will do so during the upcoming week.
> To my recollection the topics not yet concluded are the following:
> 1) which keybindings to use for the two new functions.

I've looked at possible bindings with `@' and `h' (which are used
together with commands for marking) but I failed to come up with two
nice bindings which could cover both the commands for marking Texinfo
environments and sections.  So perhaps we should keep `C-c .' and
`C-c *' for now.

> 2) how to change the interface for marking section/node (use two
> different functions, use a different meaning for the universal prefix
> argument...)

The comparison of nodes and chapter structuring commands in the Texinfo
manual (see (info "(texinfo)Two Paths")) describes both concepts of
being technically independent of each other.  That's one of the reasons
I think we should have two separate marking functions, one for nodes and
one for chapter structuring commands.  I'd consider the latter one more
relevant for AUCTeX.

> *** tex-info.el.old   Mon Jul 12 19:44:31 2010
> --- tex-info.el       Sun Jul  4 21:53:47 2010
> --- 516,532 ----
>     (if (not (boundp 'texinfo-section-list))
>         ;; This was included in 19.31.
>         ()
> !     (set (make-local-variable 'outline-regexp)
> !      (let ((re (concat "@"
> !                        (funcall 'regexp-opt
> !                                 (mapcar 'car texinfo-section-list)
> !                                 'words))))
> !            (cond
> !             ((null Texinfo-structuring-command-re)
> !              (setq Texinfo-structuring-command-re re))
> !             ((string= Texinfo-structuring-command-re re)
> !              Texinfo-structuring-command-re)
> !             (t re))))
>       (make-local-variable 'outline-level)
>       (setq outline-level 'texinfo-outline-level))

In your last mail you wrote the following about

| I however declared Texinfo-structuring-command-re as a defvar to avoid
| memory duplication (ie when there are several Texinfo buffer the same
| string will be used in memory).

Are you sure the above code would really accomplish that?  Wouldn't
there still be a separate string in memory for each buffer where
`outline-regexp' is set?  I don't actually know how memory would be
allocated in a case like the above, but I'd assume that you could only
save memory here if you'd assign the symbol
`Texinfo-structuring-command-re' to `outline-regexp' and evaluate the
symbol once you need the value.

Personally I'd rather live with a little bit more memory consumption
than obfuscating the code like in the example above.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]