Преглед изворни кода

add func my-real-function-subr-p

pull/1/head
10sr пре 11 година
родитељ
комит
5e8642d331
1 измењених фајлова са 19 додато и 0 уклоњено
  1. +19
    -0
      emacs.el

+ 19
- 0
emacs.el Прегледај датотеку

@@ -2093,7 +2093,26 @@ this is test, does not rename files"
(concat my-system-info
(ad-get-arg 0)))))

;; (subrp (symbol-function 'read-from-minibuffer))

;; (defadvice completing-read (before info-in-prompt activate)
;; (ad-set-arg 0
;; (concat my-system-info
;; (ad-get-arg 0))))

(defun my-real-function-subr-p (function)
"Return t if function is a built-in function even if it is advised."
(let* ((advised (and (symbolp function)
(featurep 'advice)
(ad-get-advice-info function)))
(real-function
(or (and advised (let ((origname (cdr (assq 'origname advised))))
(and (fboundp origname)
origname)))
function))
(def (if (symbolp real-function)
(symbol-function real-function)
function)))
(subrp def)))

;; (my-real-function-subr-p 'my-real-function-subr-p)

Loading…
Откажи
Сачувај