diff options
author | David Aspinall <da@inf.ed.ac.uk> | 2012-08-16 14:59:07 +0000 |
---|---|---|
committer | David Aspinall <da@inf.ed.ac.uk> | 2012-08-16 14:59:07 +0000 |
commit | 3ace4262f67f259cba60338db8718d134c2c237c (patch) | |
tree | 5bee8ea1f32c1bceab65c3344d97b3b9dfe3884d /lib/unicode-tokens.el | |
parent | 65100ddba0f7659fec9fed60b0d9839bf8fe38b8 (diff) |
Emacs 24 update
Diffstat (limited to 'lib/unicode-tokens.el')
-rw-r--r-- | lib/unicode-tokens.el | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/lib/unicode-tokens.el b/lib/unicode-tokens.el index 92f78cf4..4d6c5edb 100644 --- a/lib/unicode-tokens.el +++ b/lib/unicode-tokens.el @@ -48,6 +48,11 @@ (require 'maths-menu)) ; nuke compile warnings +;; Emacs <24 compatibility +(unless (and (fboundp 'flet) + (not (get 'flet 'byte-obsolete-info))) + (defalias 'cl-flet 'flet)) + ;; ;; Customizable user options ;; @@ -862,7 +867,7 @@ Starts from point." (regexp-opt (mapcar 'car unicode-tokens-shortcut-replacement-alist)))) ;; override the display of the regexp because it's huge! ;; (doesn't help with C-h: need way to programmatically show string) - (flet ((query-replace-descr (str) (if (eq str shortcut-regexp) + (cl-flet ((query-replace-descr (str) (if (eq str shortcut-regexp) "shortcut" str))) (perform-replace shortcut-regexp (cons 'unicode-tokens-replace-shortcut-match nil) @@ -882,7 +887,7 @@ Starts from point." (let ((uchar-regexp unicode-tokens-uchar-regexp)) ;; override the display of the regexp because it's huge! ;; (doesn't help with C-h: need way to programmatically show string) - (flet ((query-replace-descr (str) (if (eq str uchar-regexp) + (cl-flet ((query-replace-descr (str) (if (eq str uchar-regexp) "unicode presentation" str))) (perform-replace uchar-regexp (cons 'unicode-tokens-replace-unicode-match nil) |