unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Double hyphens in variable names.
@ 2003-10-01 13:53 Lute Kamstra
  2003-10-02  5:55 ` Eli Zaretskii
  2003-10-02 18:56 ` Kevin Rodgers
  0 siblings, 2 replies; 41+ messages in thread
From: Lute Kamstra @ 2003-10-01 13:53 UTC (permalink / raw)


I'm trying to document the variable `imenu--index-alist' in the Lisp
Reference Manual.  When I write this in the Texinfo source file:

@defvar imenu--index-alist

Texinfo produces an info file that has this:

 - Variable: imenu-index-alist

Note that the double hyphen is reduced to a single hyphen.  Am I
missing something, or is this a bug in Texinfo?

What is the significance of a double hyphen in a symbol name anyway?

  Lute.

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Re: Double hyphens in variable names.
@ 2003-10-04  1:03 Karl Berry
  2003-10-04  3:51 ` Luc Teirlinck
  0 siblings, 1 reply; 41+ messages in thread
From: Karl Berry @ 2003-10-04  1:03 UTC (permalink / raw)
  Cc: Lute.Kamstra, bug-texinfo, emacs-devel

    The Texinfo documentation does not explicitly say whether
    @verb is supposed to work from within @code.  

I doubt it is worth the trouble to try to do this.  Can you think of a
reason why any real document would need @verb inside @code?  I can't.

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Re: Double hyphens in variable names.
@ 2003-10-04  1:03 Karl Berry
  2003-10-04 22:35 ` Richard Stallman
  0 siblings, 1 reply; 41+ messages in thread
From: Karl Berry @ 2003-10-04  1:03 UTC (permalink / raw)
  Cc: Lute.Kamstra, bug-texinfo, emacs-devel

    @defvar imenu--index-alist

I propose to make the @def... commands do an implicit @code, more or
less.  The principal change would be the names being printed in
typewriter (and typewriter slanted for arguments, I guess).  We'd get
ligature suppression for free, then.

This seems more logical than the roman fonts (bold and slanted) now
being used, although the roman fonts are prettier and take less space.

Does anyone object to that?

It would also be possible to write special-case code to remove ligatures
and such (in fact I seem to remember doing something along those lines
already for some past bug report), but all in all, the point is that
that identifiers is code, so we should print them in typewriter just
like other code fragments.

k

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Re: Double hyphens in variable names.
@ 2003-10-06  9:06 David PONCE
  2003-10-06  9:18 ` Lute Kamstra
  2003-10-07  5:32 ` Richard Stallman
  0 siblings, 2 replies; 41+ messages in thread
From: David PONCE @ 2003-10-06  9:06 UTC (permalink / raw)
  Cc: emacs-devel

Hi,

>>Is there another "standard" method to force a rescan of the imenu
>>without using `imenu--index-alist'?
> 
> No, not on the lisp level.  There is a user-level way to do this: by
> selecting the *Rescan* item from Imenu's menu.  Setting
> imenu--index-alist to nil might work but it's not documented.  As it
> seems useful for lisp programs to be able to force a rescan, we could
> implement such a feature.  I'll try and see if I can come up with a
> function that does this.

Thanks!  I think a such function will be very useful.  Perhaps it
could just contain the code run when selecting the *Rescan* item?
Something like this:

(defun imenu-refresh ()
  "Refresh the imenu."
  (imenu--cleanup)
  (setq imenu--index-alist nil)
  (imenu-update-menubar)
  t)

(defun imenu--menubar-select (item)
  "Use Imenu to select the function or variable named in this menu ITEM."
  (if (equal item imenu--rescan-item)
      (imenu-refresh)
    (imenu item)
    nil))

David

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Re: Double hyphens in variable names.
@ 2003-10-06  9:26 David PONCE
  0 siblings, 0 replies; 41+ messages in thread
From: David PONCE @ 2003-10-06  9:26 UTC (permalink / raw)
  Cc: emacs-devel

>>(defun imenu-refresh ()
>>  "Refresh the imenu."
>>  (imenu--cleanup)
>>  (setq imenu--index-alist nil)
>>  (imenu-update-menubar)
>>  t)
> 
> 
> Why insist on returning t?

I just copied the code from `imenu--menubar-select' ;-)
I don't know the meaning of returning t after a rescan.

David

^ permalink raw reply	[flat|nested] 41+ messages in thread
* Re: Double hyphens in variable names.
@ 2003-10-07  7:57 David PONCE
  0 siblings, 0 replies; 41+ messages in thread
From: David PONCE @ 2003-10-07  7:57 UTC (permalink / raw)
  Cc: rms, emacs-devel

>>    (defun imenu--menubar-select (item)
>>      "Use Imenu to select the function or variable named in this menu ITEM."
>>
>>What is that useful for?
> 
> 
> It's the existing function from which David "stole" the implementation
> of imenu-refresh.

Absolutely right ;-)

Thanks Lute!

David

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

end of thread, other threads:[~2003-10-07  9:08 UTC | newest]

Thread overview: 41+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-10-01 13:53 Double hyphens in variable names Lute Kamstra
2003-10-02  5:55 ` Eli Zaretskii
2003-10-02  8:43   ` Lute Kamstra
2003-10-02 13:18     ` Luc Teirlinck
2003-10-02 15:11       ` Lute Kamstra
2003-10-02 16:00         ` Luc Teirlinck
2003-10-02 16:14           ` Lute Kamstra
2003-10-02 16:54             ` Andreas Schwab
2003-10-02 17:25             ` Luc Teirlinck
2003-10-03  1:50             ` Luc Teirlinck
2003-10-03  2:13               ` Luc Teirlinck
2003-10-03  3:45                 ` Luc Teirlinck
2003-10-02 19:04         ` Oliver Scholz
2003-10-03  8:39           ` Lute Kamstra
2003-10-03 16:18             ` Luc Teirlinck
2003-10-03 19:37               ` Lute Kamstra
2003-10-03 18:33             ` Luc Teirlinck
2003-10-03 18:42               ` Luc Teirlinck
2003-10-03 19:46               ` Lute Kamstra
2003-10-04 10:47                 ` David Ponce
2003-10-06  7:11                   ` Lute Kamstra
2003-10-06 23:19                 ` Juri Linkov
2003-10-07  9:08                   ` Lute Kamstra
2003-10-03 19:42           ` Richard Stallman
2003-10-03 21:19           ` Juri Linkov
2003-10-02 14:07     ` Luc Teirlinck
2003-10-02 19:15     ` Richard Stallman
2003-10-02 18:56 ` Kevin Rodgers
  -- strict thread matches above, loose matches on Subject: below --
2003-10-04  1:03 Karl Berry
2003-10-04  3:51 ` Luc Teirlinck
2003-10-04  1:03 Karl Berry
2003-10-04 22:35 ` Richard Stallman
2003-10-05  0:53   ` Miles Bader
2003-10-05 10:36     ` Stepan Kasal
2003-10-05  8:34   ` Werner LEMBERG
2003-10-06  9:06 David PONCE
2003-10-06  9:18 ` Lute Kamstra
2003-10-07  5:32 ` Richard Stallman
2003-10-07  6:57   ` Lute Kamstra
2003-10-06  9:26 David PONCE
2003-10-07  7:57 David PONCE

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

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 read-only IMAP folder(s) and NNTP newsgroup(s).