Skip to content

Commit 20abb35

Browse files
yangsheng6810slotThe
authored andcommitted
Backward compatibility with emacs 25 for advice--where
NOTE: This is part of Wilfred#195
1 parent 7463b8a commit 20abb35

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

helpful.el

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2245,6 +2245,15 @@ value is different."
22452245
(not (eq (car orig-val-list)
22462246
(symbol-value sym))))))
22472247

2248+
;; backward-compatible with emacs 25
2249+
(unless (fboundp 'advice--where)
2250+
(defun advice--where (f)
2251+
(let ((bytecode (aref f 1))
2252+
(where nil))
2253+
(dolist (elem advice--where-alist)
2254+
(if (eq bytecode (cadr elem)) (setq where (car elem))))
2255+
where)))
2256+
22482257
(defun helpful--advise-info (function)
22492258
(let* ((flist (indirect-function function))
22502259
(docfun nil)

0 commit comments

Comments
 (0)