summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorKarl Heuer <kwzh@gnu.org>1996-05-21 15:42:13 +0000
committerKarl Heuer <kwzh@gnu.org>1996-05-21 15:42:13 +0000
commit675d073f08f441fa94c7277e2899409c9d9932dc (patch)
treec2e2b3e8538662f34fa8e645f9cd031cc56e2130 /lisp
parent553d18f920353473e062d406b23cd4ba6e35cfc4 (diff)
downloademacs-675d073f08f441fa94c7277e2899409c9d9932dc.tar.gz
(c-macro-expansion): Delete ??! trigraph in uniquestring.
Use same syntax table in outbuf as in inbuf. Insert newline instead of space at end, for proprocessors which don't like truncated lines.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/cmacexp.el21
1 files changed, 11 insertions, 10 deletions
diff --git a/lisp/progmodes/cmacexp.el b/lisp/progmodes/cmacexp.el
index 9d944593879..bbda4bdc872 100644
--- a/lisp/progmodes/cmacexp.el
+++ b/lisp/progmodes/cmacexp.el
@@ -3,7 +3,7 @@
;; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
;; Author: Francesco Potorti` <pot@cnuce.cnr.it>
-;; Version: $Id: cmacexp.el,v 1.23 1996/03/02 06:11:56 rms Exp kwzh $
+;; Version: $Id: cmacexp.el,v 1.24 1996/05/21 14:51:17 kwzh Exp kwzh $
;; Adapted-By: ESR
;; Keywords: c
@@ -202,7 +202,7 @@ For use inside Lisp programs, see also `c-macro-expansion'."
(setq minheight (if alreadythere
(window-height)
window-min-height))
- (setq maxheight (/ (screen-height) 2))
+ (setq maxheight (/ (frame-height) 2))
(enlarge-window (- (min maxheight
(max minheight
(+ 2 (vertical-motion (point-max)))))
@@ -240,7 +240,7 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
c-macro-preprocessor
(if (string= "" c-macro-cppflags) "" " ")
c-macro-cppflags))
- (uniquestring "???!!!???!!! start of c-macro expansion ???!!!???!!!")
+ (uniquestring "??? !!! ??? start of c-macro expansion ??? !!! ???")
(startlinenum 0)
(linenum 0)
(startstat ())
@@ -254,16 +254,17 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
(save-excursion
(save-restriction
(widen)
- (set-buffer outbuf)
- (setq buffer-read-only nil)
- (erase-buffer)
- (set-syntax-table c-mode-syntax-table)
+ (let ((in-syntax-table (syntax-table)))
+ (set-buffer outbuf)
+ (setq buffer-read-only nil)
+ (erase-buffer)
+ (set-syntax-table in-syntax-table))
(insert-buffer-substring inbuf 1 end))
;; We have copied inbuf to outbuf. Point is at end of
- ;; outbuf. Insert a space at the end, so cpp can correctly
- ;; parse a token ending at END.
- (insert " ")
+ ;; outbuf. Inset a newline at the end, so cpp can correctly
+ ;; parse a token ending at END.
+ (insert "\n")
;; Save sexp status and line number at START.
(setq startstat (parse-partial-sexp 1 start))