delorie.com/archives/browse.cgi   search  
Mail Archives: djgpp/1997/01/20/23:45:28

From: "John M. Aldrich" <fighteer AT cs DOT com>
Newsgroups: comp.os.msdos.djgpp
Subject: Re: Emacs and DJGPP help
Date: Mon, 20 Jan 1997 20:54:29 -0800
Organization: Two pounds of chaos and a pinch of salt
Lines: 53
Message-ID: <32E44C05.262B@cs.com>
References: <Pine DOT LNX DOT 3 DOT 93 DOT 970120084115 DOT 8267B-100000 AT capslock DOT com>
Reply-To: fighteer AT cs DOT com
NNTP-Posting-Host: ppp211.cs.com
Mime-Version: 1.0
To: djgpp AT delorie DOT com
DJ-Gateway: from newsgroup comp.os.msdos.djgpp

root wrote:
> 
> Am I correct in assuming that one may access help files for DJGPP from
> within EMACS?
> 
> Can I place the cursor over a word (such as printf()) and hit a key, and
> have printf() help come up?

The default DJGPP and Emacs distributions each assume several things
about your setup, specifically that you place Emacs in a directory named
%DJDIR%/gnu/emacs/ (where DJDIR is your main DJGPP directory).  If this
is not the case, then you can modify 'djgpp.env' to change the INFO_PATH
definition in the [info] and [emacs] sections.  Replace
%DJDIR%/gnu/emacs/info with the actual location of the Emacs info
directory.

Once you've done that, simply type C-h i in Emacs to see the combined
'dir' entries of both Emacs and DJGPP.

Getting Emacs to do an interactive lookup of the libc docs is not much
harder, but requires either a knowledge of ELisp or a helpful person
who's already done exactly this sort of thing.  Paste the following code
into your _emacs file:

;
;; online help for libc
(autoload 'find-tag-tag "etags")
(autoload 'Info-find-node "info")
(defun libc-help (arg)
  (interactive (list (find-tag-tag "C library index topic: ")))
;  (info "libc")
;  (Info-index arg))
  (Info-find-node "libc" arg))
(global-set-key [f2] 'libc-help)
;

Then all you need to do is press F2 when the cursor is on a word, press
Enter at the prompt, and Emacs will automatically bring you to the info
section corresponding to the word.

BTW, the above code was written by somebody other than me whose name I
cannot recall; I simply modified it slightly to work with the DJGPP
libc.  I can retrieve the name of the original author if necessary.  :)

Good luck!

-- 
---------------------------------------------------------------------
| John M. Aldrich, aka Fighteer I  |        fighteer AT cs DOT com         |
| "Starting flamewars since 1993"  |   http://www.cs.com/fighteer   |
|  *** NOTICE ***  This .signature is generated randomly.           |
|                  If you don't like it, sue my computer.           |
---------------------------------------------------------------------

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019