Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner AT cygwin DOT com Mail-Followup-To: cygwin AT cygwin DOT com Delivered-To: mailing list cygwin AT cygwin DOT com From: Robert Mecklenburg MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Message-ID: <15912.26421.705000.961641@gargle.gargle.HOWL> Date: Fri, 17 Jan 2003 13:27:33 -0700 To: Cygwin Users List Subject: Re: emacs error ad-Orig-documentation called with 5 arguments In-Reply-To: References: DH> Robert Mecklenburg wrote: RM> I'm getting the following error in the x-enabled version of cygwin RM> emacs: RM> RM> ** ad-Orig-documentation called with 5 arguments, but accepts only 1-2 DH> I think the problem is with the original documentation function itself, DH> not with advice. Moments after sending my previous message I discovered that the error message is actually generated by loading advice.el. No other action is required. A little judicious editing revealed that commenting out the "defadvice documentation" code in advice.el allows the advice.el file to load correctly. Obviously, this is not a functional fix of any kind, just more clues. My comment lines are marked ";;x" (from advice.el): ;;x(defadvice documentation (after ad-advised-docstring first disable preact) ;;x "Builds an advised docstring if FUNCTION is advised." ;;x ;; Because we get the function name from the advised docstring ;;x ;; this will work for function names as well as for definitions: ;;x (if (and (stringp ad-return-value) ;;x (string-match ;;x ad-advised-definition-docstring-regexp ad-return-value)) ;;x (let ((function ;;x (car (read-from-string ;;x ad-return-value (match-beginning 1) (match-end 1))))) ;;x (cond ((ad-is-advised function) ;;x (setq ad-return-value (ad-make-advised-docstring function)) ;;x ;; Handle optional `raw' argument: ;;x (if (not (ad-get-arg 1)) ;;x (setq ad-return-value ;;x (substitute-command-keys ad-return-value)))))))) ;; @@ Starting, stopping and recovering from the advice package magic: ;; =================================================================== (defun ad-start-advice () "Start the automatic advice handling magic." (interactive) ;; Advising `ad-activate-internal' means death!! (ad-set-advice-info 'ad-activate-internal nil) (ad-safe-fset 'ad-activate-internal 'ad-activate) ;;x (ad-enable-advice 'documentation 'after 'ad-advised-docstring) ;;x (ad-activate 'documentation 'compile) ) (defun ad-stop-advice () "Stop the automatic advice handling magic. You should only need this in case of Advice-related emergencies." (interactive) ;; Advising `ad-activate-internal' means death!! (ad-set-advice-info 'ad-activate-internal nil) ;;x (ad-disable-advice 'documentation 'after 'ad-advised-docstring) ;;x (ad-update 'documentation) (ad-safe-fset 'ad-activate-internal 'ad-activate-internal-off)) -- Robert -- Unsubscribe info: http://cygwin.com/ml/#unsubscribe-simple Bug reporting: http://cygwin.com/bugs.html Documentation: http://cygwin.com/docs.html FAQ: http://cygwin.com/faq/