From 76bf447b66be5ffe6db007b7d97a0e9687d96e40 Mon Sep 17 00:00:00 2001 From: mitchell <70453897+667e-11@users.noreply.github.com> Date: Wed, 12 Jun 2013 12:18:44 -0400 Subject: Renamed editing module's `STRIP_WHITESPACE_ON_SAVE` to `STRIP_TRAILING_SPACES`. --- doc/08_Preferences.md | 2 +- modules/textadept/editing.lua | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/doc/08_Preferences.md b/doc/08_Preferences.md index 2343b472..463c66c2 100644 --- a/doc/08_Preferences.md +++ b/doc/08_Preferences.md @@ -35,7 +35,7 @@ with typeover and stripping whitespace on save, add the following to your _M.textadept.editing.AUTOPAIR = false _M.textadept.editing.TYPEOVER_CHARS = false - _M.textadept.editing.STRIP_WHITESPACE_ON_SAVE = false + _M.textadept.editing.STRIP_TRAILING_SPACES = false Now suppose you want to load all of Textadept's default modules except for the menu. You cannot do this after-the-fact from *~/.textadept/init.lua*. Instead diff --git a/modules/textadept/editing.lua b/modules/textadept/editing.lua index aefb2eb4..b14ac849 100644 --- a/modules/textadept/editing.lua +++ b/modules/textadept/editing.lua @@ -24,7 +24,7 @@ local M = {} -- @field AUTOINDENT (bool) -- Match the indentation level of the previous line when inserting a new line. -- The default value is `true`. --- @field STRIP_WHITESPACE_ON_SAVE (bool) +-- @field STRIP_TRAILING_SPACES (bool) -- Strip trailing whitespace on file save. -- The default value is `true`. -- @field HIGHLIGHT_COLOR (string) @@ -36,7 +36,7 @@ M.AUTOPAIR = true M.HIGHLIGHT_BRACES = true M.TYPEOVER_CHARS = true M.AUTOINDENT = true -M.STRIP_WHITESPACE_ON_SAVE = true +M.STRIP_TRAILING_SPACES = true M.HIGHLIGHT_COLOR = not CURSES and 'color.orange' or 'color.yellow' --- @@ -160,7 +160,7 @@ end) -- Prepares the buffer for saving to a file. events.connect(events.FILE_BEFORE_SAVE, function() - if not M.STRIP_WHITESPACE_ON_SAVE then return end + if not M.STRIP_TRAILING_SPACES then return end local buffer = buffer buffer:begin_undo_action() -- Strip trailing whitespace. -- cgit v1.2.3