Skip to content

Commit

Permalink
minor
Browse files Browse the repository at this point in the history
  • Loading branch information
sabof committed Sep 22, 2013
1 parent d035374 commit c9a6033
Show file tree
Hide file tree
Showing 3 changed files with 26 additions and 26 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ A collecton of emacs utilities, and basis for several of my packages. Here are s

# Index:

_Auto-generated before each commit. Total items in the library: 101_
_Auto-generated before each commit. Total items in the library: 100_

#### Table of contents:

Expand Down Expand Up @@ -133,7 +133,6 @@ Similar to what happends when emacs is about to quit.

* es-mouse-copy-symbol
* es-mouse-yank-replace-symbol
* es-new-empty-buffer
* es-push-line

```
Expand Down
3 changes: 2 additions & 1 deletion es-lib-core-functions.el
Original file line number Diff line number Diff line change
Expand Up @@ -361,7 +361,8 @@ Marks the symbol on first call, then marks the statement."
( t (comment-or-uncomment-region (line-beginning-position)
(line-end-position)
arg)
(indent-according-to-mode))))
(unless (memq indent-line-function '(coffee-indent-line))
(indent-according-to-mode)))))

;;;###autoload
(cl-defun es-ido-like-helm (&optional this-mode-only)
Expand Down
46 changes: 23 additions & 23 deletions es-lib-number-at-point.el
Original file line number Diff line number Diff line change
Expand Up @@ -57,30 +57,30 @@
(when (re-search-backward "[[:digit:]]" (line-beginning-position) t)
(es--change-number-at-point ammout))
(goto-char (- (line-end-position) end-distance))))
(cl-multiple-value-bind
(num-string beg end allow-negative)
number
(let* (( start-pos (point))
( distance-from-end (- end start-pos))
( increment (* (expt 10 (1- distance-from-end))
(or ammout 1)))
( result (+ (string-to-number num-string) increment))
( --- (unless allow-negative
(setq result (max 0 result))))
( result-string (number-to-string
result))
( suggested-new-pos (+ start-pos
(length result-string)
(- (length num-string)))))
;; Don't create an unnecessary undo state
(when (string-equal num-string result-string)
(cl-return-from es--change-number-at-point))
(delete-region beg end)
(insert result-string)
(cl-multiple-value-bind
(num-string beg end allow-negative)
number
(let* (( start-pos (point))
( distance-from-end (- end start-pos))
( increment (* (expt 10 (1- distance-from-end))
(or ammout 1)))
( result (+ (string-to-number num-string) increment))
( --- (unless allow-negative
(setq result (max 0 result))))
( result-string (number-to-string
result))
( suggested-new-pos (+ start-pos
(length result-string)
(- (length num-string)))))
;; Don't create an unnecessary undo state
(when (string-equal num-string result-string)
(cl-return-from es--change-number-at-point))
(delete-region beg end)
(insert result-string)

(goto-char (max beg suggested-new-pos))
(skip-chars-forward "-")
)))))
(goto-char (max beg suggested-new-pos))
(skip-chars-forward "-")
)))))

;;;###autoload
(defun es-increase-number-at-point ()
Expand Down

0 comments on commit c9a6033

Please sign in to comment.