Binding,,, elisp, The Emacs Lisp Reference Manual}) to be active.
@example
+@group
;;; ruby-flymake.el --- A ruby Flymake backend -*- lexical-binding: t; -*-
+(require 'cl-lib)
(defvar-local ruby--flymake-proc nil)
+@end group
+@group
(defun ruby-flymake (report-fn &rest _args)
;; Not having a ruby interpreter is a serious problem which should cause
;; the backend to disable itself, so an @code{error} is signaled.
;;
(when (process-live-p ruby--flymake-proc)
(kill-process ruby--flymake-proc))
+@end group
+@group
;; Save the current buffer, the narrowing restriction, remove any
;; narrowing restriction.
;;
;;
(process-send-region ruby--flymake-proc (point-min) (point-max))
(process-send-eof ruby--flymake-proc))))
+@end group
+@group
(defun ruby-setup-flymake-backend ()
(add-hook 'flymake-diagnostic-functions 'ruby-flymake nil t))
(add-hook 'ruby-mode-hook 'ruby-setup-flymake-backend)
+@end group
@end example
@node The legacy Proc backend