Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
ecb079ed
Commit
ecb079ed
authored
May 24, 1998
by
Richard M. Stallman
Browse files
(close-rectangle): New command.
parent
f68af055
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
0 deletions
+17
-0
lisp/rect.el
lisp/rect.el
+17
-0
No files found.
lisp/rect.el
View file @
ecb079ed
...
...
@@ -201,6 +201,23 @@ but instead winds up to the right of the rectangle."
;; Open the desired width, plus same amount of whitespace we just deleted.
(
indent-to
(
+
endcol
whitewidth
))))
;;;###autoload
(
defun
close-rectangle
(
start
end
)
"Delete all whitespace following a specified column in each line.
The left edge of the rectangle specifies the position in each line
at which whitespace deletion should begin. On each line in the
rectangle, all continuous whitespace starting at that column is deleted."
(
interactive
"r"
)
(
operate-on-rectangle
'
(
lambda
(
startpos
begextra
endextra
)
(
save-excursion
(
goto-char
startpos
)
(
delete-region
(
point
)
(
progn
(
skip-syntax-forward
" "
)
(
point
)))))
start
end
t
))
;;;###autoload
(
defun
string-rectangle
(
start
end
string
)
"Insert STRING on each line of the region-rectangle, shifting text right.
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment