                                  "\\|" (substring comment-start 0 1) ; first char of `comment-start'
                                  "\\|" "\\s-")) ; extra spaces
         (delete-forward-char 1))
-      (insert-char ? ) ; insert space
-      )))
+      (insert-char ? )))) ; insert space
 
 ;;; Enable the disabled functions
 

;; Time-stamp: <2015-09-21 12:58:20 kmodi>

;; Functions related to editing text in the buffer
;; Contents:

abc| ghi        <-- point still before white space after calling this function
abc   |def  ghi <-- point on the right of white space before 'def'
abc |ghi        <-- point still after white space after calling this function."
  (save-excursion ; maintain the initial position of the pt with respect to space
    (cond ((looking-back "^ *") ; remove extra space at beginning of line
           (just-one-space 0)
           (indent-according-to-mode))
          ((or (looking-at   " ")
               (looking-back " ")) ; adjust space only if it exists
           (just-one-space 1))
          (t ; do nothing otherwise, includes case where the point is at EOL
           ))))
;; Delete extra horizontal white space after `kill-word' and `backward-kill-word'
(advice-add 'kill-word :after #'modi/just-one-space-post-kill-word)

;;; Whole Buffer If Not Region
(defvar modi/whole-buffer-if-not-region-fns '(indent-region
