[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[nongnu] elpa/jade-mode 40efeb499a 064/128: Indent using the number of l
From: |
ELPA Syncer |
Subject: |
[nongnu] elpa/jade-mode 40efeb499a 064/128: Indent using the number of lines in a region instead of the location of point within the original region. |
Date: |
Sat, 29 Jan 2022 08:24:47 -0500 (EST) |
branch: elpa/jade-mode
commit 40efeb499a8a1f0ec03275cd80313121db2da6c5
Author: Sterling Graham <sterling.graham@mediavalet.com>
Commit: Sterling Graham <sterling.graham@mediavalet.com>
Indent using the number of lines in a region instead of the location of
point within the original region.
---
sws-mode.el | 12 +++++++-----
1 file changed, 7 insertions(+), 5 deletions(-)
diff --git a/sws-mode.el b/sws-mode.el
index 094211490b..902d1aac1f 100644
--- a/sws-mode.el
+++ b/sws-mode.el
@@ -82,17 +82,19 @@
(defun sws-move-region (begin end prog)
"Moves left is dir is null, otherwise right. prog is '+ or '-"
(save-excursion
- (let (first-indent indent-diff)
+ (let ((first-indent indent-diff)
+ (num-lines-indented (count-lines-region begin end))
+ )
(goto-char begin)
(setq first-indent (current-indentation))
(sws-indent-to
(funcall prog first-indent sws-tab-width))
(setq indent-diff (- (current-indentation) first-indent))
+ (forward-line 1)
;; move other lines based on movement of first line
- (while (< (point) end)
- (forward-line 1)
- (if (< (point) end)
- (sws-indent-to (+ (current-indentation) indent-diff)))))))
+ (dotimes (i (- num-lines-indented 1))
+ (sws-indent-to (+ (current-indentation) indent-diff))
+ (forward-line 1)))))
(defun sws-indent-region (begin end)
"Indents the selected region"
- [nongnu] elpa/jade-mode dfeadc97a5 069/128: Merge pull request #31 from tjefferson08/26_comment_highlight, (continued)
- [nongnu] elpa/jade-mode dfeadc97a5 069/128: Merge pull request #31 from tjefferson08/26_comment_highlight, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 6b9d9507e2 010/128: can detect simple region sexps, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode d28d1810fa 007/128: basic decrement tab working, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode cb82d16486 017/128: jade-mode depends on sws-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode e4c668bde5 023/128: Have documentation such that jade-mode is used for .jade files., ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 2b093c23d2 071/128: [#20] add single quote ex. (currently incorrect), ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 03486dce69 082/128: Merge pull request #33 from mgalgs/master, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode cb0f564166 066/128: remove jade-mode dependency on sws-mode, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode e128ce3b07 067/128: add custom indent functions for line/region, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 4e7a20db49 084/128: Merge pull request #38 from tjefferson08/37_highlight_strings_in_parens, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 40efeb499a 064/128: Indent using the number of lines in a region instead of the location of point within the original region.,
ELPA Syncer <=
- [nongnu] elpa/jade-mode 2c830e70e0 075/128: Use \\' instead of $, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 519b455d1f 113/128: Add melpa badge and flycheck support note, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode ce2400711d 107/128: get mixin parameters to highlight correctly, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode fe250570ee 110/128: install cask in TCI setup, remove emacs 23 build, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 6a3a936de8 112/128: Merge pull request #57 from tjefferson08/makefile-and-mixin-cleanup, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 1ebb5134b6 119/128: Files with ".pug" extension are now detected, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 0d0bbf6073 118/128: Merge pull request #63 from robbyoconnor/fix-grammar-error, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode fd48e74686 120/128: Merge pull request #67 from Emeraude/pug-rename, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 8f8e3154e4 123/128: Derive from text-mode, remove unneeded code, ELPA Syncer, 2022/01/29
- [nongnu] elpa/jade-mode 2417d49ed1 104/128: add regression tests for lines with one color, ELPA Syncer, 2022/01/29