home *** CD-ROM | disk | FTP | other *** search
/ NetNews Usenet Archive 1993 #3 / NN_1993_3.iso / spool / alt / lucidem / help / 980 < prev    next >
Encoding:
Text File  |  1993-01-28  |  2.8 KB  |  91 lines

  1. x-gateway: rodan.UU.NET from help-lucid-emacs to alt.lucid-emacs.help; Thu, 28 Jan 1993 21:48:26 EST
  2. Date: Fri, 29 Jan 1993 13:47:23 EST
  3. From: rwhitby%research.canon.oz.au@lucid.com (Rod Whitby)
  4. Message-ID: <9301290247.AA12078@bing.research.canon.oz.au>
  5. Subject: Questions about font_lock.c (buffer-syntactic-context)
  6. Newsgroups: alt.lucid-emacs.help
  7. Path: sparky!uunet!wendy-fate.uu.net!help-lucid-emacs
  8. Sender: help-lucid-emacs-request@lucid.com
  9. Lines: 80
  10.  
  11. I have some questions about your intent with font_lock.c, the answers
  12. to which will allow me to decide whether or not to use font_lock.c as
  13. the basis of my highlighting package (previously called tek-highlight,
  14. now called oz-highlight).
  15.  
  16. 1/ Do you consider comment delimiters to be of context-type `comment'
  17. or `nil' ?
  18.  
  19. At the moment, buffer-syntactic-context returns the following values:
  20.  
  21.   ;;comment
  22.   ^^
  23.   ||
  24.   | - `comment'
  25.    - `nil'
  26.  
  27. Using font-lock.el, the buffer is highlighted from the second `;' to
  28. the end of the line.
  29.  
  30. Using regexps, I would highlight from the first `;' to the end of the
  31. line.
  32.  
  33. 2/ Do you consider block comment delimiters to be of context-type
  34. `block-comment' or `nil' ?
  35.  
  36. At the moment, buffer-syntactic-context returns the following values:
  37.  
  38.   /*block comment*/
  39.   ^^^            ^^
  40.   |||            ||
  41.   |||            | - `block-comment'
  42.   |||             - `block-comment'
  43.   || - `block-comment'
  44.   | - `nil'
  45.    - `nil'
  46.  
  47. Using font-lock.el, the buffer is highlighted from `b' to the second
  48. `/'.
  49.  
  50. Using regexps, I would highlight from the first `/' to the second `/`.
  51.  
  52. 3/ Do you consider string delimiters to be of context-type `string'
  53. or `nil' ?
  54.  
  55. At the moment, buffer-syntactic-context returns the following values:
  56.  
  57.   "string"
  58.   ^^     ^
  59.   ||     |
  60.   ||      - `string'
  61.   | - `string'
  62.    - `nil'
  63.  
  64. Using font-lock.el, the buffer is highlighted from `s' to the second
  65. `"'.
  66.  
  67. Using regexps, I would highlight from the first `"' to the second `"`.
  68.  
  69.  
  70. In my experience with people using my highlighting package under Epoch
  71. (tek-highlight), they prefer the highlighting I have described as
  72. "using regexps".
  73.  
  74. Which type of highlighting do you (eventually) intend to support with
  75. font-lock.el ?
  76.  
  77. I realise that the "regexp" form of highlighting may well be very
  78. difficult to achieve (yes, I've read and understand the complexity of
  79. font_lock.c), but I'm looking for your intent rather than a
  80. confirmation of the current implementation.
  81.  
  82. If you intend to highlight in the method I (and the current users of
  83. tek-highlight) prefer, then I would allocate my spare time to helping
  84. achieve that goal with font_lock.c rather than trying to achieve it in
  85. a separate lisp package.
  86.  
  87. --------------------------------------------- _--_|\  |
  88. Rod Whitby (rwhitby@research.canon.oz.au)    /      \ |
  89. Canon Information Systems Research Australia \_.--._/ |
  90. 1 Thomas Holt Drive, North Ryde, N.S.W., 2113.     v  |
  91.