From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stephen Eglen Newsgroups: gmane.emacs.bugs Subject: bug#8774: incorrect line numbers from byte-compile-file Date: Tue, 31 May 2011 15:33:21 +0100 Message-ID: NNTP-Posting-Host: lo.gmane.org X-Trace: dough.gmane.org 1306857735 20583 80.91.229.12 (31 May 2011 16:02:15 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Tue, 31 May 2011 16:02:15 +0000 (UTC) Cc: Stephen Eglen To: 8774@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Tue May 31 18:02:11 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1QRROU-0001LJ-Ob for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 May 2011 18:02:10 +0200 Original-Received: from localhost ([::1]:35452 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRROU-0007AQ-CI for geb-bug-gnu-emacs@m.gmane.org; Tue, 31 May 2011 12:02:10 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:42751) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRROR-0007AI-2q for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 12:02:08 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRROM-0006cB-Au for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 12:02:07 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:58132) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRROM-0006c6-8c for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 12:02:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1QRROM-0003Vc-1u; Tue, 31 May 2011 12:02:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Stephen Eglen Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-To: owner@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Tue, 31 May 2011 16:02:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 8774 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.130685766413422 (code B ref -1); Tue, 31 May 2011 16:02:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 31 May 2011 16:01:04 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRRNI-0003Td-06 for submit@debbugs.gnu.org; Tue, 31 May 2011 12:01:04 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1QRQ0l-0001ZX-Qn for submit@debbugs.gnu.org; Tue, 31 May 2011 10:33:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRQ0f-0004jW-UD for submit@debbugs.gnu.org; Tue, 31 May 2011 10:33:30 -0400 Original-Received: from lists.gnu.org ([140.186.70.17]:55938) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRQ0f-0004jS-Sd for submit@debbugs.gnu.org; Tue, 31 May 2011 10:33:29 -0400 Original-Received: from eggs.gnu.org ([140.186.70.92]:36807) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRQ0e-0007NS-SV for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 10:33:29 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1QRQ0a-0004iW-CM for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 10:33:28 -0400 Original-Received: from ppsw-41.csi.cam.ac.uk ([131.111.8.141]:53407) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1QRQ0a-0004iH-8N for bug-gnu-emacs@gnu.org; Tue, 31 May 2011 10:33:24 -0400 X-Cam-AntiVirus: no malware found X-Cam-SpamDetails: not scanned X-Cam-ScannerInfo: http://www.cam.ac.uk/cs/email/scanner/ Original-Received: from cpc28-cmbg15-2-0-cust3.5-4.cable.virginmedia.com ([86.27.189.4]:59504 helo=localhost) by ppsw-41.csi.cam.ac.uk (smtp.hermes.cam.ac.uk [131.111.8.156]:587) with esmtpsa (PLAIN:sje30) (TLSv1:DHE-RSA-AES256-SHA:256) id 1QRQ0Y-0008Vw-Sf (Exim 4.72) (return-path ); Tue, 31 May 2011 15:33:22 +0100 X-Mailer: MH-E 8.2; nmh 1.3; GNU Emacs 23.3.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6, seldom 2.4 (older, 4) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Mailman-Approved-At: Tue, 31 May 2011 12:00:50 -0400 X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Tue, 31 May 2011 12:02:02 -0400 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:46846 Archived-At: With emacs -q, load the following into a file, test.el ---------------------------------------------------------------------- (defun fix-page-breaks () "Fix page breaks in SAS 6 print files." (interactive) (save-excursion (goto-char (point-min)) (if (looking-at "\f") (delete-char 1)) (replace-regexp "^\\(.+\\)\f" "\\1\n\f\n") (goto-char (point-min)) (replace-regexp "^\f\\(.+\\)" "\f\n\\1") (goto-char (point-min)))) ---------------------------------------------------------------------- then M-x byte-compile-file generates: Compiling file /Users/stephen/txt/t/test.el at Tue May 31 15:28:08 2011 In fix-page-breaks: test.el:6:28:Warning: `replace-regexp' used from Lisp code That command is designed for interactive use only test.el:7:6:Warning: `replace-regexp' used from Lisp code That command is designed for interactive use only The first error has the wrong line, although it has caught the two problematic cases. This is with emacs 23.3.1, but same behaviour seen on Emacs 24.0.50 Stephen (emacs-version) "GNU Emacs 23.3.1 (x86_64-apple-darwin10.6.0, NS apple-appkit-1038.35) of 2011-03-10 on teva.local"