home *** CD-ROM | disk | FTP | other *** search
/ ftp.cs.arizona.edu / ftp.cs.arizona.edu.tar / ftp.cs.arizona.edu / icon / contrib / emacs / describe.txt < prev    next >
Text File  |  1991-06-07  |  3KB  |  57 lines

  1. This is a quick syntax helper for Icon users that work with GNU Emacs.
  2. The idea is a simple one: while creating a program, say, you're unsure
  3. about the arguments or their orders for push(). With icon-describe, you
  4. simple execute the function "describe-icon-symbol" with point
  5. somewhere around the word push, and the following information
  6. is displayed in the mini-buffer:
  7.  
  8. push(list,x)
  9.  
  10. This works with procedures, infix/prefix operators, control
  11. structures/reserved words, and keywords. Note that you get notified if
  12. something isn't in the documentation file, so you can also use it to
  13. check whether you've got the right symbol name or not (but you'd have
  14. to actually go look at the file to see what the _right_ one is).
  15.  
  16.  
  17. Caveats:
  18.  
  19. See your Emacs manual for how to load this automatically when you
  20. visit .icn files (look at auto-mode-alist and icon-mode-hook, assuming
  21. you're using an icon-mode).
  22.  
  23. describe-icon-symbol is not initially bound to a key, but you'll
  24. probably want to do so.
  25.  
  26. The format of the documentation file is one to a line: this is nice
  27. because it can be displayed in the minibuffer instead of a pop-up
  28. which then has to be gotten rid of. It's not so nice in that it limits
  29. the amount of information pretty severely. If somebody wants to
  30. provide a larger documentation file i might provide a pop-up version
  31. (or some hybrid): i'm too lazy to do all the typing, for one thing!
  32. There's also an uneven mix of bare syntax description with some
  33. discussion of what (especially prefix) operators do. A few keywords
  34. have no description because they're newer than the Icon book, and i
  35. didn't have a description handy. Please contribute to this doc file if
  36. you can!
  37.  
  38. The function which determines the symbol at point isn't perfect
  39. (surprise surprise!). In particular it depends on the syntax tables to
  40. determine what punctuation is, so if your syntax tables aren't right,
  41. this won't be either. I'm open to suggestions for better algorithms.
  42. The current version has a preference for looking backward if not
  43. actually on part of a symbol: this seemed more useful for those cases
  44. where you become hesitant about the arguments to a function just after
  45. typing it.
  46.  
  47. While the usual lack of warranty and support applies, i'd still like
  48. to hear if there are problems with this.
  49.  
  50. Sean Boisen
  51. BBN Systems and Technologies Corporation
  52.  
  53.  
  54. Two files follow: i call the first icon-describe.el (don't forget to
  55. byte-compile it!), and the second icondoc.txt. Whatever you decide to
  56. call the latter, make sure you set the variable icon-doc-file accordingly! 
  57.