Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
5b83f9c0
Commit
5b83f9c0
authored
Mar 23, 2001
by
Stefan Monnier
Browse files
(skeleton-internal-list): Fix bogus logic.
(skeleton-pair-insert-maybe): Don't pair after a backslash.
parent
43c09969
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
16 additions
and
8 deletions
+16
-8
lisp/ChangeLog
lisp/ChangeLog
+7
-2
lisp/skeleton.el
lisp/skeleton.el
+9
-6
No files found.
lisp/ChangeLog
View file @
5b83f9c0
2001-03-23 Stefan Monnier <monnier@cs.yale.edu>
* skeleton.el (skeleton-internal-list): Fix bogus logic.
(skeleton-pair-insert-maybe): Don't pair after a backslash.
2001-03-23 Kenichi Handa <handa@etl.go.jp>
* international/encoded-kb.el (encoded-kbd-self-insert-ccl):
Call
ccl-execute-on-string directly so that CCL program handling
* international/encoded-kb.el (encoded-kbd-self-insert-ccl):
Call
ccl-execute-on-string directly so that CCL program handling
multibyte sequence can work correctly.
(encoded-kbd-setup-keymap): Fix the default value of `valid-codes'
property of the coding system.
...
...
lisp/skeleton.el
View file @
5b83f9c0
...
...
@@ -264,8 +264,8 @@ If ELEMENT is a string or a character it gets inserted (see also
_ interesting point, interregion here
> indent line (or interregion if > _) according to major mode
@ add position to `skeleton-positions'
& do next ELEMENT if previous moved point
| do next ELEMENT if previous didn't move point
& do next ELEMENT if
f
previous moved point
| do next ELEMENT if
f
previous didn't move point
-num delete num preceding characters (see `skeleton-untabify')
resume: skipped, continue here if quit is signaled
nil skipped
...
...
@@ -383,9 +383,9 @@ automatically, and you are prompted to fill in the variable parts.")))
opoint)
(or str
(setq str `(setq str (skeleton-read ',(car skeleton) nil ,recursive))))
(when (and (eq (car skeleton) '\n)
(
save-excursion (beginning-of-line) (looking-at "
[
\t]*$
"
)))
(setq skeleton (cons '> (cdr skeleton))))
(when (and (eq (ca
d
r skeleton) '\n)
(
<= (current-column) (current-indentation
)))
(setq skeleton (cons
nil (cons
'> (cd
d
r skeleton))))
)
(while (setq skeleton-modified (eq opoint (point))
opoint (point)
skeleton (cdr skeleton))
...
...
@@ -509,7 +509,7 @@ will attempt to insert pairs of matching characters.")
"
*If
this
is
nil
,
paired
insertion
is
inhibited
before
or
inside
a
word.
")
(defvar skeleton-pair-filter (lambda ())
(defvar skeleton-pair-filter (lambda ()
nil
)
"
Attempt
paired
insertion
if
this
function
returns
nil
,
before
inserting.
This
allows
for
context-sensitive
checking
whether
pairing
is
appropriate.
")
...
...
@@ -530,6 +530,8 @@ With no ARG, if `skeleton-pair' is non-nil, pairing can occur. If the region
is
visible
the
pair
is
wrapped
around
it
depending
on
`
skeleton-autowrap
'.
Else,
if
`
skeleton-pair-on-word
'
is
non-nil
or
we
are
not
before
or
inside
a
word,
and
if
`
skeleton-pair-filter
'
returns
nil
,
pairing
is
performed.
Pairing
is
also
prohibited
if
we
are
right
after
a
quoting
character
such
as
backslash.
If
a
match
is
found
in
`
skeleton-pair-alist
',
that
is
inserted,
else
the
defaults
are
used.
These
are
()
,
[],
{},
<>
and
`'
for
the
...
...
@@ -541,6 +543,7 @@ symmetrical ones, and the same character twice for the others."
(skeleton-end-hook))
(if (or arg
(not skeleton-pair)
(memq (char-syntax (preceding-char)) '(?\\ ?/))
(and (not mark)
(or overwrite-mode
(if (not skeleton-pair-on-word) (looking-at "
\\w
"))
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment