Skip to content

Commit

Permalink
white space cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
jimweirich committed Aug 26, 2010
1 parent 0cf6557 commit 733a1e2
Showing 1 changed file with 7 additions and 7 deletions.
14 changes: 7 additions & 7 deletions pkgs/ruby-electric.el
Expand Up @@ -56,7 +56,7 @@
(?\` . ?\`)
(?\" . ?\")))

(defcustom ruby-electric-simple-keywords-re
(defcustom ruby-electric-simple-keywords-re
"\\(def\\|if\\|class\\|module\\|unless\\|case\\|while\\|do\\|until\\|for\\|begin\\)"
"*Regular expresion matching keywords for which closing 'end'
is to be inserted."
Expand All @@ -74,7 +74,7 @@ inserted. The word 'all' will do all insertions."
(const :tag "Double quote" ?\" )
(const :tag "Back quote" ?\` )
(const :tag "Veritcal bar" ?\| ))
:group 'ruby-electric)
:group 'ruby-electric)

(defcustom ruby-electric-newline-before-closing-bracket nil
"*Controls whether a newline should be inserted before the
Expand Down Expand Up @@ -131,13 +131,13 @@ strings. Note that you must have Font Lock enabled."

(defun ruby-electric-is-last-command-char-expandable-punct-p()
(or (memq 'all ruby-electric-expand-delimiters-list)
(memq last-command-char ruby-electric-expand-delimiters-list)))
(memq last-command-char ruby-electric-expand-delimiters-list)))

(defun ruby-electric-space-can-be-expanded-p()
(if (ruby-electric-code-at-point-p)
(let* ((ruby-electric-keywords-re
(let* ((ruby-electric-keywords-re
(concat ruby-electric-simple-keywords-re "\\s-$"))
(ruby-electric-single-keyword-in-line-re
(ruby-electric-single-keyword-in-line-re
(concat "\\s-*" ruby-electric-keywords-re)))
(save-excursion
(backward-word)
Expand Down Expand Up @@ -172,7 +172,7 @@ strings. Note that you must have Font Lock enabled."
(and (ruby-electric-is-last-command-char-expandable-punct-p)
(ruby-electric-code-at-point-p)
(save-excursion
(insert (cdr (assoc last-command-char
(insert (cdr (assoc last-command-char
ruby-electric-matching-delimeter-alist))))))

(defun ruby-electric-bar(arg)
Expand All @@ -182,7 +182,7 @@ strings. Note that you must have Font Lock enabled."
(ruby-electric-code-at-point-p)
(and (save-excursion (re-search-backward ruby-electric-expandable-bar nil t))
(= (point) (match-end 0))) ;looking-back is missing on XEmacs
(save-excursion
(save-excursion
(insert "|"))))


Expand Down

0 comments on commit 733a1e2

Please sign in to comment.