From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#12742: Date: Thu, 13 Feb 2014 18:54:17 -0500 Message-ID: References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1392335703 29902 80.91.229.3 (13 Feb 2014 23:55:03 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 13 Feb 2014 23:55:03 +0000 (UTC) To: 12742-done@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Fri Feb 14 00:55:11 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WE67Z-0004xq-8O for geb-bug-gnu-emacs@m.gmane.org; Fri, 14 Feb 2014 00:55:09 +0100 Original-Received: from localhost ([::1]:49152 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WE67Y-0007n0-Vs for geb-bug-gnu-emacs@m.gmane.org; Thu, 13 Feb 2014 18:55:08 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:37864) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WE67U-0007lR-HR for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2014 18:55:05 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WE67T-0007RS-9z for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2014 18:55:04 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:50131) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WE67T-0007RF-6H for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2014 18:55:03 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1WE67S-0001Lq-Sg for bug-gnu-emacs@gnu.org; Thu, 13 Feb 2014 18:55:02 -0500 Resent-From: Glenn Morris Original-Sender: "Debbugs-submit" Resent-To: bug-gnu-emacs@gnu.org Resent-Date: Thu, 13 Feb 2014 23:55:02 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: cc-closed 12742 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch Mail-Followup-To: 12742@debbugs.gnu.org, rgm@gnu.org, sdl.web@gmail.com Original-Received: via spool by 12742-done@debbugs.gnu.org id=D12742.13923356625131 (code D ref 12742); Thu, 13 Feb 2014 23:55:02 +0000 Original-Received: (at 12742-done) by debbugs.gnu.org; 13 Feb 2014 23:54:22 +0000 Original-Received: from localhost ([127.0.0.1]:51312 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WE66n-0001Kh-70 for submit@debbugs.gnu.org; Thu, 13 Feb 2014 18:54:21 -0500 Original-Received: from fencepost.gnu.org ([208.118.235.10]:50090 ident=Debian-exim) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1WE66k-0001KU-I8 for 12742-done@debbugs.gnu.org; Thu, 13 Feb 2014 18:54:19 -0500 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1WE66j-0000g1-LJ; Thu, 13 Feb 2014 18:54:17 -0500 X-Spook: Telex lynch interception Attorney General Marxist Soviet X-Ran: u4-BsLD(6R#K2Lh|d^V[W72v=ged8(Q_6'@7jrkE4H?q>X}&W!nodUMZ(\0|H>mZO>rwp* X-Hue: cyan X-Attribution: GM In-Reply-To: (Daniel Colascione's message of "Thu, 13 Feb 2014 22:38:05 +0000") User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x 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:85527 Archived-At: Version: 24.4 Daniel Colascione wrote: > ------------------------------------------------------------ > revno: 116436 > revision-id: dancol@dancol.org-20140213223729-66wcs7wdtxjgbuu3 > parent: eliz@gnu.org-20140213205407-wn5kv46oq3hw5sv8 > committer: Daniel Colascione > branch nick: trunk > timestamp: Thu 2014-02-13 14:37:29 -0800 > message: > Fix flymake in narrowed buffers > modified: > lisp/ChangeLog changelog-20091113204419-o5vbwnq5f7feedwu-1432 > lisp/progmodes/flymake.el flymake.el-20091113204419-o5vbwnq5f7feedwu-3065 > > === modified file 'lisp/ChangeLog' > --- a/lisp/ChangeLog 2014-02-13 18:23:36 +0000 > +++ b/lisp/ChangeLog 2014-02-13 22:37:29 +0000 > @@ -1,3 +1,9 @@ > +2014-02-13 Daniel Colascione > + > + * progmodes/flymake.el (flymake-post-syntax-check): Widen buffer > + when adding overlays so that line numbers from compiler match line > + numbers we use. > + > 2014-02-13 Glenn Morris > > * mail/rmail.el (rmail-probe): Be less strict. (Bug#16743) > > === modified file 'lisp/progmodes/flymake.el' > --- a/lisp/progmodes/flymake.el 2014-01-25 19:15:42 +0000 > +++ b/lisp/progmodes/flymake.el 2014-02-13 22:37:29 +0000 > @@ -555,29 +555,31 @@ > (setq flymake-is-running nil)))))))) > > (defun flymake-post-syntax-check (exit-status command) > - (setq flymake-err-info flymake-new-err-info) > - (setq flymake-new-err-info nil) > - (setq flymake-err-info > - (flymake-fix-line-numbers > - flymake-err-info 1 (count-lines (point-min) (point-max)))) > - (flymake-delete-own-overlays) > - (flymake-highlight-err-lines flymake-err-info) > - (let (err-count warn-count) > - (setq err-count (flymake-get-err-count flymake-err-info "e")) > - (setq warn-count (flymake-get-err-count flymake-err-info "w")) > - (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" > - (buffer-name) err-count warn-count > - (- (float-time) flymake-check-start-time)) > - (setq flymake-check-start-time nil) > + (save-restriction > + (widen) > + (setq flymake-err-info flymake-new-err-info) > + (setq flymake-new-err-info nil) > + (setq flymake-err-info > + (flymake-fix-line-numbers > + flymake-err-info 1 (count-lines (point-min) (point-max)))) > + (flymake-delete-own-overlays) > + (flymake-highlight-err-lines flymake-err-info) > + (let (err-count warn-count) > + (setq err-count (flymake-get-err-count flymake-err-info "e")) > + (setq warn-count (flymake-get-err-count flymake-err-info "w")) > + (flymake-log 2 "%s: %d error(s), %d warning(s) in %.2f second(s)" > + (buffer-name) err-count warn-count > + (- (float-time) flymake-check-start-time)) > + (setq flymake-check-start-time nil) > > - (if (and (equal 0 err-count) (equal 0 warn-count)) > - (if (equal 0 exit-status) > - (flymake-report-status "" "") ; PASSED > - (if (not flymake-check-was-interrupted) > - (flymake-report-fatal-status "CFGERR" > - (format "Configuration error has occurred while running %s" command)) > - (flymake-report-status nil ""))) ; "STOPPED" > - (flymake-report-status (format "%d/%d" err-count warn-count) "")))) > + (if (and (equal 0 err-count) (equal 0 warn-count)) > + (if (equal 0 exit-status) > + (flymake-report-status "" "") ; PASSED > + (if (not flymake-check-was-interrupted) > + (flymake-report-fatal-status "CFGERR" > + (format "Configuration error has occurred while running %s" command)) > + (flymake-report-status nil ""))) ; "STOPPED" > + (flymake-report-status (format "%d/%d" err-count warn-count) ""))))) > > (defun flymake-parse-output-and-residual (output) > "Split OUTPUT into lines, merge in residual if necessary."