mirror of
git://git.sv.gnu.org/emacs.git
synced 2025-12-15 10:30:25 -08:00
Replace last-command-event' by last-command-char' in XEmacs.
progmodes/cc-defs.el (c-last-command-char): New macro. progmodes/cc-align.el (c-semi&comma-inside-parenlist) (c-semi&comma-no-newlines-before-nonblanks) (c-semi&comma-no-newlines-for-oneline-inliners): Use the new macro in place of `last-command-event'. progmodes/cc-cmds.el (c-electric-pound, c-electric-brace) (c-electric-slash, c-electric-semi&comma, c-electric-lt-gt) (c-electric-paren, c-electric-continued-statement): Use the new macro in place of `last-command-event'.
This commit is contained in:
parent
84ac6f9d21
commit
e0bc0f33bd
4 changed files with 44 additions and 24 deletions
|
|
@ -1284,7 +1284,7 @@ newline is added. In either case, checking is stopped. This supports
|
|||
exactly the old newline insertion behavior."
|
||||
;; newline only after semicolon, but only if that semicolon is not
|
||||
;; inside a parenthesis list (e.g. a for loop statement)
|
||||
(if (not (eq last-command-event ?\;))
|
||||
(if (not (eq (c-last-command-char) ?\;))
|
||||
nil ; continue checking
|
||||
(if (condition-case nil
|
||||
(save-excursion
|
||||
|
|
@ -1301,7 +1301,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.
|
||||
Otherwise, no determination is made."
|
||||
(save-excursion
|
||||
(if (and (= last-command-event ?\;)
|
||||
(if (and (= (c-last-command-char) ?\;)
|
||||
;;(/= (point-max)
|
||||
;; (save-excursion (skip-syntax-forward " ") (point))
|
||||
(zerop (forward-line 1))
|
||||
|
|
@ -1318,13 +1318,13 @@ suppressed in one-liners, if the line is an in-class inline function.
|
|||
For other semicolon contexts, no determination is made."
|
||||
(let ((syntax (c-guess-basic-syntax))
|
||||
(bol (save-excursion
|
||||
(if (c-safe (up-list -1) t)
|
||||
(c-point 'bol)
|
||||
-1))))
|
||||
(if (and (eq last-command-event ?\;)
|
||||
(eq (car (car syntax)) 'inclass)
|
||||
(eq (car (car (cdr syntax))) 'topmost-intro)
|
||||
(= (c-point 'bol) bol))
|
||||
(if (c-safe (up-list -1) t)
|
||||
(c-point 'bol)
|
||||
-1))))
|
||||
(if (and (eq (c-last-command-char) ?\;)
|
||||
(eq (car (car syntax)) 'inclass)
|
||||
(eq (car (car (cdr syntax))) 'topmost-intro)
|
||||
(= (c-point 'bol) bol))
|
||||
'stop
|
||||
nil)))
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue