>From 5021d84fe1b96344053175a26e067a264ff99c11 Mon Sep 17 00:00:00 2001 From: Alex Branham Date: Tue, 20 Feb 2018 14:55:52 -0600 Subject: [PATCH] Improve flymake documentation * doc/auctex.texi: Add Flymake support to manual * latex-flymake.el: Add copyright notice and fix a quote --- doc/auctex.texi | 28 ++++++++++++++++++++-------- latex-flymake.el | 24 +++++++++++++++++++++++- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/doc/auctex.texi b/doc/auctex.texi index 08cfe040..ec328d06 100644 --- a/doc/auctex.texi +++ b/doc/auctex.texi @@ -3831,24 +3831,36 @@ will be used regardless of the value of this variable. @cindex Running @code{chktex} @cindex Style @cindex Problems address@hidden Flymake address@hidden Running Flymake Running @TeX{} or @LaTeX{} will only find regular errors in the document, not examples of bad style. Furthermore, description of the errors may often be confusing. The utilities @code{lacheck} and @code{chktex} can be used to find style errors, such as forgetting to escape the space after an abbreviation or using @samp{...} instead of address@hidden and other similar problems. You start @code{lacheck} with address@hidden C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c ChkTeX address@hidden The result will be a list of errors in the address@hidden and other similar problems. You start @code{lacheck} +with @kbd{C-c C-c Check @key{RET}} and @code{chktex} with @kbd{C-c C-c +ChkTeX @key{RET}}. The result will be a list of errors in the @samp{*compilation*} buffer. You can go through the errors with @kbd{C-x `} (@code{next-error}, @pxref{Compilation,,,emacs,The Emacs Editor}), which will move point to the location of the next error. +Alternatively, you may want in-buffer notation. AuCTeX provides +support for this using the Flymake package in Emacs 26 or newer +(@xref{Using Flymake,,,Flymake,GNU Flymake} for details). To enable, +call @kbd{M-x flymake-mode} in the buffer or enable it in all buffers +by adding this to your init file: -Each of the two utilities will find some errors the other doesn't, but address@hidden is more configurable, allowing you to create your own -errors. You may need to install the programs before using them. You -can get @code{lacheck} from address@hidden} and address@hidden +(add-hook 'LaTeX-mode-hook #'flymake-mode) address@hidden lisp + +Note that AuCTeX currently only provides support for using address@hidden as the flymake backend. Each of the two utilities will +find some errors the other doesn't, but @code{chktex} is more +configurable, allowing you to create your own errors. You may need to +install the programs before using them. You can get @code{lacheck} +from @file{} and @code{chktex} from @file{}. diff --git a/latex-flymake.el b/latex-flymake.el index e77e0591..265eeb5b 100644 --- a/latex-flymake.el +++ b/latex-flymake.el @@ -1,11 +1,33 @@ ;;; latex-flymake.el --- Flymake integration -*- lexical-binding: t; -*- +;; Copyright (C), 2018 Free Software Foundation, Inc. + +;; Maintainer: address@hidden +;; Keywords: tex + +;; This file is part of AUCTeX. + +;; AUCTeX is free software; you can redistribute it and/or modify it +;; under the terms of the GNU General Public License as published by +;; the Free Software Foundation; either version 3, or (at your option) +;; any later version. + +;; AUCTeX is distributed in the hope that it will be useful, but +;; WITHOUT ANY WARRANTY; without even the implied warranty of +;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU +;; General Public License for more details. + +;; You should have received a copy of the GNU General Public License +;; along with AUCTeX; see the file COPYING. If not, write to the Free +;; Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA +;; 02110-1301, USA. + ;;; Commentary: ;; This file provides flymake integration for latex documents using ;; "chktex" as a backend. You must be running Emacs 26 or newer. ;; Enable it by adding the following to your init file: -;; (add-hook 'LaTeX-mode-hook flymake-mode) +;; (add-hook 'LaTeX-mode-hook #'flymake-mode) ;;; Code: -- 2.16.2