summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChad Walstrom <chewie@wookimus.net>2014-02-23 21:56:56 -0600
committerChad Walstrom <chewie@wookimus.net>2014-02-23 21:56:56 -0600
commit25a80c8c6d6084474ba186eca72a50abe3a8f6b0 (patch)
tree408f08fbcbfa28a983abf6322dda0f706cfcbf12
parentd9cbd8f4a284af5978f863c0d506b4fa43a6b53a (diff)
Fix old-style backtick in bbdb/mh-cache-key for Emacs > 23
-rw-r--r--lisp/bbdb-mhe.el45
1 files changed, 31 insertions, 14 deletions
diff --git a/lisp/bbdb-mhe.el b/lisp/bbdb-mhe.el
index 717ae95..c46a67e 100644
--- a/lisp/bbdb-mhe.el
+++ b/lisp/bbdb-mhe.el
@@ -33,20 +33,37 @@
(defmacro bbdb/mh-cache-key (message)
"Return a (numeric) key for MESSAGE"
- (`(let* ((attrs (file-attributes (, message)))
- (status-time (nth 6 attrs))
- (status-time-2 (cdr status-time))
- (inode (nth 10 attrs)))
- (logxor (if (integerp inode) ;; if inode is larger than an emacs int,
- inode ;; it's returned as a dotted pair
- (car inode))
- (car status-time)
- ;; We need the following test because XEmacs returns the
- ;; status time as a dotted pair, whereas FSF and Epoch
- ;; return it as list.
- (if (integerp status-time-2)
- status-time-2
- (car status-time-2))))))
+ (if (> emacs-major-version 23)
+ ;; New-style backticks
+ `(let* ((attrs (file-attributes , message))
+ (status-time (nth 6 attrs))
+ (status-time-2 (cdr status-time))
+ (inode (nth 10 attrs)))
+ (logxor (if (integerp inode) ;; if inode is larger than an emacs int,
+ inode ;; it's returned as a dotted pair
+ (car inode))
+ (car status-time)
+ ;; We need the following test because XEmacs returns the
+ ;; status time as a dotted pair, whereas FSF and Epoch
+ ;; return it as list.
+ (if (integerp status-time-2)
+ status-time-2
+ (car status-time-2))))
+ ;; Old-style backticks
+ (`(let* ((attrs (file-attributes (, message)))
+ (status-time (nth 6 attrs))
+ (status-time-2 (cdr status-time))
+ (inode (nth 10 attrs)))
+ (logxor (if (integerp inode) ;; if inode is larger than an emacs int,
+ inode ;; it's returned as a dotted pair
+ (car inode))
+ (car status-time)
+ ;; We need the following test because XEmacs returns the
+ ;; status time as a dotted pair, whereas FSF and Epoch
+ ;; return it as list.
+ (if (integerp status-time-2)
+ status-time-2
+ (car status-time-2)))))))
;;;###autoload
(defun bbdb/mh-update-record (&optional offer-to-create)