[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
- To: SAZ at MIT-OZ
- Subject: semi-colon parsing
- From: Robert W. Kerns <RWK at SCRC-YUKON>
- Date: Tuesday, 24 January 1984, 14:27-EST
- Cc: bug-zmacs at MIT-OZ, bug-emacs at MIT-OZ
- In-reply-to: The message of 23 Jan 84 20:29-EST from SAZ at MIT-OZ
Date: Mon 23 Jan 84 20:29:50-EST
Does it strike anybody as annoying that control-E takes you to
the end of a commented line (ie to the end of the comment) rather
than just the end of the final s-expr on the line? I know I sure
How about a control-E that takes you to the end of the final bit
of CODE on the line, then, if another control-E is done, you can
access the end of the comment text? IE, if I already am at the
following place: (cursorpos <== *)
hsdofh ihofdh)))* ;This function just dies every time
and I do a control-E, the cursor will move to the end of the word
Well, it's a half-good idea, at least. I just put the following
into my LISPM-INIT. I wouldn't want to change what c-E does, since
it's so fundamental (and symetric with c-A). I made the analogy be
with m-;, m-N, and m-P, for s-;, s-N, and s-P.
You could easily change this to check your current position, and move to
the end of the line if you're already at the position determined here.
"Go to the end of a line, or the last expression before the comments."
(let* ((line (bp-line (point)))
(comment (find-comment-start line))
(end (1+ (if comment
(string-reverse-search-not-set *blanks* line comment)
(1- (line-length line))))))
(move-bp (point) line end))
"Go to the end of the next line, before the comments."
"Go to the end of the previous line, before the comments."
(zwei:set-comtab zwei:*standard-comtab* '(#\s-/; zwei:com-end-of-expression-line