commit b3d36ab41a5f7d541de174f9d428489350892801
parent ed7820889e39dd1d2104bb0dcc0e1cf90771e8f0
Author: Iqbal Ansari <iqbalansari02@yahoo.com>
Date: Sat, 28 Nov 2015 20:28:09 +0530
Rename 'emojify-start' text prop to 'emojify-beginning'
Diffstat:
3 files changed, 13 insertions(+), 13 deletions(-)
diff --git a/emojify.el b/emojify.el
@@ -449,7 +449,7 @@ OLD-POINT and NEW-POINT are the point before entering and after entering."
(let* ((text-props (text-properties-at new-point))
(buffer (plist-get text-props 'emojify-buffer))
(match (plist-get text-props 'emojify-text))
- (match-beginning (plist-get text-props 'emojify-start))
+ (match-beginning (plist-get text-props 'emojify-beginning))
(match-end (plist-get text-props 'emojify-end)))
(when (eq buffer (current-buffer))
(cond ((and (eq emojify-point-entered-behaviour 'echo)
@@ -628,7 +628,7 @@ TODO: Skip emojifying if region is already emojified."
(list 'emojified t
'emojify-buffer buffer
'emojify-text match
- 'emojify-start match-beginning
+ 'emojify-beginning match-beginning
'emojify-end match-end
'keymap emojify-emoji-keymap
'point-entered #'emojify-point-entered-function
@@ -664,7 +664,7 @@ BEG and END are the beginning and end of the region respectively"
'point-left t
'emojify-buffer t
'emojify-text t
- 'emojify-start t
+ 'emojify-beginning t
'emojify-end t
'keymap t
'help-echo t
@@ -675,7 +675,7 @@ BEG and END are the beginning and end of the region respectively"
(defun emojify-delete-emoji (point)
"Delete emoji at POINT."
(if (get-text-property point 'emojified)
- (delete-region (get-text-property point 'emojify-start)
+ (delete-region (get-text-property point 'emojify-beginning)
(get-text-property point 'emojify-end))
(call-interactively (emojify--find-key-binding-ignoring-emojify-keymap (this-command-keys)))))
diff --git a/test/emojify-test.el b/test/emojify-test.el
@@ -20,7 +20,7 @@
(emojify-tests-with-emojified-static-buffer ":)"
(emojify-tests-should-be-emojified (point-min))
(should (equal (get-text-property (point-min) 'emojify-buffer) (current-buffer)))
- (should (equal (get-text-property (point-min) 'emojify-start) (point-min)))
+ (should (equal (get-text-property (point-min) 'emojify-beginning) (point-min)))
(should (equal (get-text-property (point-min) 'emojify-end) (point-max)))
(should (equal (get-text-property (point-min) 'emojify-text) ":)"))))
@@ -29,7 +29,7 @@
(emojify-tests-with-emojified-static-buffer ":smile:"
(emojify-tests-should-be-emojified (point-min))
(should (equal (get-text-property (point) 'emojify-buffer) (current-buffer)))
- (should (equal (get-text-property (point-min) 'emojify-start) (point-min)))
+ (should (equal (get-text-property (point-min) 'emojify-beginning) (point-min)))
(should (equal (get-text-property (point) 'emojify-end) (point-max)))
(should (equal (get-text-property (point) 'emojify-text) ":smile:"))))
@@ -38,7 +38,7 @@
(emojify-tests-with-emojified-static-buffer "😉"
(emojify-tests-should-be-emojified (point-min))
(should (equal (get-text-property (point) 'emojify-buffer) (current-buffer)))
- (should (equal (get-text-property (point-min) 'emojify-start) (point-min)))
+ (should (equal (get-text-property (point-min) 'emojify-beginning) (point-min)))
(should (equal (get-text-property (point) 'emojify-end) (point-max)))
(should (equal (get-text-property (point) 'emojify-text) "😉"))))
@@ -363,21 +363,21 @@
:tags '(electric-delete)
(emojify-tests-with-emojified-buffer "Unicode emoji 😉\nGithub emoji :wink:\nAscii emoji ;)"
(goto-char (line-end-position))
- (let ((final-line-end (get-text-property (1- (point)) 'emojify-start)))
+ (let ((final-line-end (get-text-property (1- (point)) 'emojify-beginning)))
(execute-kbd-macro [backspace])
(emojify-tests-should-not-be-emojified (line-end-position))
(should (equal (line-end-position) final-line-end))))
(emojify-tests-with-emojified-buffer "Unicode emoji 😉\nGithub emoji :wink:\nAscii emoji ;)"
(goto-char (line-end-position 2))
- (let ((final-line-end (get-text-property (1- (point)) 'emojify-start)))
+ (let ((final-line-end (get-text-property (1- (point)) 'emojify-beginning)))
(execute-kbd-macro [backspace])
(emojify-tests-should-not-be-emojified (line-end-position))
(should (equal (line-end-position) final-line-end))))
(emojify-tests-with-emojified-buffer "Unicode emoji 😉\nGithub emoji :wink:\nAscii emoji ;)"
(goto-char (line-end-position 3))
- (let ((final-line-end (get-text-property (1- (point)) 'emojify-start)))
+ (let ((final-line-end (get-text-property (1- (point)) 'emojify-beginning)))
(execute-kbd-macro [backspace])
(emojify-tests-should-not-be-emojified (line-end-position))
(should (equal (line-end-position) final-line-end))))
diff --git a/test/test-helper.el b/test/test-helper.el
@@ -94,7 +94,7 @@ Helps isolate tests from each other's customizations."
(should-not (get-text-property ,point 'point-left))
(should (get-text-property ,point 'emojified))
(should (get-text-property ,point 'emojify-buffer))
- (should (get-text-property ,point 'emojify-start))
+ (should (get-text-property ,point 'emojify-beginning))
(should (get-text-property ,point 'emojify-end))
(should (get-text-property ,point 'emojify-text))
(should (get-text-property ,point 'display))
@@ -105,7 +105,7 @@ Helps isolate tests from each other's customizations."
(should-not (get-text-property ,point 'point-left))
(should-not (get-text-property ,point 'emojified))
(should-not (get-text-property ,point 'emojify-buffer))
- (should-not (get-text-property ,point 'emojify-start))
+ (should-not (get-text-property ,point 'emojify-beginning))
(should-not (get-text-property ,point 'emojify-end))
(should-not (get-text-property ,point 'emojify-text))
(should-not (get-text-property ,point 'display))
@@ -116,7 +116,7 @@ Helps isolate tests from each other's customizations."
(should (get-text-property ,point 'point-left))
(should (get-text-property ,point 'emojified))
(should-not (get-text-property ,point 'emojify-buffer))
- (should-not (get-text-property ,point 'emojify-start))
+ (should-not (get-text-property ,point 'emojify-beginning))
(should-not (get-text-property ,point 'emojify-end))
(should-not (get-text-property ,point 'emojify-text))
(should-not (get-text-property ,point 'display))