emacs-devel
[Top][All Lists]
Advanced

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

[PATCH] beginning-of-line-text (fwd)


From: Grzegorz Szukowski
Subject: [PATCH] beginning-of-line-text (fwd)
Date: Wed, 29 Sep 2004 10:34:10 +0200 (CEST)

Hi!

I added small functionality to function beginning-of-line-text which
is very useful for me and which I found in Visual Slick Editor.

If after call original beginning-of-line-text cursor position is unchanged that my patch moves cursor to the begining of the line.

I have key HOME set to call beginning-of-line-text.

Grzegorz Szukowski
--- indent.el   20 Sep 2004 16:09:32 -0000      1.57

+++ indent.el   28 Sep 2004 13:20:19 -0000

@@ -311,6 +311,7 @@ fill-prefix, and any indentation used fo

 line, but does not move past any whitespace that was explicitly inserted

 \(such as a tab used to indent the first line of a paragraph)."

   (interactive "p")

+  (setq apnt (point))

   (beginning-of-line n)

   (skip-chars-forward " \t")

   ;; Skip over fill-prefix.

@@ -325,4 +326,6 @@ line, but does not move past any whitesp

        (goto-char (match-end 0))))

   ;; Skip centering or flushright indentation

   (if (memq (current-justification) '(center right))

-      (skip-chars-forward " \t")))

+      (skip-chars-forward " \t"))

+  (if (equal apnt (point))

+         (beginning-of-line n)))



 (defvar indent-region-function nil

   "Short cut function to indent region using `indent-according-to-mode'.


reply via email to

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