all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
* bug#2048: Flymake Enhancement
@ 2009-01-25 17:13 Joseph Donaldson
  2009-01-26  2:05 ` Stefan Monnier
  2020-09-19 21:57 ` Lars Ingebrigtsen
  0 siblings, 2 replies; 4+ messages in thread
From: Joseph Donaldson @ 2009-01-25 17:13 UTC (permalink / raw)
  To: bug-gnu-emacs

[-- 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)

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2020-09-19 21:57 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-25 17:13 bug#2048: Flymake Enhancement Joseph Donaldson
2009-01-26  2:05 ` Stefan Monnier
2009-01-26  2:15   ` Processed: " Emacs bug Tracking System
2020-09-19 21:57 ` Lars Ingebrigtsen

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.