Article View: gnu.emacs.bug
Article #1731bug in cmacro
From: wolfgang
Date: Wed, 31 May 1989 20:11
Date: Wed, 31 May 1989 20:11
53 lines
1903 bytes
1903 bytes
In GNU Emacs 18.54.3 of Fri May 19 1989 on Sun3 (berkeley-unix)
The c-macro-expand tries too hard to be efficient...
---example file---
#define foo(x) (x \
x \
x)
foo(hello)
---end example file---
produces:
(hello
instead of:
(hello
hello
hello)
"The expansion would be entirely correct if it used the C preprocessor." ;-)
-wolfgang
---
Wolfgang Rupprecht ARPA: wolfgang@mgm.mit.edu (IP 18.82.0.114)
TEL: (703) 768-2640 UUCP: mit-eddie!mgm.mit.edu!wolfgang
diff -c cmacexp.el.~1~ cmacexp.el
*** cmacexp.el.~1~ Wed May 31 15:29:32 1989
--- cmacexp.el Wed May 31 15:49:56 1989
***************
*** 18,26 ****
(goto-char beg)
(beginning-of-line)
(setq last-needed (point))
! (if (re-search-backward "^[ \t]*#" nil t)
! (progn (forward-line 1)
! (setq last-needed (point)))))
(write-region (point-min) last-needed tempfile nil 'nomsg)
(process-send-string process (concat "#include \"" tempfile "\"\n"))
(process-send-string process "\n")
--- 18,27 ----
(goto-char beg)
(beginning-of-line)
(setq last-needed (point))
! ;;(if (re-search-backward "^[ \t]*#" nil t)
! ;; (progn (forward-line 1)
! ;; (setq last-needed (point))))
! )
(write-region (point-min) last-needed tempfile nil 'nomsg)
(process-send-string process (concat "#include \"" tempfile "\"\n"))
(process-send-string process "\n")
diff exited abnormally with code 1
Technical Details
Message-ID:
<8905312024.AA06511@AENEAS.MIT.EDU>Path:
arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MGM.MIT.EDU!wolfgangShow Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!utgpu!jarvis.csri.toronto.edu!mailrus!tut.cis.ohio-state.edu!MGM.MIT.EDU!wolfgang From: wolfgang@MGM.MIT.EDU Newsgroups: gnu.emacs.bug Subject: bug in cmacro Message-ID: <8905312024.AA06511@AENEAS.MIT.EDU> Date: 31 May 89 20:11:11 GMT Sender: daemon@tut.cis.ohio-state.edu Reply-To: wolfgang@mgm.mit.edu Distribution: gnu Organization: Freelance Software Consultant, Washington DC. Lines: 53