Thread View: gnu.epoch.misc
2 messages
2 total messages
Started by Minh.Tue.Vo
Sat, 17 Aug 1991 11:08
Bug report
Author: Minh.Tue.Vo
Date: Sat, 17 Aug 1991 11:08
Date: Sat, 17 Aug 1991 11:08
44 lines
1744 bytes
1744 bytes
Epoch version: 3.2.22 X Window version: X11R4 Major mode: c-mode Bug description: scan-sexps screws up when there is a colon (:) in the sexp; the return value is 1 more than it should be, i.e. going past the colon instead of stopping just before it. Example: (running in c-mode) -------- Text in buffer --------- abc: --------------------------------- Point is just before 'a'. Call (forward-sexp 1) [this does (goto-char (scan-sexps (point) 1))]. Point is now just after ':'. Should be just before ':'. Consequence: c-indent-line in c-mode uses forward-sexp to detect labels: [excerpt code from GNU/lisp/c-mode.el] (defun c-indent-line () ... (cond ((or (looking-at "case[ \t]") (and (looking-at "[A-Za-z]") (save-excursion (forward-sexp 1) (looking-at ":")))) (setq indent (max 1 (+ indent c-label-offset)))) ... [end excerpt] This bug in scan-sexps causes c-indent-line to indent lines containing labels incorrectly (although "case" lines are OK). This bug is not present in GNU-Emacs version 18.54.52 which I used before I switched to Epoch 3.2.22. Minh Tue Vo (Minh.Tue.Vo@cs.cmu.edu)
Re: Bug report
Author: Alan M. Carroll
Date: Sun, 18 Aug 1991 18:37
Date: Sun, 18 Aug 1991 18:37
20 lines
1192 bytes
1192 bytes
In article <McfLF1S00hYdF41cQI@cs.cmu.edu>, Minh.Tue.Vo@cs.cmu.edu writes: > Epoch version: 3.2.22 > X Window version: X11R4 > > Major mode: c-mode > > Bug description: > > scan-sexps screws up when there is a colon (:) in the sexp; This is a known bug. The fix is to put (modify-syntax-entry ?: "." c-mode-syntax-table) into your site.el -- Alan M. Carroll <-- Another casualty of applied metaphysics Epoch Development Team Urbana Il. "I hate shopping with the reality-impaired" - Susan
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads