 (defun yas-s-trim-right (s)
   "Remove whitespace at the end of S."
   (if (string-match "[ \t\n\r]+\\'" s)
-	  (replace-match "" t t s)
-	s))
+      (replace-match "" t t s)
+    s))
 
 (defun yas-s-trim (s)
   "Remove whitespace at the beginning and end of S."

  "This function returns `comment-end' trimmed by whitespaces if `comment-end' is not empty.
Otherwise the reversed output of function `yas-trimmed-comment-start' is returned."
  (if (eq (length comment-end) 0)
	  (yas-string-reverse (yas-trimmed-comment-start))
	(yas-s-trim comment-end)))

(defun yas-string-reverse (str)
  "Reverse a string STR manually to be compatible with emacs versions < 25."
  (apply #'string
         (reverse
          (string-to-list str))))

(defun yas-trimmed-comment-start ()
  "This function returns `comment-start' trimmed by whitespaces."
