Mercurial > emacs
comparison lisp/progmodes/simula.el @ 1621:ec2c000b8b69
* 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.
* simula.el (simula-electric-label): Same.
* simula.el (simula-calculate-indent): Call backward-word with the
appropriate argument.
author | Jim Blandy <jimb@redhat.com> |
---|---|
date | Mon, 16 Nov 1992 01:42:04 +0000 |
parents | 2cdce064065f |
children | 04fb1d3d6992 |
comparison
equal
deleted
inserted
replaced
1620:787f816e1f4b | 1621:ec2c000b8b69 |
---|---|
399 (insert ?:) | 399 (insert ?:) |
400 (let ((origin (- (point-max) (point))) | 400 (let ((origin (- (point-max) (point))) |
401 (case-fold-search t) | 401 (case-fold-search t) |
402 ;; don't mix a label with an assignment operator := :- | 402 ;; don't mix a label with an assignment operator := :- |
403 ;; therefore look at next typed character... | 403 ;; therefore look at next typed character... |
404 (next-char (setq unread-command-char (read-char))) | 404 (next-char (setq unread-command-event (read-char))) |
405 (com-char last-command-char)) | 405 (com-char last-command-char)) |
406 (unwind-protect | 406 (unwind-protect |
407 ;; Problem: find out if character just read is a command char | 407 ;; Problem: find out if character just read is a command char |
408 ;; that would insert something after ':' making it a label. | 408 ;; that would insert something after ':' making it a label. |
409 ;; At least \n, \r (and maybe \t) falls into this category. | 409 ;; At least \n, \r (and maybe \t) falls into this category. |
719 (simula-skip-comment-backward) | 719 (simula-skip-comment-backward) |
720 (if (and found-end | 720 (if (and found-end |
721 (not (eq (preceding-char) ?\;)) | 721 (not (eq (preceding-char) ?\;)) |
722 (if (memq (preceding-char) '(?N ?n)) | 722 (if (memq (preceding-char) '(?N ?n)) |
723 (save-excursion | 723 (save-excursion |
724 (backward-word) | 724 (backward-word 1) |
725 (not (looking-at "begin\\>"))) | 725 (not (looking-at "begin\\>"))) |
726 t)) | 726 t)) |
727 (progn | 727 (progn |
728 (simula-previous-statement 1) | 728 (simula-previous-statement 1) |
729 (simula-skip-comment-backward))) | 729 (simula-skip-comment-backward))) |