From 3ace4262f67f259cba60338db8718d134c2c237c Mon Sep 17 00:00:00 2001 From: David Aspinall Date: Thu, 16 Aug 2012 14:59:07 +0000 Subject: Emacs 24 update --- lib/unicode-tokens.el | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'lib') 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) -- cgit v1.2.3