diff --git a/funcs.el b/funcs.el index 493cfa8..b083fbb 100644 --- a/funcs.el +++ b/funcs.el @@ -73,10 +73,9 @@ table" none the word the cursor is over" (interactive) (let* ((beg (region-beginning)) - (end (region-end)) - (boundary-word (bounds-of-thing-at-point 'word))) + (end (region-end))) (if (= beg end) - boundary-word + (bounds-of-thing-at-point 'word) (cons beg end)))) (defun conlanging//replace-char-by-table (t-correspondance-table) @@ -87,12 +86,10 @@ second element of the pair the string it has to be replaced with." (let* ((cur-boundary (conlanging//get-boundary)) (beg (car cur-boundary)) - (end (cdr cur-boundary))) - (setq-local regionp - (buffer-substring-no-properties beg end)) - (setq-local regionp - (conlanging//replace-string-by-char regionp - t-correspondance-table)) + (end (cdr cur-boundary)) + (regionp (buffer-substring-no-properties beg end)) + (new-regionp (conlanging//replace-string-by-char regionp + t-correspondance-table))) (delete-region beg end) (goto-char beg) (insert regionp)))