bug-gnu-emacs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

bug#10956: make-mode.el - improve makefile-warn-suspicious-lines


From: Jari Aalto
Subject: bug#10956: make-mode.el - improve makefile-warn-suspicious-lines
Date: Tue, 06 Mar 2012 07:22:02 -0500

Package: emacs
Version: 23.3+1-5
Severity: minor

Here is a small patch to check any extra whitespace at the beginning of
line. The patch is against Emacs Vcs-Git ba7322c dated 2012-02-29.

2012-03-06 Tue  Jari Aalto  <jari.aalto@cante.net>

        * progmodes/make-mode.el (makefile-warn-suspicious-lines):
        improve whitespace check.

-- System Information
Debian Release: wheezy/sid
  APT Prefers unstable
  APT policy: (990, unstable)
Architecture: i386
Kernel: Linux taiko 3.2.0-1-686-pae #1 SMP Fri Feb 17 06:27:21 UTC 2012 i686 
GNU/Linux
Locale: LANG=en_US.UTF-8

-- Versions of packages `emacs depends on'.
Depends:
emacs23         23.3+1-5        The GNU Emacs editor (with GTK+ user interfac
emacs23-lucid   23.3+1-5        The GNU Emacs editor
emacs23-nox     23.3+1-5        The GNU Emacs editor (without X support)

>From a24603ab69a72fc693119f2885e76ebfad1dbc4f Mon Sep 17 00:00:00 2001
From: Jari Aalto <jari.aalto@cante.net>
Date: Tue, 6 Mar 2012 07:17:32 -0500
Subject: [PATCH]        * progmodes/make-mode.el
 (makefile-warn-suspicious-lines):      improve whitespace
 check.
Organization: Private
Content-Type: text/plain; charset="utf-8"
Content-Transfer-Encoding: 8bit


Signed-off-by: Jari Aalto <jari.aalto@cante.net>
---
 lisp/progmodes/make-mode.el |    2 +-
 1 files changed, 1 insertions(+), 1 deletions(-)

diff --git a/lisp/progmodes/make-mode.el b/lisp/progmodes/make-mode.el
index b4ca1ba..de57cd1 100644
--- a/lisp/progmodes/make-mode.el
+++ b/lisp/progmodes/make-mode.el
@@ -1642,7 +1642,7 @@ and generates the overview, one line per target name."
   (if (derived-mode-p 'makefile-mode)
       (save-excursion
        (goto-char (point-min))
-       (if (re-search-forward "^\\(\t+$\\| +\t\\)" nil t)
+       (if (re-search-forward "^\\([ \t]+$\\| +\t\\)" nil t)
            (not (y-or-n-p
                  (format "Suspicious line %d. Save anyway? "
                          (count-lines (point-min) (point)))))))))
-- 
1.7.9.1


reply via email to

[Prev in Thread] Current Thread [Next in Thread]