Mail Archives: djgpp/1997/11/20/06:16:08
John M. Aldrich wrote:
>
> You want a context-sensitive libc lookup, right? The code I use for
> this is:
>
> ;;; Automatic online help for library functions
> (autoload 'find-tag-tag "etags")
> (autoload 'Info-find-node "info")
> (defun libc-help (arg)
> (interactive (list (find-tag-tag "C library topic: ")))
> (Info-find-node "libc" arg))
> ;
>
> Then I map the function to C-f1 with:
>
> (define-key c-mode-map [C-f1] 'libc-help)
>
> This seems to be a lot simpler than whatever you are doing...
>
the context sensitive lookup is already bound to C-h TAB
it is defined in file info-look.el. It reads the current major-mode
and do specific action based upon that mode.
It automatically understands C, texinfo, makefile and others.
However c-mode has a problem: it looks in the info file for
nodes that in the djgpp libc info are not present.
I guess in other systems libc.info are different (or I'm missing
something).
At this point I've two chances:
change the regexps that do the lookup in the emacslisp file
(not reliable)
or
change the libc.info to reflect what emacs expects.
(better idea)
(or
I'm still missing something)
Sadly, I wasn't unable to find out a libc.info in my linux
box or on this Solaris, so I've not an example to comfort my
guesses.
However, thanks for your code, I'll put in my _emacs,
hoping however it's a temporary solution.
bye
Stefano
- Raw text -