Commit dbc4e1c1 authored by Jim Blandy's avatar Jim Blandy

JimB's changes since January 18th

parent 72766144
......@@ -231,7 +231,6 @@ lib-src/Makefile: ${srcdir}/lib-src/Makefile.in Makefile
-e 's|^LOADLIBES *=.*$$|LOADLIBES='"${libsrc_libs}"'|' \
-e '/^# DIST: /d') > lib-src/Makefile.tmp
${srcdir}/move-if-change lib-src/Makefile.tmp lib-src/Makefile
# Remind people not to edit this.
chmod -w lib-src/Makefile
src/Makefile: ${srcdir}/src/Makefile.in Makefile
......@@ -248,7 +247,6 @@ src/Makefile: ${srcdir}/src/Makefile.in Makefile
-e 's|^CONFIG_CFLAGS *=.*$$|CONFIG_CFLAGS='"${CONFIG_CFLAGS}"'|' \
-e '/^# DIST: /d') > src/Makefile.tmp
${srcdir}/move-if-change src/Makefile.tmp src/Makefile
# Remind people not to edit this.
chmod -w src/Makefile
oldXMenu/Makefile: ${srcdir}/oldXMenu/Makefile Makefile
......@@ -262,10 +260,10 @@ Makefile:
# ==================== Installation ====================
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
install: all mkdir
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
(cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir})
-set ${COPYDESTS} ; \
for dir in ${COPYDIR} ; do \
......@@ -297,10 +295,10 @@ install: all mkdir
-rm -f ${bindir}/emacs
ln ${bindir}/emacs-${version} ${bindir}/emacs
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
install.sysv: all mkdir
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
(cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir})
-set ${COPYDESTS} ; \
for dir in ${COPYDIR} ; do \
......@@ -330,10 +328,10 @@ install.sysv: all mkdir
-cpset src/emacs ${bindir}/emacs-${version} 1755 bin bin
-ln ${bindir}/emacs-${version} ${bindir}/emacs
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
install.xenix: all mkdir
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
(cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir})
-set ${COPYDESTS} ; \
for dir in ${COPYDIR} ; do \
......@@ -368,10 +366,10 @@ install.xenix: all mkdir
chmod 1755 ${bindir}/emacs
-rm -f ${bindir}/emacs.old
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
install.aix: all mkdir
## If we let lib-src do its own installation, that means we
## don't have to duplicate the list of utilities to install in
## this Makefile as well.
(cd lib-src; $(MAKE) install ${MFLAGS} bindir=${bindir} libdir=${libdir})
-set ${COPYDESTS} ; \
for dir in ${COPYDIR} ; do \
......
......@@ -1091,7 +1091,7 @@ it just adds completion characters to the end of the filename."
(let ((ch (read-char)))
(if (= ch ?\ )
(set-window-configuration conf)
(setq unread-command-event ch))))))))
(setq unread-command-events (list ch)))))))))
;;; Converting process modes to use comint mode
;;; ===========================================================================
......
......@@ -63,8 +63,8 @@ Calls value of `electric-buffer-menu-mode-hook' on entry if non-nil.
(setq select
(catch 'electric-buffer-menu-select
(message "<<< Press Space to bury the buffer list >>>")
(if (= (setq unread-command-event (read-char)) ?\ )
(progn (setq unread-command-event nil)
(if (= (setq unread-command-events (list (read-char))) ?\ )
(progn (setq unread-command-events nil)
(throw 'electric-buffer-menu-select nil)))
(let ((first (progn (goto-char (point-min))
(forward-line 2)
......@@ -196,7 +196,7 @@ electric-buffer-menu-mode-hook if it is non-nil."
(defun Electric-buffer-menu-exit ()
(interactive)
(setq unread-command-event last-input-char)
(setq unread-command-events (list last-input-char))
;; for robustness
(condition-case ()
(throw 'electric-buffer-menu-select nil)
......
......@@ -119,8 +119,8 @@ BUFFER is put into `default-major-mode' (or `fundamental-mode') when we exit"
(catch 'exit
(if (pos-visible-in-window-p (point-max))
(progn (message "<<< Press Space to bury the help buffer >>>")
(if (= (setq unread-command-event (read-char)) ?\ )
(progn (setq unread-command-event nil)
(if (= (setq unread-command-events (list (read-char))) ?\ )
(progn (setq unread-command-events nil)
(throw 'exit t)))))
(let (up down both neither
(standard (and (eq (key-binding " ")
......
......@@ -85,7 +85,7 @@
cmd this-command)
(if (or (prog1 quit-flag (setq quit-flag nil))
(= last-input-char ?\C-g))
(progn (setq unread-command-event nil
(progn (setq unread-command-events nil
prefix-arg nil)
;; If it wasn't cancelling a prefix character, then quit.
(if (or (= (length (this-command-keys)) 1)
......@@ -101,7 +101,7 @@
(setq last-command this-command)
(if (or (prog1 quit-flag (setq quit-flag nil))
(= last-input-char ?\C-g))
(progn (setq unread-command-event nil)
(progn (setq unread-command-events nil)
(if (not inhibit-quit)
(progn (ding)
(message "Quit")
......
......@@ -41,6 +41,7 @@
(defvar disassemble-recursive-indent 3 "*")
;;;###autoload
(defun disassemble (object &optional buffer indent interactive-p)
"Print disassembled code for OBJECT in (optional) BUFFER.
OBJECT can be a symbol defined as a function, or a function itself
......@@ -136,7 +137,7 @@ redefine OBJECT if it is a symbol."
(insert "\n"))))
(cond ((and (consp obj) (assq 'byte-code obj))
(disassemble-1 (assq 'byte-code obj) indent))
((compiled-function-p obj)
((byte-code-function-p obj)
(disassemble-1 obj indent))
(t
(insert "Uncompiled body: ")
......@@ -195,14 +196,14 @@ OBJ should be a call to BYTE-CODE generated by the byte compiler."
(setq arg (car arg))
;; but if the value of the constant is compiled code, then
;; recursively disassemble it.
(cond ((or (compiled-function-p arg)
(cond ((or (byte-code-function-p arg)
(and (eq (car-safe arg) 'lambda)
(assq 'byte-code arg))
(and (eq (car-safe arg) 'macro)
(or (compiled-function-p (cdr arg))
(or (byte-code-function-p (cdr arg))
(and (eq (car-safe (cdr arg)) 'lambda)
(assq 'byte-code (cdr arg))))))
(cond ((compiled-function-p arg)
(cond ((byte-code-function-p arg)
(insert "<compiled-function>\n"))
((eq (car-safe arg) 'lambda)
(insert "<compiled lambda>"))
......
......@@ -1480,7 +1480,7 @@ Should be 0 at the top level.")
(last-command last-command)
(this-command this-command)
(last-input-char last-input-char)
;; Assume no edebug command sets unread-command-char.
;; Assume no edebug command sets unread-command-events.
;; (unread-command-char -1)
(debug-on-error debug-on-error)
......
......@@ -2910,7 +2910,7 @@ SPC, it is ignored; if it is anything else, it is processed as a command."
(enlarge-window 1))
(let ((c (read-char)))
(if (/= c 32)
(setq unread-command-event c))))))))
(setq unread-command-events (list c)))))))))
;; Improved auto-save file names.
;; This function fixes many problems with the standard auto-save file names:
......
......@@ -333,9 +333,9 @@ vi mode. ARG is used as the prefix value for the executed command. If
CHAR is given it becomes the first character of the command."
(interactive "P")
(let (com (buff (current-buffer)) (first t))
(if char (setq unread-command-event char))
(if char (setq unread-command-events (list char)))
(setq prefix-arg arg)
(while (or first unread-command-event)
(while (or first unread-command-events)
;; this while loop is executed until unread command char will be
;; exhausted.
(setq first nil)
......@@ -393,7 +393,7 @@ obtained so far, and COM is the command part obtained so far."
(while (= char ?U)
(vip-describe-arg prefix-arg)
(setq char (read-char)))
(setq unread-command-event char))
(setq unread-command-events (list char)))
(defun vip-prefix-arg-com (char value com)
"Vi operator as prefix argument."
......@@ -447,7 +447,7 @@ obtained so far, and COM is the command part obtained so far."
(while (= char ?U)
(vip-describe-arg prefix-arg)
(setq char (read-char)))
(setq unread-command-event char))
(setq unread-command-events (list char)))
;; as com is non-nil, this means that we have a command to execute
(if (or (= (car com) ?r) (= (car com) ?R))
;; execute apropriate region command.
......
......@@ -113,7 +113,7 @@ These supercede the values given in default-frame-alist.")
;;; need to see if it should go away or change. Create a text frame
;;; here.
(defun frame-notice-user-settings ()
(if (live-frame-p frame-initial-frame)
(if (frame-live-p frame-initial-frame)
(progn
;; If the user wants a minibuffer-only frame, we'll have to
;; make a new one; you can't remove or add a root window to/from
......
......@@ -2287,7 +2287,7 @@ If argument UNREAD is non-nil, only unread article is selected."
(let ((char (read-char)))
(if (= char cmd)
(gnus-Subject-next-group nil)
(setq unread-command-event char))))
(setq unread-command-events (list char)))))
)
))
)))
......
......@@ -293,7 +293,7 @@ C-w print information on absence of warranty for GNU Emacs."
(princ (cond ((stringp def) "a keyboard macro.")
((subrp def)
(concat beg "built-in function."))
((compiled-function-p def)
((byte-code-function-p def)
(concat beg "compiled Lisp function."))
((symbolp def)
(format "alias for `%s'." def))
......
......@@ -768,7 +768,7 @@ N is the digit argument used to invoke this command."
(message (if flag "Type Space to see more"
"Type Space to return to Info"))
(if (/= ?\ (setq ch (read-char)))
(progn (setq unread-command-event ch) nil)
(progn (setq unread-command-events (list ch)) nil)
flag))
(scroll-up)))))
......
......@@ -4,7 +4,7 @@
;; LCD Archive Entry:
;; isearch-mode|Daniel LaLiberte|liberte@cs.uiuc.edu
;; |A minor mode replacement for isearch.el.
;; |$Date: 1992/11/07 06:17:04 $|$Revision: 1.15 $|~/modes/isearch-mode.el
;; |$Date: 1992/11/16 01:37:06 $|$Revision: 1.16 $|~/modes/isearch-mode.el
;; This file is not yet part of GNU Emacs, but it is based almost
;; entirely on isearch.el which is part of GNU Emacs.
......@@ -88,8 +88,15 @@
;;;====================================================================
;;; Change History
;;; $Header: /home/gd/gnu/emacs/19.0/lisp/RCS/isearch-mode.el,v 1.15 1992/11/07 06:17:04 jimb Exp jimb $
;;; $Header: /home/gd/gnu/emacs/19.0/lisp/RCS/isearch-mode.el,v 1.16 1992/11/16 01:37:06 jimb Exp jimb $
;;; $Log: isearch-mode.el,v $
; Revision 1.16 1992/11/16 01:37:06 jimb
; * bytecomp.el: Declare unread-command-char an obsolete variable.
; * vip.el (vip-escape-to-emacs, vip-prefix-arg-value,
; vip-prefix-arg-com): Use unread-command-event instead of
; unread-command-char; respect its new semantics.
; * isearch-mode.el (isearch-update, isearch-unread): Same.
;
; Revision 1.15 1992/11/07 06:17:04 jimb
; * isearch.el (isearch-frames-exist): This isn't what we want -
; replaced by...
......@@ -557,7 +564,7 @@ is treated as a regexp. See \\[isearch-forward] for more info."
(if (if isearch-event-data-type
(null unread-command-event)
(if isearch-gnu-emacs-events
(null unread-command-event)
(null unread-command-events)
(< unread-command-char 0)))
(progn
(if (not (input-pending-p))
......@@ -1413,6 +1420,7 @@ have special meaning in a regexp."
;; To quiet the byte-compiler.
(defvar unread-command-event)
(defvar unread-command-events)
(defvar last-command-event)
(defun isearch-char-to-string (c)
......@@ -1429,7 +1437,7 @@ have special meaning in a regexp."
(isearch-event-data-type
(setq unread-command-event char-or-event))
(isearch-gnu-emacs-events
(setq unread-command-event char-or-event))
(setq unread-command-events (list char-or-event)))
(t
(setq unread-command-char char-or-event))))
......
......@@ -100,7 +100,7 @@ the current %s and exit."
prompt char elt tail
(next (if (or (symbolp list)
(subrp list)
(compiled-function-p list)
(byte-code-function-p list)
(and (consp list)
(eq (car list) 'lambda)))
(function (lambda ()
......@@ -157,7 +157,7 @@ the current %s and exit."
(funcall actor elt)
(setq actions (1+ actions))))))
((= ?? char)
(setq unread-command-event help-char)
(setq unread-command-events (list help-char))
(setq next (` (lambda ()
(setq next '(, next))
'(, elt)))))
......
This diff is collapsed.
......@@ -322,11 +322,13 @@ preserving the comment indentation or line-starting decorations."
(paragraph-start
;; Lines containing just a comment start or just an end
;; should not be filled into paragraphs they are next to.
(concat paragraph-start
"\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[^ \t/*]"))
(concat
paragraph-start
"\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[ \t/*]*$"))
(paragraph-separate
(concat paragraph-separate
"\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[^ \t/*]"))
(concat
paragraph-separate
"\\|^[ \t]*/\\*[ \t]*$\\|^[ \t]*\\*/[ \t]*$\\|^[ \t/*]*$"))
(chars-to-delete 0))
(save-restriction
;; Don't fill the comment together with the code following it.
......
......@@ -39,7 +39,7 @@
;;; This file may be used with GNU Emacs version 18.xx if the following
;;; variable and function substutions are made.
;;; Replace:
;;; unread-command-event with unread-command-char
;;; unread-command-events with unread-command-char
;;; frame-width with screen-width
;;; auto-fill-function with auto-fill-hook
......@@ -469,7 +469,7 @@ Any other key combination is executed normally."
(if (or (= (setq c (read-char)) ??) ;insert char if not equal to `?'
(= c help-char))
(fortran-abbrev-help)
(setq unread-command-event c))))
(setq unread-command-events (list c)))))
(defun fortran-abbrev-help ()
"List the currently defined abbrevs in Fortran mode."
......@@ -535,7 +535,7 @@ See also `fortran-window-create'."
(progn (message "Type SPC to continue editing.")
(let ((char (read-char)))
(or (equal char (string-to-char " "))
(setq unread-command-event char))))))
(setq unread-command-events (list char)))))))
(fortran-window-create)))
(defun fortran-split-line ()
......
......@@ -401,7 +401,7 @@ The relative indentation among the lines of the statement are preserved."
(case-fold-search t)
;; don't mix a label with an assignment operator := :-
;; therefore look at next typed character...
(next-char (setq unread-command-event (read-char)))
(next-char (setq unread-command-events (list (read-char))))
(com-char last-command-char))
(unwind-protect
;; Problem: find out if character just read is a command char
......
......@@ -21,6 +21,8 @@
;;; along with GNU Emacs; see the file COPYING. If not, write to
;;; the Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
(require 'mouse)
;;;; Utilities.
......@@ -43,7 +45,7 @@ that scrollbar position."
"Set the window start according to where the scrollbar is dragged.
EVENT should be a scrollbar click or drag event."
(interactive "e")
(let* ((end-position (nth (1- (length event)) event))
(let* ((end-position (event-end event))
(window (nth 0 end-position))
(portion-whole (nth 2 end-position)))
(save-excursion
......@@ -60,7 +62,7 @@ EVENT should be a scrollbar click."
(let ((old-selected-window (selected-window)))
(unwind-protect
(progn
(let* ((end-position (nth (1- (length event)) event))
(let* ((end-position (event-end event))
(window (nth 0 end-position))
(portion-whole (nth 2 end-position)))
(select-window window)
......@@ -75,7 +77,7 @@ EVENT should be a scrollbar click."
(let ((old-selected-window (selected-window)))
(unwind-protect
(progn
(let* ((end-position (nth (1- (length event)) event))
(let* ((end-position (event-end event))
(window (nth 0 end-position))
(portion-whole (nth 2 end-position)))
(select-window window)
......
......@@ -59,7 +59,10 @@ With arg N, insert N newlines."
(defun quoted-insert (arg)
"Read next input character and insert it.
This is useful for inserting control characters.
You may also type up to 3 octal digits, to insert a character with that code"
You may also type up to 3 octal digits, to insert a character with that code.
`quoted-insert' inserts the character even in overstrike mode; if you
use overstrike as your normal editing mode, you can use this function
to insert characters when necessary."
(interactive "*p")
(let ((char (read-quoted-char)))
(while (> arg 0)
......@@ -789,13 +792,7 @@ Repeating \\[universal-argument] without digits or minus sign
(progn
(describe-arg value sign)
(setq key (read-key-sequence nil t))))
(if (= (length key) 1)
;; Make sure self-insert-command finds the proper character;
;; unread the character and let the command loop process it.
(setq unread-command-event (aref key 0))
;; We can't push back a longer string, so we'll emulate the
;; command loop ourselves.
(command-execute (key-binding key)))))
(setq unread-command-events (append key '()))))
(defun describe-arg (value sign)
(cond ((numberp value)
......
......@@ -65,7 +65,7 @@ Optional argument PROMPT specifies a string to use to prompt the user."
(and prompt (message (setq prompt
(format "%s %c" prompt char)))))
((> count 0)
(setq unread-command-event char count 259))
(setq unread-command-events (list char) count 259))
(t (setq code char count 259))))
(logand 255 code)))
......@@ -222,6 +222,7 @@ Accept any number of arguments, but ignore them."
(fset 'show-buffer 'set-window-buffer)
(fset 'buffer-flush-undo 'buffer-disable-undo)
(fset 'eval-current-buffer 'eval-buffer)
(fset 'compiled-function-p 'byte-code-function-p)
; alternate names
(fset 'string= 'string-equal)
......@@ -229,7 +230,6 @@ Accept any number of arguments, but ignore them."
(fset 'move-marker 'set-marker)
(fset 'eql 'eq)
(fset 'not 'null)
(fset 'numberp 'integerp)
(fset 'rplaca 'setcar)
(fset 'rplacd 'setcdr)
(fset 'beep 'ding) ;preserve lingual purtity
......@@ -325,7 +325,7 @@ If MESSAGE is nil, instructions to type EXIT-CHAR are displayed there."
(single-key-description exit-char))
(let ((char (read-char)))
(or (eq char exit-char)
(setq unread-command-event char))))
(setq unread-command-events (list char)))))
(if insert-end
(save-excursion
(delete-region pos insert-end)))
......
......@@ -318,12 +318,14 @@ but that uses minibuffer, and mucks up last-command."
(let ((pc1 (read-char)))
(if (or (not (equal pc1 mouse-prefix1))
(sit-for-millisecs 3)) ; a mouse prefix will have second char
(progn (setq unread-command-event pc1) ; Can get away with one unread.
;; Can get away with one unread.
(progn (setq unread-command-events (list pc1))
nil) ; Next input not mouse event.
(let ((pc2 (read-char)))
(if (not (equal pc2 mouse-prefix2))
(progn (setq unread-command-event pc1) ; put back the ^X
(progn (setq unread-command-events (list pc1)) ; put back the ^X
;;; Too bad can't do two: (setq unread-command-event (list pc1 pc2))
;;; Well, now we can, but I don't understand this code well enough to fix it...
(ding) ; user will have to retype that pc2.
nil) ; This input is not a mouse event.
;; Next input has mouse prefix and is within time limit.
......
......@@ -223,7 +223,7 @@ Other chars following \"%s\" are interpreted as follows:\n"
;; not used.
(defun te-escape-extended-command-unread ()
(interactive)
(setq unread-command-event last-input-char)
(setq unread-command-events (list last-input-char))
(te-escape-extended-command))
(defun te-set-escape-char (c)
......
......@@ -47,14 +47,17 @@ temacs: dotemacs
dotemacs: xmakefile
$(MAKE) CC='${CC}' -f xmakefile ${MFLAGS} temacs
# If you have a problem with cc -E here, changing
# the definition of CPP above may fix it.
### Some makes, like Ultrix's make, complain if you put a comment in
### the middle of a rule's command list! Dummies.
### The flags for optimization and debugging depend on the
### system, so take an ordinary CFLAGS value and choose the
### appropriate CPP symbols to use in ymakefile.
### If you have a problem with cc -E here, changing
### the definition of CPP above may fix it.
xmakefile: ymakefile config.h
-rm -f xmakefile xmakefile.new junk.c junk.cpp
cp ymakefile junk.c
## The flags for optimization and debugging depend on the
## system, so take an ordinary CFLAGS value and choose the
## appropriate CPP symbols to use in ymakefile.
$(CPP) junk.c > junk.cpp \
-DC_SWITCH_SITE="`echo ${CFLAGS}' ' \
| sed -e 's/-g /C_DEBUG_SWITCH /' \
......
......@@ -112,8 +112,9 @@ Lisp_Object Vbuffer_alist;
Lisp_Object Vbefore_change_function;
Lisp_Object Vafter_change_function;
/* Function to call before changing an unmodified buffer. */
Lisp_Object Vfirst_change_function;
/* List of functions to call before changing an unmodified buffer. */
Lisp_Object Vfirst_change_hook;
Lisp_Object Qfirst_change_hook;
Lisp_Object Qfundamental_mode, Qmode_class, Qpermanent_local;
......@@ -1655,10 +1656,12 @@ While executing the `after-change-function', changes to buffers do not\n\
cause calls to any `before-change-function' or `after-change-function'.");
Vafter_change_function = Qnil;
DEFVAR_LISP ("first-change-function", &Vfirst_change_function,
"Function to call before changing a buffer which is unmodified.\n\
The function is called, with no arguments, if it is non-nil.");
Vfirst_change_function = Qnil;
DEFVAR_LISP ("first-change-hook", &Vfirst_change_hook,
"A list of functions to call before changing a buffer which is unmodified.\n\
The functions are run using the `run-hooks' function.");
Vfirst_change_hook = Qnil;
Qfirst_change_hook = intern ("first-change-hook");
staticpro (&Qfirst_change_hook);
DEFVAR_PER_BUFFER ("buffer-undo-list", &current_buffer->undo_list, Qnil,
"List of undo entries in current buffer.\n\
......
......@@ -340,7 +340,8 @@ extern void reset_buffer ();
/* Functions to call before and after each text change. */
extern Lisp_Object Vbefore_change_function;
extern Lisp_Object Vafter_change_function;
extern Lisp_Object Vfirst_change_function;
extern Lisp_Object Vfirst_change_hook;
extern Lisp_Object Qfirst_change_hook;
/* Fields.
......
/* Call a Lisp function interactively.
Copyright (C) 1985, 1986, 1992 Free Software Foundation, Inc.
Copyright (C) 1985, 1986, 1992, 1993 Free Software Foundation, Inc.
This file is part of GNU Emacs.
GNU Emacs is free software; you can redistribute it and/or modify
it under the terms of the GNU General Public License as published by
the Free Software Foundation; either version 1, or (at your option)
the Free Software Foundation; either version 2, or (at your option)
any later version.
GNU Emacs is distributed in the hope that it will be useful,
......@@ -89,10 +89,11 @@ X -- Lisp expression read and evaluated.\n\
In addition, if the string begins with `*'\n\
then an error is signaled if the buffer is read-only.\n\
This happens before reading any arguments.\n\
If the string begins with `@', then the window the mouse is over is selected\n\
before anything else is done. You may use both `@' and `*';\n\
they are processed in the order that they appear."
*/
If the string begins with `@', then Emacs searches the key sequence\n\
which invoked the command for its first mouse click (or any other\n\
event which specifies a window), and selects that window before\n\
reading any arguments. You may use both `@' and `*'; they are\n\
processed in the order that they appear." */
/* ARGSUSED */
DEFUN ("interactive", Finteractive, Sinteractive, 0, UNEVALLED, 0,
......@@ -167,7 +168,7 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
/* The index of the next element of this_command_keys to examine for
the 'e' interactive code. */
int next_event = 0;
int next_event;
Lisp_Object prefix_arg;
unsigned char *string;
......@@ -296,6 +297,12 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
/* Here if function specifies a string to control parsing the defaults */
/* Set next_event to point to the first event with parameters. */
for (next_event = 0; next_event < this_command_key_count; next_event++)
if (EVENT_HAS_PARAMETERS
(XVECTOR (this_command_keys)->contents[next_event]))
break;
/* Handle special starting chars `*' and `@'. */
while (1)
{
......@@ -307,9 +314,15 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
}
else if (*string == '@')
{
Lisp_Object event =
XVECTOR (this_command_keys)->contents[next_event];
if (EVENT_HAS_PARAMETERS (event)
&& XTYPE (event = XCONS (event)->cdr) == Lisp_Cons
&& XTYPE (event = XCONS (event)->car) == Lisp_Cons
&& XTYPE (event = XCONS (event)->car) == Lisp_Window)
Fselect_window (event);
string++;
if (!NILP (Vmouse_window))
Fselect_window (Vmouse_window);
}
else break;
}
......@@ -433,11 +446,6 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
break;
case 'e': /* The invoking event. */
/* Find the next parameterized event. */
while (next_event < this_command_key_count
&& ! (EVENT_HAS_PARAMETERS
(XVECTOR (this_command_keys)->contents[next_event])))
next_event++;
if (next_event >= this_command_key_count)
error ("%s must be bound to an event with parameters",
(XTYPE (function) == Lisp_Symbol
......@@ -445,6 +453,13 @@ Otherwise, this is done only if an arg is read using the minibuffer.")
: "command"));
args[i] = XVECTOR (this_command_keys)->contents[next_event++];
varies[i] = -1;
/* Find the next parameterized event. */
while (next_event < this_command_key_count
&& ! (EVENT_HAS_PARAMETERS
(XVECTOR (this_command_keys)->contents[next_event])))
next_event++;
break;
case 'm': /* Value of mark. Does not do I/O. */
......
......@@ -49,12 +49,12 @@ extern Lisp_Object last_command_char;
reached by the mouse. */
extern Lisp_Object last_nonmenu_event;
/* Command event to be re-read, or Qnil. */
extern Lisp_Object unread_command_event;
/* List of command events to be re-read, or Qnil. */
extern Lisp_Object unread_command_events;
/* If not Qnil, this is a switch-frame event which we decided to put
off until the end of a key sequence. This should be read as the
next command input, after any unread_command_event.
next command input, after any unread_command_events.
read_key_sequence uses this to delay switch-frame events until the
end of the key sequence; Fread_char uses it to put off switch-frame
......
......@@ -256,8 +256,8 @@ DEFUN ("subrp", Fsubrp, Ssubrp, 1, 1, 0, "T if OBJECT is a built-in function.")
return Qnil;
}
DEFUN ("compiled-function-p", Fcompiled_function_p, Scompiled_function_p,
1, 1, 0, "T if OBJECT is a compiled function object.")
DEFUN ("byte-code-function-p", Fbyte_code_function_p, Sbyte_code_function_p,
1, 1, 0, "T if OBJECT is a byte-compiled function object.")
(obj)
Lisp_Object obj;
{
......@@ -308,13 +308,10 @@ DEFUN ("numberp", Fnumberp, Snumberp, 1, 1, 0,
(obj)
Lisp_Object obj;
{
if (0