This is the mail archive of the
cygwin@cygwin.com
mailing list for the Cygwin project.
Re: fix for "wrong number of arguments" emacs problem
- From: Robert Mecklenburg <mecklen at cimsoft dot com>
- To: Cygwin Users List <cygwin at cygwin dot com>
- Date: Thu, 9 Jan 2003 15:28:44 -0700
- Subject: Re: fix for "wrong number of arguments" emacs problem
- References: <avkf2a$atk$1@main.gmane.org>
JB> There have been a couple people with an emacs problem whose symptom
JB> is LISP error messages complaining about a bad number of arguments
JB> to a function call.
JB>
JB> Dr. Andrew Mayer cured this problem through a reinstall. Here are
JB> the details:
JB>
JB> ...
JB> http://cygwin.com/ml/cygwin/2003-01/msg00421.html
I just followed the instructions his last message and I am still
experiencing the problem. On a wild guess I deleted all the elc files
(checking for corrupt compiled code) and I still have the problem. In
particular the defadvice that follows generates the error (for me):
;;;#########################################################################
;;; If you quit minibuffer editing, add the text already entered in the
;;; minibuffer to the history.
;;;
;;; From: Roland McGrath (roland@frob.com)
;;; Newsgroups: gnu.emacs.sources
;;; Date: 1998/05/02
(when (< emacs-major-version 21)
(defalias 'minibuffer-contents 'buffer-string))
(defadvice abort-recursive-edit (before minibuffer-history act comp)
"If you quit minibuffer editing, add the text already entered in the minibuffer to the history."
(and (buffer-modified-p) ;buffer modified
minibuffer-history-variable ;using a minibuffer history
(boundp minibuffer-history-variable) ;and it's not a bogus symbol
(eq (selected-window) (active-minibuffer-window)) ;indeed in minibuffer
;; Do the history save, unless it replicates an existing value.
(let ((v (symbol-value minibuffer-history-variable))
(s (progn (widen) (minibuffer-contents))))
(cond ((not (listp v)) ;variable was not a list, nuke it
(set minibuffer-history-variable (list s)))
((member s v) ;this string is already in the list
;; Move it to the head of the list, and remove all
;; duplicate occurrences.
(set minibuffer-history-variable (cons s (delete s v)))
)
(t
(set minibuffer-history-variable (cons s v)))))))
--
Robert