Commit 1ba983e8 authored by Glenn Morris's avatar Glenn Morris
Browse files

Replace last-command-char with last-command-event.

parent e93c003e
...@@ -7,6 +7,16 @@ ...@@ -7,6 +7,16 @@
* calc/calc-keypd.el, calc/calc-misc.el, calc/calc-prog.el: * calc/calc-keypd.el, calc/calc-misc.el, calc/calc-prog.el:
* calc/calc-sel.el, calc/calc-store.el, calc/calc-stuff.el: * calc/calc-sel.el, calc/calc-store.el, calc/calc-stuff.el:
* calc/calc-units.el, calc/calc-yank.el, calc/calc.el: * calc/calc-units.el, calc/calc-yank.el, calc/calc.el:
* eshell/em-smart.el, eshell/esh-mode.el:
* play/mpuz.el:
* progmodes/ada-mode.el, progmodes/antlr-mode.el, progmodes/cc-align.el:
* progmodes/cc-cmds.el, progmodes/cperl-mode.el, progmodes/f90.el:
* progmodes/fortran.el, progmodes/icon.el, progmodes/idlwave.el:
* progmodes/octave-mod.el, progmodes/pascal.el, progmodes/perl-mode.el:
* progmodes/prolog.el, progmodes/sh-script.el, progmodes/simula.el:
* progmodes/tcl.el, progmodes/vera-mode.el, progmodes/verilog-mode.el:
* progmodes/vhdl-mode.el, progmodes/xscheme.el:
* textmodes/sgml-mode.el, textmodes/table.el, textmodes/two-column.el:
Replace last-command-char with last-command-event. Replace last-command-char with last-command-event.
   
