mirror of
git://git.sv.gnu.org/emacs.git
synced 2026-01-05 19:31:02 -08:00
Strip trailing whitespaces at the end of converted do block
* lisp/progmodes/ruby-mode.el (ruby-brace-to-do-end): Strip trailing whitespaces at the end of converted do block (bug#36756). https://bugs.ruby-lang.org/issues/16014 https://github.com/syl20bnr/spacemacs/issues/12548
This commit is contained in:
parent
a112547f91
commit
0cbdbac2bb
2 changed files with 7 additions and 2 deletions
|
|
@ -1690,7 +1690,8 @@ See `add-log-current-defun-function'."
|
|||
(when (eq (char-before) ?\})
|
||||
(delete-char -1)
|
||||
(when (save-excursion
|
||||
(skip-chars-backward " \t")
|
||||
(let ((n (skip-chars-backward " \t")))
|
||||
(if (< n 0) (delete-char (- n))))
|
||||
(not (bolp)))
|
||||
(insert "\n"))
|
||||
(insert "end")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue