[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
zmacs mode, incremental compilation
- To: Yves Schabes <schabes@LINC.CIS.UPENN.EDU>
- Subject: zmacs mode, incremental compilation
- From: "David D. Loeffler" <Loeffler@MCC.COM>
- Date: Thu, 23 Jun 88 05:40:00 EDT
- Business-phone: (512) 338-3666
- Cc: Loeffler@MCC.COM, slug@WARBUCKS.AI.SRI.COM
- Character-type-mappings: (1 0 (NIL 0) (NIL :BOLD NIL) "CPTFONTCB") (2 0 (NIL 0) (:SWISS :ITALIC NIL) "HL12I") (3 0 (NIL 0) (:SWISS :BOLD-ITALIC NIL) "HL12BI") (4 0 (NIL 0) (:SWISS :ROMAN :SMALLER) "HL10")
- Fonts: CPTFONT, CPTFONTCB, HL12I, HL12BI, HL10
- In-reply-to: <8806221358.AA18364@linc.cis.upenn.edu>
- Postal-address: 3500 West Balcones Drive, Austin, Texas, 78759
- Reply-to: Loeffler@MCC.COM
Date: Wed, 22 Jun 88 09:58:02 EDT
From: email@example.com (Yves Schabes)
I am trying to define a zmacs mode in which I would like to
use a special purpose incremental compilation.
I would appreciate any help on:
- the definition of a zmacs mode
have you looked in sys:zwei;modes for examples?
- the use of bp in zmacs
- how to grab a region from zmacs
Look at the definition of the kill-region command in Zmacs. It is in sys:zwei;coma
- how to find the current definition in zmacs
Lots of examples of this in commands like mark-definition in sys:zwei;come
Does anyone have a simple example that I can look at?
This shows how to grab a region. If the user marked a region it uses
that one. I the user did not mark a region then it takes the region
defined as a definition in the editing mode the user is in. BTW: This
code is from my Electric Lisp mode which I brough to the last SLUG
meeting in Philadelphia.
;;; 1COM-ADJUST-LISP-CODE-STYLES-IN-REGION2 is a defcom.
;;; 3Purpose: 2Applies Electric LISP formatting to everything in region.
;;; 3Returned Value(s): 2Nothing useful.
;;; 3Side Effects: 2Changes the state of the Zwei buffer.
;;; 3Argument List: 1None
;;; 3Remarks: 2None
0 "Apply Electric LISP formatting to everything in region." ()
(if (window-region-p *window*)
(region (bp1 bp2 :empty-ok nil) ;4If a region marked then use it.
0 (adjust-lisp-code-character-style-in-interval bp1 bp2 t t))
(multiple-value-bind (interval name error-p) ;4Otherwise make a region from the definition the point is in.
0 (send *major-mode* :definition-interval (point))
(ignore name) ;4Tis better for human readers (and compiler does it right too.)
0 (if error-p (barf error-p)) ;4Standard ZWEI way of doing things.
0 (adjust-lisp-code-character-style-in-interval (interval-first-bp interval)
(interval-last-bp interval) t t)))
Thanks in advance. Yves.
-- David D. Loeffler