unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#8774: incorrect line numbers from byte-compile-file
@ 2011-05-31 14:33 Stephen Eglen
  0 siblings, 0 replies; only message in thread
From: Stephen Eglen @ 2011-05-31 14:33 UTC (permalink / raw)
  To: 8774; +Cc: Stephen Eglen

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"





^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2011-05-31 14:33 UTC | newest]

Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-05-31 14:33 bug#8774: incorrect line numbers from byte-compile-file Stephen Eglen

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).