all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Joseph Donaldson <donaldsonjw@gmail.com>
To: bug-gnu-emacs@gnu.org
Subject: bug#2048: Flymake Enhancement
Date: Sun, 25 Jan 2009 12:13:27 -0500	[thread overview]
Message-ID: <1232903607.19724.17.camel@tadpole> (raw)

[-- Attachment #1: Type: text/plain, Size: 1143 bytes --]

Hello,

I hope this is the right forum for submitting this patch for flymake. If
it is not, please, direct me to the correct one. While working to get
flymake to work with the bigloo scheme compiler I discovered that when
it examines the compiler output it does so line-by-line. This prevents
flymake in the case of bigloo from being able to show complete
error/warning messages -- bigloo's error/warning messages span multiple
lines. To remedy this, I introduced a buffer-local variable named
flymake-split-output-pattern and modified the function
flymake-split-output to use it when splitting the output into individual
error/warning messages. The default value of
flymake-split-output-pattern is "[\n\r]+"; this matches the value
previously hard-coded in flymake-split-output. For bigloo, I added in
my .emacs file a hook to bee-mode-hook to set the value
flymake-split-ouput-pattern to "^[\r\n][\r\n]". This enabled flymake to
display the full error/warning messages provided bigloo. The patch for
this modification is attached. If there are any questions and or
comments, I would appreciate hearing them.

Thank You,
Joseph Donaldson

  

[-- Attachment #2: flymake.patch --]
[-- Type: text/x-patch, Size: 1365 bytes --]

*** flymake.el	2009-01-25 11:38:32.000000000 -0500
--- flymake_mod.el	2009-01-25 11:44:06.000000000 -0500
***************
*** 67,72 ****
--- 67,76 ----
    "Same as `flymake-err-info', effective when a syntax check is in progress.")
  (make-variable-buffer-local 'flymake-new-err-info)
  
+ (defvar  flymake-split-output-pattern "[\n\r]+"
+   "Regular expression used to split the output into individual error/warning messages")
+ (make-variable-buffer-local 'flymake-split-output-pattern)
+ 
  ;;;; [[ cross-emacs compatibility routines
  (defsubst flymake-makehash (&optional test)
    (if (fboundp 'make-hash-table)
***************
*** 863,869 ****
  Return last one as residual if it does not end with newline char.
  Returns ((LINES) RESIDUAL)."
    (when (and output (> (length output) 0))
!     (let* ((lines (flymake-split-string output "[\n\r]+"))
  	   (complete (equal "\n" (char-to-string (aref output (1- (length output))))))
  	   (residual nil))
        (when (not complete)
--- 867,873 ----
  Return last one as residual if it does not end with newline char.
  Returns ((LINES) RESIDUAL)."
    (when (and output (> (length output) 0))
!     (let* ((lines (flymake-split-string output  flymake-split-output-pattern))
  	   (complete (equal "\n" (char-to-string (aref output (1- (length output))))))
  	   (residual nil))
        (when (not complete)

             reply	other threads:[~2009-01-25 17:13 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2009-01-25 17:13 Joseph Donaldson [this message]
2009-01-26  2:05 ` bug#2048: Flymake Enhancement Stefan Monnier
2009-01-26  2:15   ` Processed: " Emacs bug Tracking System
2020-09-19 21:57 ` Lars Ingebrigtsen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=1232903607.19724.17.camel@tadpole \
    --to=donaldsonjw@gmail.com \
    --cc=2048@emacsbugs.donarmstrong.com \
    --cc=bug-gnu-emacs@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

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

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.