aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorKarl Heuer1996-05-21 15:42:13 +0000
committerKarl Heuer1996-05-21 15:42:13 +0000
commit32cdf3f63eaa805a202cb8155ff5f946c4f4451a (patch)
treee0ac02c0f1e7bd9145f59ebc759869629dae188d
parent9e9094f7719a695a4e6065bd7e7b693714666538 (diff)
downloademacs-32cdf3f63eaa805a202cb8155ff5f946c4f4451a.tar.gz
emacs-32cdf3f63eaa805a202cb8155ff5f946c4f4451a.zip
(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.
-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 @@
3;; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc. 3;; Copyright (C) 1992, 1994, 1996 Free Software Foundation, Inc.
4 4
5;; Author: Francesco Potorti` <pot@cnuce.cnr.it> 5;; Author: Francesco Potorti` <pot@cnuce.cnr.it>
6;; Version: $Id: cmacexp.el,v 1.23 1996/03/02 06:11:56 rms Exp kwzh $ 6;; Version: $Id: cmacexp.el,v 1.24 1996/05/21 14:51:17 kwzh Exp kwzh $
7;; Adapted-By: ESR 7;; Adapted-By: ESR
8;; Keywords: c 8;; Keywords: c
9 9
@@ -202,7 +202,7 @@ For use inside Lisp programs, see also `c-macro-expansion'."
202 (setq minheight (if alreadythere 202 (setq minheight (if alreadythere
203 (window-height) 203 (window-height)
204 window-min-height)) 204 window-min-height))
205 (setq maxheight (/ (screen-height) 2)) 205 (setq maxheight (/ (frame-height) 2))
206 (enlarge-window (- (min maxheight 206 (enlarge-window (- (min maxheight
207 (max minheight 207 (max minheight
208 (+ 2 (vertical-motion (point-max))))) 208 (+ 2 (vertical-motion (point-max)))))
@@ -240,7 +240,7 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
240 c-macro-preprocessor 240 c-macro-preprocessor
241 (if (string= "" c-macro-cppflags) "" " ") 241 (if (string= "" c-macro-cppflags) "" " ")
242 c-macro-cppflags)) 242 c-macro-cppflags))
243 (uniquestring "???!!!???!!! start of c-macro expansion ???!!!???!!!") 243 (uniquestring "??? !!! ??? start of c-macro expansion ??? !!! ???")
244 (startlinenum 0) 244 (startlinenum 0)
245 (linenum 0) 245 (linenum 0)
246 (startstat ()) 246 (startstat ())
@@ -254,16 +254,17 @@ Optional arg DISPLAY non-nil means show messages in the echo area."
254 (save-excursion 254 (save-excursion
255 (save-restriction 255 (save-restriction
256 (widen) 256 (widen)
257 (set-buffer outbuf) 257 (let ((in-syntax-table (syntax-table)))
258 (setq buffer-read-only nil) 258 (set-buffer outbuf)
259 (erase-buffer) 259 (setq buffer-read-only nil)
260 (set-syntax-table c-mode-syntax-table) 260 (erase-buffer)
261 (set-syntax-table in-syntax-table))
261 (insert-buffer-substring inbuf 1 end)) 262 (insert-buffer-substring inbuf 1 end))
262 263
263 ;; We have copied inbuf to outbuf. Point is at end of 264 ;; We have copied inbuf to outbuf. Point is at end of
264 ;; outbuf. Insert a space at the end, so cpp can correctly 265 ;; outbuf. Inset a newline at the end, so cpp can correctly
265 ;; parse a token ending at END. 266 ;; parse a token ending at END.
266 (insert " ") 267 (insert "\n")
267 268
268 ;; Save sexp status and line number at START. 269 ;; Save sexp status and line number at START.
269 (setq startstat (parse-partial-sexp 1 start)) 270 (setq startstat (parse-partial-sexp 1 start))