GNU bug report logs - #25936
Fix for whitespace.el to make it read tab-width and indent-tabs-mode correctly

Previous Next

Package: emacs;

Reported by: Reuben Thomas <rrt <at> sc3d.org>

Date: Thu, 2 Mar 2017 13:49:02 UTC

Severity: minor

Tags: fixed, patch

Fixed in version 26.1

Done: npostavs <at> users.sourceforge.net

Bug is archived. No further changes may be made.

Full log


Message #5 received at submit <at> debbugs.gnu.org (full text, mbox):

From: Reuben Thomas <rrt <at> sc3d.org>
To: bug-emacs <bug-emacs <at> gnu.org>
Subject: Fix for whitespace.el to make it read tab-width and indent-tabs-mode
 correctly
Date: Thu, 2 Mar 2017 13:48:19 +0000
[Message part 1 (text/plain, inline)]
I noticed that whitespace-mode was not correctly diagnosing whitespace
problems in some files.

On investigation, this was because whitespace-report-region didn't call
whitespace-ensure-local-variables, so it didn't catch changes to
indent-tabs-mode in file-find hook functions.

However, on further investigation, I can't see why these local variables
are needed. Currently, whitespace-mode makes buffer-local copies of
indent-tabs-mode and tab-width, with names prefixed by "whitespace-". But
these variables are buffer-local if necessary already, and whitespace-mode
never tries to change them.

Hence, I attach a patch for review which simply removes these (apparently
unnecessary) local variables.

-- 
http://rrt.sc3d.org
[Message part 2 (text/html, inline)]
[0001-Fix-reading-of-tab-settings-in-whitespace-mode.patch (text/x-patch, attachment)]

This bug report was last modified 8 years and 37 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.