Created
May 10, 2023 19:22
-
-
Save mokrates/6dd6b5c2ba7817c44eb34f99ea571549 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
(defun mo-compare-killring () | |
"copy some text to kill-ring, set point to the beginning of similar looking text, run this function. | |
The cursor will be set to the first difference" | |
(interactive) | |
(let ((s (current-kill 0 t)) | |
(pos 0)) | |
(while (and (< pos (length s)) | |
(equal (aref s pos) (char-after (point)))) | |
(forward-char) | |
(incf pos)) | |
(if (< pos (length s)) | |
(message "clipboard NOT completely found!") | |
(message "clipboard equal to text")))) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
cl-incf statt incf