2009-01-09 Dave Love <fx@gnu.org> 2009-01-09 Dave Love <fx@gnu.org>
......
...@@ -291,7 +291,7 @@ and the end of the buffer are still visible." ...@@ -291,7 +291,7 @@ and the end of the buffer are still visible."
(setq clear t) (setq clear t)
(cond (cond
((eq this-command 'self-insert-command) ((eq this-command 'self-insert-command)
(if (eq last-command-char ? ) (if (eq last-command-event ? )
(if (and eshell-smart-space-goes-to-end (if (and eshell-smart-space-goes-to-end
eshell-current-command) eshell-current-command)
(if (not (pos-visible-in-window-p (point-max))) (if (not (pos-visible-in-window-p (point-max)))
......
;;; esh-mode.el --- user interface ;;; esh-mode.el --- user interface
;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, ;; Copyright (C) 1999, 2000, 2001, 2002, 2003, 2004, 2005, 2006, 2007,
;; 2005, 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; 2008, 2009 Free Software Foundation, Inc.
;; Author: John Wiegley <johnw@gnu.org> ;; Author: John Wiegley <johnw@gnu.org>
...@@ -484,9 +484,9 @@ This is used by `eshell-watch-for-password-prompt'." ...@@ -484,9 +484,9 @@ This is used by `eshell-watch-for-password-prompt'."
(interactive "i") (interactive "i")
(process-send-string (process-send-string
(eshell-interactive-process) (eshell-interactive-process)
(char-to-string (if (symbolp last-command-char) (char-to-string (if (symbolp last-command-event)
(get last-command-char 'ascii-character) (get last-command-event 'ascii-character)
last-command-char)))) last-command-event))))
(defun eshell-intercept-commands () (defun eshell-intercept-commands ()
(when (and (eshell-interactive-process) (when (and (eshell-interactive-process)
......
;;; mpuz.el --- multiplication puzzle for GNU Emacs ;;; mpuz.el --- multiplication puzzle for GNU Emacs
;; Copyright (C) 1990, 2001, 2002, 2003, 2004, 2005, ;; Copyright (C) 1990, 2001, 2002, 2003, 2004, 2005, 2006, 2007, 2008,
;; 2006, 2007, 2008, 2009 Free Software Foundation, Inc. ;; 2009 Free Software Foundation, Inc.
;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr> ;; Author: Philippe Schnoebelen <phs@lsv.ens-cachan.fr>
;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org> ;; Overhauled: Daniel Pfeiffer <occitan@esperanto.org>
...@@ -424,7 +424,7 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]." ...@@ -424,7 +424,7 @@ You may abort a game by typing \\<mpuz-mode-map>\\[mpuz-offer-abort]."
(interactive) (interactive)
(if mpuz-in-progress (if mpuz-in-progress
(let (letter-char digit digit-char message) (let (letter-char digit digit-char message)
(setq letter-char (upcase last-command-char) (setq letter-char (upcase last-command-event)
digit (mpuz-to-digit (- letter-char ?A))) digit (mpuz-to-digit (- letter-char ?A)))
(cond ((mpuz-digit-solved-p digit) (cond ((mpuz-digit-solved-p digit)
(message "%c already solved." letter-char) (message "%c already solved." letter-char)
......
...@@ -1628,7 +1628,7 @@ ARG is the prefix the user entered with \\[universal-argument]." ...@@ -1628,7 +1628,7 @@ ARG is the prefix the user entered with \\[universal-argument]."
(interactive "P") (interactive "P")
(if ada-auto-case (if ada-auto-case
(let ((lastk last-command-char) (let ((lastk last-command-event)
(previous-syntax-table (syntax-table))) (previous-syntax-table (syntax-table)))
(unwind-protect (unwind-protect
...@@ -1662,9 +1662,9 @@ ARG is the prefix the user entered with \\[universal-argument]." ...@@ -1662,9 +1662,9 @@ ARG is the prefix the user entered with \\[universal-argument]."
;; Else, no auto-casing ;; Else, no auto-casing
(cond (cond
((eq last-command-char ?\n) ((eq last-command-event ?\n)
(funcall ada-lfd-binding)) (funcall ada-lfd-binding))
((eq last-command-char ?\r) ((eq last-command-event ?\r)
(funcall ada-ret-binding)) (funcall ada-ret-binding))
(t (t
(self-insert-command (prefix-numeric-value arg)))) (self-insert-command (prefix-numeric-value arg))))
......
...@@ -2512,7 +2512,7 @@ ANTLR's syntax and influences the auto indentation, see ...@@ -2512,7 +2512,7 @@ ANTLR's syntax and influences the auto indentation, see
(let ((context (antlr-syntactic-context))) (let ((context (antlr-syntactic-context)))
(not (and (numberp context) (not (and (numberp context)
(or (zerop context) (or (zerop context)
(memq last-command-char '(?\{ ?\})))))))) (memq last-command-event '(?\{ ?\}))))))))
(self-insert-command (prefix-numeric-value arg)) (self-insert-command (prefix-numeric-value arg))
(self-insert-command (prefix-numeric-value arg)) (self-insert-command (prefix-numeric-value arg))
(antlr-indent-line))) (antlr-indent-line)))
......
...@@ -1245,7 +1245,7 @@ newline is added. In either case, checking is stopped. This supports ...@@ -1245,7 +1245,7 @@ newline is added. In either case, checking is stopped. This supports
exactly the old newline insertion behavior." exactly the old newline insertion behavior."
;; newline only after semicolon, but only if that semicolon is not ;; newline only after semicolon, but only if that semicolon is not
;; inside a parenthesis list (e.g. a for loop statement) ;; inside a parenthesis list (e.g. a for loop statement)
(if (not (eq last-command-char ?\;)) (if (not (eq last-command-event ?\;))
nil ; continue checking nil ; continue checking
(if (condition-case nil (if (condition-case nil
(save-excursion (save-excursion
...@@ -1262,7 +1262,7 @@ If a comma was inserted, no determination is made. If a semicolon was ...@@ -1262,7 +1262,7 @@ If a comma was inserted, no determination is made. If a semicolon was
inserted, and the following line is not blank, no newline is inserted. inserted, and the following line is not blank, no newline is inserted.
Otherwise, no determination is made." Otherwise, no determination is made."
(save-excursion (save-excursion
(if (and (= last-command-char ?\;) (if (and (= last-command-event ?\;)
;;(/= (point-max) ;;(/= (point-max)
;; (save-excursion (skip-syntax-forward " ") (point)) ;; (save-excursion (skip-syntax-forward " ") (point))
(zerop (forward-line 1)) (zerop (forward-line 1))
...@@ -1282,7 +1282,7 @@ For other semicolon contexts, no determination is made." ...@@ -1282,7 +1282,7 @@ For other semicolon contexts, no determination is made."
(if (c-safe (up-list -1) t) (if (c-safe (up-list -1) t)
(c-point 'bol) (c-point 'bol)
-1)))) -1))))
(if (and (eq last-command-char ?\;) (if (and (eq last-command-event ?\;)
(eq (car (car syntax)) 'inclass) (eq (car (car syntax)) 'inclass)
(eq (car (car (cdr syntax))) 'topmost-intro) (eq (car (car (cdr syntax))) 'topmost-intro)
(= (c-point 'bol) bol)) (= (c-point 'bol) bol))
......
...@@ -476,7 +476,7 @@ inside a literal or a macro, nothing special happens." ...@@ -476,7 +476,7 @@ inside a literal or a macro, nothing special happens."
(bolp (bolp))) (bolp (bolp)))
(beginning-of-line) (beginning-of-line)
(delete-horizontal-space) (delete-horizontal-space)
(insert last-command-char) (insert last-command-event)
(and (not bolp) (and (not bolp)
(goto-char (- (point-max) pos))) (goto-char (- (point-max) pos)))
))) )))
...@@ -735,7 +735,7 @@ settings of `c-cleanup-list' are done." ...@@ -735,7 +735,7 @@ settings of `c-cleanup-list' are done."
;; `}': clean up empty defun braces ;; `}': clean up empty defun braces
(when (c-save-buffer-state () (when (c-save-buffer-state ()
(and (memq 'empty-defun-braces c-cleanup-list) (and (memq 'empty-defun-braces c-cleanup-list)
(eq last-command-char ?\}) (eq last-command-event ?\})
(c-intersect-lists '(defun-close class-close inline-close) (c-intersect-lists '(defun-close class-close inline-close)
syntax) syntax)
(progn (progn
...@@ -751,14 +751,14 @@ settings of `c-cleanup-list' are done." ...@@ -751,14 +751,14 @@ settings of `c-cleanup-list' are done."
;; `}': compact to a one-liner defun? ;; `}': compact to a one-liner defun?
(save-match-data (save-match-data
(when (when
(and (eq last-command-char ?\}) (and (eq last-command-event ?\})
(memq 'one-liner-defun c-cleanup-list) (memq 'one-liner-defun c-cleanup-list)
(c-intersect-lists '(defun-close) syntax) (c-intersect-lists '(defun-close) syntax)
(c-try-one-liner)) (c-try-one-liner))
(setq here (- (point-max) pos)))) (setq here (- (point-max) pos))))
;; `{': clean up brace-else-brace and brace-elseif-brace ;; `{': clean up brace-else-brace and brace-elseif-brace
(when (eq last-command-char ?\{) (when (eq last-command-event ?\{)
(cond (cond
((and (memq 'brace-else-brace c-cleanup-list) ((and (memq 'brace-else-brace c-cleanup-list)
(re-search-backward (re-search-backward
...@@ -812,7 +812,7 @@ settings of `c-cleanup-list' are done." ...@@ -812,7 +812,7 @@ settings of `c-cleanup-list' are done."
)))) ))))
;; blink the paren ;; blink the paren
(and (eq last-command-char ?\}) (and (eq last-command-event ?\})
(not executing-kbd-macro) (not executing-kbd-macro)
old-blink-paren old-blink-paren
(save-excursion (save-excursion
...@@ -849,7 +849,7 @@ is inhibited." ...@@ -849,7 +849,7 @@ is inhibited."
(when (and (not arg) (when (and (not arg)
(eq literal 'c) (eq literal 'c)
(memq 'comment-close-slash c-cleanup-list) (memq 'comment-close-slash c-cleanup-list)
(eq last-command-char ?/) (eq last-command-event ?/)
(looking-at (concat "[ \t]*\\(" (looking-at (concat "[ \t]*\\("
(regexp-quote comment-end) "\\)?$")) (regexp-quote comment-end) "\\)?$"))
; (eq c-block-comment-ender "*/") ; C-style comments ALWAYS end in */ ; (eq c-block-comment-ender "*/") ; C-style comments ALWAYS end in */
...@@ -865,7 +865,7 @@ is inhibited." ...@@ -865,7 +865,7 @@ is inhibited."
(setq indentp (and (not arg) (setq indentp (and (not arg)
c-syntactic-indentation c-syntactic-indentation
c-electric-flag c-electric-flag
(eq last-command-char ?/) (eq last-command-event ?/)
(eq (char-before) (if literal ?* ?/)))) (eq (char-before) (if literal ?* ?/))))
(self-insert-command (prefix-numeric-value arg)) (self-insert-command (prefix-numeric-value arg))
(if indentp (if indentp
...@@ -939,10 +939,10 @@ settings of `c-cleanup-list'." ...@@ -939,10 +939,10 @@ settings of `c-cleanup-list'."
(let ((pos (- (point-max) (point)))) (let ((pos (- (point-max) (point))))
(if (c-save-buffer-state () (if (c-save-buffer-state ()
(and (or (and (and (or (and
(eq last-command-char ?,) (eq last-command-event ?,)
(memq 'list-close-comma c-cleanup-list)) (memq 'list-close-comma c-cleanup-list))
(and (and
(eq last-command-char ?\;) (eq last-command-event ?\;)
(memq 'defun-close-semi c-cleanup-list))) (memq 'defun-close-semi c-cleanup-list)))
(progn (progn
(forward-char -1) (forward-char -1)
...@@ -1097,7 +1097,7 @@ numeric argument is supplied, or the point is inside a literal." ...@@ -1097,7 +1097,7 @@ numeric argument is supplied, or the point is inside a literal."
<-pos) <-pos)
(when c-recognize-<>-arglists (when c-recognize-<>-arglists
(if (eq last-command-char ?<) (if (eq last-command-event ?<)
(when (and (progn (when (and (progn
(backward-char) (backward-char)
(= (point) (= (point)
...@@ -1220,7 +1220,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." ...@@ -1220,7 +1220,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
;; clean up brace-elseif-brace ;; clean up brace-elseif-brace
(when (when
(and (memq 'brace-elseif-brace c-cleanup-list) (and (memq 'brace-elseif-brace c-cleanup-list)
(eq last-command-char ?\() (eq last-command-event ?\()
(re-search-backward (re-search-backward
(concat "}" (concat "}"
"\\([ \t\n]\\|\\\\\n\\)*" "\\([ \t\n]\\|\\\\\n\\)*"
...@@ -1238,7 +1238,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." ...@@ -1238,7 +1238,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
;; clean up brace-catch-brace ;; clean up brace-catch-brace
(when (when
(and (memq 'brace-catch-brace c-cleanup-list) (and (memq 'brace-catch-brace c-cleanup-list)
(eq last-command-char ?\() (eq last-command-event ?\()
(re-search-backward (re-search-backward
(concat "}" (concat "}"
"\\([ \t\n]\\|\\\\\n\\)*" "\\([ \t\n]\\|\\\\\n\\)*"
...@@ -1259,7 +1259,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." ...@@ -1259,7 +1259,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
;; space-before-funcall clean-up? ;; space-before-funcall clean-up?
((and (memq 'space-before-funcall c-cleanup-list) ((and (memq 'space-before-funcall c-cleanup-list)
(eq last-command-char ?\() (eq last-command-event ?\()
(save-excursion (save-excursion
(backward-char) (backward-char)
(skip-chars-backward " \t") (skip-chars-backward " \t")
...@@ -1277,7 +1277,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'." ...@@ -1277,7 +1277,7 @@ newline cleanups are done if appropriate; see the variable `c-cleanup-list'."
;; compact-empty-funcall clean-up? ;; compact-empty-funcall clean-up?
((c-save-buffer-state () ((c-save-buffer-state ()
(and (memq 'compact-empty-funcall c-cleanup-list) (and (memq 'compact-empty-funcall c-cleanup-list)
(eq last-command-char ?\)) (eq last-command-event ?\))
(save-excursion (save-excursion
(c-safe (backward-char 2)) (c-safe (backward-char 2))
(when (looking-at "()") (when (looking-at "()")
...@@ -1306,7 +1306,7 @@ keyword on the line, the keyword is not inserted inside a literal, and ...@@ -1306,7 +1306,7 @@ keyword on the line, the keyword is not inserted inside a literal, and
(when (c-save-buffer-state () (when (c-save-buffer-state ()
(and c-electric-flag (and c-electric-flag
c-syntactic-indentation c-syntactic-indentation
(not (eq last-command-char ?_)) (not (eq last-command-event ?_))
(= (save-excursion (= (save-excursion
(skip-syntax-backward "w") (skip-syntax-backward "w")
(point)) (point))
......
...@@ -2037,11 +2037,11 @@ char is \"{\", insert extra newline before only if ...@@ -2037,11 +2037,11 @@ char is \"{\", insert extra newline before only if
(save-excursion (save-excursion
(setq insertpos (point-marker)) (setq insertpos (point-marker))
(goto-char other-end) (goto-char other-end)
(setq last-command-char ?\{) (setq last-command-event ?\{)
(cperl-electric-lbrace arg insertpos)) (cperl-electric-lbrace arg insertpos))
(forward-char 1)) (forward-char 1))
;; Check whether we close something "usual" with `}' ;; Check whether we close something "usual" with `}'
(if (and (eq last-command-char ?\}) (if (and (eq last-command-event ?\})
(not (not
(condition-case nil (condition-case nil
(save-excursion (save-excursion
...@@ -2059,7 +2059,7 @@ char is \"{\", insert extra newline before only if ...@@ -2059,7 +2059,7 @@ char is \"{\", insert extra newline before only if
(save-excursion (save-excursion
(skip-chars-backward " \t") (skip-chars-backward " \t")
(bolp))) (bolp)))
(and (eq last-command-char ?\{) ; Do not insert newline (and (eq last-command-event ?\{) ; Do not insert newline
;; if after ")" and `cperl-extra-newline-before-brace' ;; if after ")" and `cperl-extra-newline-before-brace'
;; is nil, do not insert extra newline. ;; is nil, do not insert extra newline.
(not cperl-extra-newline-before-brace) (not cperl-extra-newline-before-brace)
...@@ -2080,7 +2080,7 @@ char is \"{\", insert extra newline before only if ...@@ -2080,7 +2080,7 @@ char is \"{\", insert extra newline before only if
(save-excursion (save-excursion
(if insertpos (progn (goto-char insertpos) (if insertpos (progn (goto-char insertpos)
(search-forward (make-string (search-forward (make-string
1 last-command-char)) 1 last-command-event))
(setq insertpos (1- (point))))) (setq insertpos (1- (point)))))
(delete-char -1)))) (delete-char -1))))
(if insertpos (if insertpos
...@@ -2119,12 +2119,12 @@ char is \"{\", insert extra newline before only if ...@@ -2119,12 +2119,12 @@ char is \"{\", insert extra newline before only if
(setq cperl-auto-newline nil)) (setq cperl-auto-newline nil))
(cperl-electric-brace arg) (cperl-electric-brace arg)
(and (cperl-val 'cperl-electric-parens) (and (cperl-val 'cperl-electric-parens)
(eq last-command-char ?{) (eq last-command-event ?{)
(memq last-command-char (memq last-command-event
(append cperl-electric-parens-string nil)) (append cperl-electric-parens-string nil))
(or (if other-end (goto-char (marker-position other-end))) (or (if other-end (goto-char (marker-position other-end)))
t) t)
(setq last-command-char ?} pos (point)) (setq last-command-event ?} pos (point))
(progn (cperl-electric-brace arg t) (progn (cperl-electric-brace arg t)
(goto-char pos))))) (goto-char pos)))))
...@@ -2141,11 +2141,11 @@ See `cperl-electric-parens'." ...@@ -2141,11 +2141,11 @@ See `cperl-electric-parens'."
(point-marker)) (point-marker))
nil))) nil)))
(if (and (cperl-val 'cperl-electric-parens) (if (and (cperl-val 'cperl-electric-parens)
(memq last-command-char (memq last-command-event
(append cperl-electric-parens-string nil)) (append cperl-electric-parens-string nil))
(>= (save-excursion (cperl-to-comment-or-eol) (point)) (point)) (>= (save-excursion (cperl-to-comment-or-eol) (point)) (point))
;;(not (save-excursion (search-backward "#" beg t))) ;;(not (save-excursion (search-backward "#" beg t)))
(if (eq last-command-char ?<) (if (eq last-command-event ?<)
(progn (progn
(and abbrev-mode ; later it is too late, may be after `for' (and abbrev-mode ; later it is too late, may be after `for'
(expand-abbrev)) (expand-abbrev))
...@@ -2156,7 +2156,7 @@ See `cperl-electric-parens'." ...@@ -2156,7 +2156,7 @@ See `cperl-electric-parens'."
(if other-end (goto-char (marker-position other-end))) (if other-end (goto-char (marker-position other-end)))
(insert (make-string (insert (make-string
(prefix-numeric-value arg) (prefix-numeric-value arg)
(cdr (assoc last-command-char '((?{ .?}) (cdr (assoc last-command-event '((?{ .?})
(?[ . ?]) (?[ . ?])
(?( . ?)) (?( . ?))
(?< . ?>)))))) (?< . ?>))))))
...@@ -2171,7 +2171,7 @@ Affected by `cperl-electric-parens'." ...@@ -2171,7 +2171,7 @@ Affected by `cperl-electric-parens'."
(let ((beg (save-excursion (beginning-of-line) (point))) (let ((beg (save-excursion (beginning-of-line) (point)))
(other-end (if (and cperl-electric-parens-mark (other-end (if (and cperl-electric-parens-mark
(cperl-val 'cperl-electric-parens) (cperl-val 'cperl-electric-parens)
(memq last-command-char (memq last-command-event
(append cperl-electric-parens-string nil)) (append cperl-electric-parens-string nil))
(cperl-mark-active) (cperl-mark-active)
(< (mark) (point))) (< (mark) (point)))
...@@ -2180,7 +2180,7 @@ Affected by `cperl-electric-parens'." ...@@ -2180,7 +2180,7 @@ Affected by `cperl-electric-parens'."
p) p)
(if (and other-end (if (and other-end
(cperl-val 'cperl-electric-parens) (cperl-val 'cperl-electric-parens)
(memq last-command-char '( ?\) ?\] ?\} ?\> )) (memq last-command-event '( ?\) ?\] ?\} ?\> ))
(>= (save-excursion (cperl-to-comment-or-eol) (point)) (point)) (>= (save-excursion (cperl-to-comment-or-eol) (point)) (point))
;;(not (save-excursion (search-backward "#" beg t))) ;;(not (save-excursion (search-backward "#" beg t)))
) )
...@@ -2190,7 +2190,7 @@ Affected by `cperl-electric-parens'." ...@@ -2190,7 +2190,7 @@ Affected by `cperl-electric-parens'."
(if other-end (goto-char other-end)) (if other-end (goto-char other-end))
(insert (make-string (insert (make-string
(prefix-numeric-value arg) (prefix-numeric-value arg)
(cdr (assoc last-command-char '((?\} . ?\{) (cdr (assoc last-command-event '((?\} . ?\{)
(?\] . ?\[) (?\] . ?\[)
(?\) . ?\() (?\) . ?\()
(?\> . ?\<)))))) (?\> . ?\<))))))
...@@ -2202,9 +2202,9 @@ Affected by `cperl-electric-parens'." ...@@ -2202,9 +2202,9 @@ Affected by `cperl-electric-parens'."
Help message may be switched off by setting `cperl-message-electric-keyword' Help message may be switched off by setting `cperl-message-electric-keyword'
to nil." to nil."
(let ((beg (save-excursion (beginning-of-line) (point))) (let ((beg (save-excursion (beginning-of-line) (point)))
(dollar (and (eq last-command-char ?$) (dollar (and (eq last-command-event ?$)
(eq this-command 'self-insert-command))) (eq this-command 'self-insert-command)))
(delete (and (memq last-command-char '(?\s ?\n ?\t ?\f)) (delete (and (memq last-command-event '(?\s ?\n ?\t ?\f))
(memq this-command '(self-insert-command newline)))) (memq this-command '(self-insert-command newline))))
my do) my do)
(and (save-excursion (and (save-excursion
...@@ -2258,7 +2258,7 @@ to nil." ...@@ -2258,7 +2258,7 @@ to nil."
(forward-char 1) (forward-char 1)
(delete-char 1))) (delete-char 1)))
(search-backward ")") (search-backward ")")
(if (eq last-command-char ?\() (if (eq last-command-event ?\()
(progn ; Avoid "if (())" (progn ; Avoid "if (())"
(delete-backward-char 1) (delete-backward-char 1)
(delete-backward-char -1)))) (delete-backward-char -1))))
...@@ -2279,7 +2279,7 @@ to nil." ...@@ -2279,7 +2279,7 @@ to nil."
(defun cperl-electric-pod () (defun cperl-electric-pod ()
"Insert a POD chunk appropriate after a =POD directive." "Insert a POD chunk appropriate after a =POD directive."
(let ((delete (and (memq last-command-char '(?\s ?\n ?\t ?\f)) (let ((delete (and (memq last-command-event '(?\s ?\n ?\t ?\f))
(memq this-command '(self-insert-command newline)))) (memq this-command '(self-insert-command newline))))
head1 notlast name p really-delete over) head1 notlast name p really-delete over)
(and (save-excursion (and (save-excursion
...@@ -2499,7 +2499,7 @@ If in POD, insert appropriate lines." ...@@ -2499,7 +2499,7 @@ If in POD, insert appropriate lines."
(interactive "P") (interactive "P")
(let ((end (point)) (let ((end (point))
(auto (and cperl-auto-newline (auto (and cperl-auto-newline
(or (not (eq last-command-char ?:)) (or (not (eq last-command-event ?:))
cperl-auto-newline-after-colon))) cperl-auto-newline-after-colon)))
insertpos) insertpos)
(if (and ;;(not arg) (if (and ;;(not arg)
...@@ -2513,7 +2513,7 @@ If in POD, insert appropriate lines." ...@@ -2513,7 +2513,7 @@ If in POD, insert appropriate lines."
;; Colon is special only after a label ;; Colon is special only after a label
;; So quickly rule out most other uses of colon ;; So quickly rule out most other uses of colon
;; and do no indentation for them. ;; and do no indentation for them.
(and (eq last-command-char ?:) (and (eq last-command-event ?:)
(save-excursion (save-excursion
(forward-word 1) (forward-word 1)
(skip-chars-forward " \t") (skip-chars-forward " \t")
......
...@@ -2093,7 +2093,7 @@ Leave point at the end of line." ...@@ -2093,7 +2093,7 @@ Leave point at the end of line."
"Typing `\\[help-command] or `? lists all the F90 abbrevs. "Typing `\\[help-command] or `? lists all the F90 abbrevs.
Any other key combination is executed normally." Any other key combination is executed normally."
(interactive "*") (interactive "*")
(insert last-command-char) (insert last-command-event)
(let (char event) (let (char event)
(if (fboundp 'next-command-event) ; XEmacs (if (fboundp 'next-command-event) ; XEmacs
(setq event (next-command-event) (setq event (next-command-event)
......
...@@ -1006,7 +1006,7 @@ With non-nil ARG, uncomments the region." ...@@ -1006,7 +1006,7 @@ With non-nil ARG, uncomments the region."
"Typing ;\\[help-command] or ;? lists all the Fortran abbrevs. "Typing ;\\[help-command] or ;? lists all the Fortran abbrevs.
Any other key combination is executed normally." Any other key combination is executed normally."
(interactive "*") (interactive "*")
(insert last-command-char) (insert last-command-event)
(let* ((event (if (fboundp 'next-command-event) ; XEmacs (let* ((event (if (fboundp 'next-command-event) ; XEmacs
(next-command-event) (next-command-event)
(read-event))) (read-event)))
...@@ -1167,7 +1167,7 @@ Auto-indent does not happen if a numeric ARG is used." ...@@ -1167,7 +1167,7 @@ Auto-indent does not happen if a numeric ARG is used."
(looking-at "[0-9]")) ; within a line number (looking-at "[0-9]")) ; within a line number
(self-insert-command (prefix-numeric-value arg)) (self-insert-command (prefix-numeric-value arg))
(skip-chars-backward " \t") (skip-chars-backward " \t")
(insert last-command-char) (insert last-command-event)
(fortran-indent-line))))