aboutsummaryrefslogtreecommitdiffstats
path: root/lisp/progmodes/ruby-mode.el
diff options
context:
space:
mode:
authorNobuyoshi Nakada2019-07-22 10:14:01 +0900
committerDmitry Gutov2019-07-25 16:01:55 +0300
commit0cbdbac2bbc0ade799711cd70d3d59aee3db9cef (patch)
tree722dc9a416434494bbc24bdc94f91ab6eb110088 /lisp/progmodes/ruby-mode.el
parenta112547f91d8b4131ed01a05f15f22aa18b85a49 (diff)
downloademacs-0cbdbac2bbc0ade799711cd70d3d59aee3db9cef.tar.gz
emacs-0cbdbac2bbc0ade799711cd70d3d59aee3db9cef.zip
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
Diffstat (limited to 'lisp/progmodes/ruby-mode.el')
-rw-r--r--lisp/progmodes/ruby-mode.el3
1 files changed, 2 insertions, 1 deletions
diff --git a/lisp/progmodes/ruby-mode.el b/lisp/progmodes/ruby-mode.el
index 8eadf018a67..340c689f02e 100644
--- a/lisp/progmodes/ruby-mode.el
+++ b/lisp/progmodes/ruby-mode.el
@@ -1690,7 +1690,8 @@ See `add-log-current-defun-function'."
1690 (when (eq (char-before) ?\}) 1690 (when (eq (char-before) ?\})
1691 (delete-char -1) 1691 (delete-char -1)
1692 (when (save-excursion 1692 (when (save-excursion
1693 (skip-chars-backward " \t") 1693 (let ((n (skip-chars-backward " \t")))
1694 (if (< n 0) (delete-char (- n))))
1694 (not (bolp))) 1695 (not (bolp)))
1695 (insert "\n")) 1696 (insert "\n"))
1696 (insert "end") 1697 (insert "end")