comparison lisp/indent.el @ 91073:4bc33ffdda1a

Merge from emacs--devo--0 Patches applied: * emacs--devo--0 (patch 902-908) - Update from CVS - Merge from emacs--rel--22 * emacs--rel--22 (patch 131-137) - Update from CVS - Merge from gnus--rel--5.10 * gnus--rel--5.10 (patch 261-262) - Update from CVS Revision: emacs@sv.gnu.org/emacs--unicode--0--patch-278
author Miles Bader <miles@gnu.org>
date Sat, 27 Oct 2007 09:12:07 +0000
parents 1251cabc40b7 b210bba3f477
children 2fcaae6177a5
comparison
equal deleted inserted replaced
91072:74ab3ea909f9 91073:4bc33ffdda1a
189 189
190 ;; This used to be the default indent-line-function, 190 ;; This used to be the default indent-line-function,
191 ;; used in Fundamental Mode, Text Mode, etc. 191 ;; used in Fundamental Mode, Text Mode, etc.
192 (defun indent-to-left-margin () 192 (defun indent-to-left-margin ()
193 "Indent current line to the column given by `current-left-margin'." 193 "Indent current line to the column given by `current-left-margin'."
194 (indent-line-to (current-left-margin))) 194 (save-excursion (indent-line-to (current-left-margin)))
195 ;; If we are within the indentation, move past it.
196 (when (save-excursion
197 (skip-chars-backward " \t")
198 (bolp))
199 (skip-chars-forward " \t")))
195 200
196 (defun delete-to-left-margin (&optional from to) 201 (defun delete-to-left-margin (&optional from to)
197 "Remove left margin indentation from a region. 202 "Remove left margin indentation from a region.
198 This deletes to the column given by `current-left-margin'. 203 This deletes to the column given by `current-left-margin'.
199 In no case will it delete non-whitespace. 204 In no case will it delete non-whitespace.