diff options
| author | Stefan Monnier | 2001-03-23 17:50:41 +0000 |
|---|---|---|
| committer | Stefan Monnier | 2001-03-23 17:50:41 +0000 |
| commit | 5b83f9c0951c960b3dd11efc394aaf4989798929 (patch) | |
| tree | 2553a7e8ce556ae96246651ececdd525eeb9e7b7 /lisp | |
| parent | 43c099691aa057b934b8d4c1008477a881fd6b3d (diff) | |
| download | emacs-5b83f9c0951c960b3dd11efc394aaf4989798929.tar.gz emacs-5b83f9c0951c960b3dd11efc394aaf4989798929.zip | |
(skeleton-internal-list): Fix bogus logic.
(skeleton-pair-insert-maybe): Don't pair after a backslash.
Diffstat (limited to 'lisp')
| -rw-r--r-- | lisp/ChangeLog | 9 | ||||
| -rw-r--r-- | lisp/skeleton.el | 15 |
2 files changed, 16 insertions, 8 deletions
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 89a0cf7280e..157555516d5 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,7 +1,12 @@ | |||
| 1 | 2001-03-23 Stefan Monnier <monnier@cs.yale.edu> | ||
| 2 | |||
| 3 | * skeleton.el (skeleton-internal-list): Fix bogus logic. | ||
| 4 | (skeleton-pair-insert-maybe): Don't pair after a backslash. | ||
| 5 | |||
| 1 | 2001-03-23 Kenichi Handa <handa@etl.go.jp> | 6 | 2001-03-23 Kenichi Handa <handa@etl.go.jp> |
| 2 | 7 | ||
| 3 | * international/encoded-kb.el (encoded-kbd-self-insert-ccl): Call | 8 | * international/encoded-kb.el (encoded-kbd-self-insert-ccl): |
| 4 | ccl-execute-on-string directly so that CCL program handling | 9 | Call ccl-execute-on-string directly so that CCL program handling |
| 5 | multibyte sequence can work correctly. | 10 | multibyte sequence can work correctly. |
| 6 | (encoded-kbd-setup-keymap): Fix the default value of `valid-codes' | 11 | (encoded-kbd-setup-keymap): Fix the default value of `valid-codes' |
| 7 | property of the coding system. | 12 | property of the coding system. |
diff --git a/lisp/skeleton.el b/lisp/skeleton.el index 45a43ebbe5f..df23e43a132 100644 --- a/lisp/skeleton.el +++ b/lisp/skeleton.el | |||
| @@ -264,8 +264,8 @@ If ELEMENT is a string or a character it gets inserted (see also | |||
| 264 | _ interesting point, interregion here | 264 | _ interesting point, interregion here |
| 265 | > indent line (or interregion if > _) according to major mode | 265 | > indent line (or interregion if > _) according to major mode |
| 266 | @ add position to `skeleton-positions' | 266 | @ add position to `skeleton-positions' |
| 267 | & do next ELEMENT if previous moved point | 267 | & do next ELEMENT iff previous moved point |
| 268 | | do next ELEMENT if previous didn't move point | 268 | | do next ELEMENT iff previous didn't move point |
| 269 | -num delete num preceding characters (see `skeleton-untabify') | 269 | -num delete num preceding characters (see `skeleton-untabify') |
| 270 | resume: skipped, continue here if quit is signaled | 270 | resume: skipped, continue here if quit is signaled |
| 271 | nil skipped | 271 | nil skipped |
| @@ -383,9 +383,9 @@ automatically, and you are prompted to fill in the variable parts."))) | |||
| 383 | opoint) | 383 | opoint) |
| 384 | (or str | 384 | (or str |
| 385 | (setq str `(setq str (skeleton-read ',(car skeleton) nil ,recursive)))) | 385 | (setq str `(setq str (skeleton-read ',(car skeleton) nil ,recursive)))) |
| 386 | (when (and (eq (car skeleton) '\n) | 386 | (when (and (eq (cadr skeleton) '\n) |
| 387 | (save-excursion (beginning-of-line) (looking-at "[ \t]*$"))) | 387 | (<= (current-column) (current-indentation))) |
| 388 | (setq skeleton (cons '> (cdr skeleton)))) | 388 | (setq skeleton (cons nil (cons '> (cddr skeleton))))) |
| 389 | (while (setq skeleton-modified (eq opoint (point)) | 389 | (while (setq skeleton-modified (eq opoint (point)) |
| 390 | opoint (point) | 390 | opoint (point) |
| 391 | skeleton (cdr skeleton)) | 391 | skeleton (cdr skeleton)) |
| @@ -509,7 +509,7 @@ will attempt to insert pairs of matching characters.") | |||
| 509 | "*If this is nil, paired insertion is inhibited before or inside a word.") | 509 | "*If this is nil, paired insertion is inhibited before or inside a word.") |
| 510 | 510 | ||
| 511 | 511 | ||
| 512 | (defvar skeleton-pair-filter (lambda ()) | 512 | (defvar skeleton-pair-filter (lambda () nil) |
| 513 | "Attempt paired insertion if this function returns nil, before inserting. | 513 | "Attempt paired insertion if this function returns nil, before inserting. |
| 514 | This allows for context-sensitive checking whether pairing is appropriate.") | 514 | This allows for context-sensitive checking whether pairing is appropriate.") |
| 515 | 515 | ||
| @@ -530,6 +530,8 @@ With no ARG, if `skeleton-pair' is non-nil, pairing can occur. If the region | |||
| 530 | is visible the pair is wrapped around it depending on `skeleton-autowrap'. | 530 | is visible the pair is wrapped around it depending on `skeleton-autowrap'. |
| 531 | Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a | 531 | Else, if `skeleton-pair-on-word' is non-nil or we are not before or inside a |
| 532 | word, and if `skeleton-pair-filter' returns nil, pairing is performed. | 532 | word, and if `skeleton-pair-filter' returns nil, pairing is performed. |
| 533 | Pairing is also prohibited if we are right after a quoting character | ||
| 534 | such as backslash. | ||
| 533 | 535 | ||
| 534 | If a match is found in `skeleton-pair-alist', that is inserted, else | 536 | If a match is found in `skeleton-pair-alist', that is inserted, else |
| 535 | the defaults are used. These are (), [], {}, <> and `' for the | 537 | the defaults are used. These are (), [], {}, <> and `' for the |
| @@ -541,6 +543,7 @@ symmetrical ones, and the same character twice for the others." | |||
| 541 | (skeleton-end-hook)) | 543 | (skeleton-end-hook)) |
| 542 | (if (or arg | 544 | (if (or arg |
| 543 | (not skeleton-pair) | 545 | (not skeleton-pair) |
| 546 | (memq (char-syntax (preceding-char)) '(?\\ ?/)) | ||
| 544 | (and (not mark) | 547 | (and (not mark) |
| 545 | (or overwrite-mode | 548 | (or overwrite-mode |
| 546 | (if (not skeleton-pair-on-word) (looking-at "\\w")) | 549 | (if (not skeleton-pair-on-word) (looking-at "\\w")) |