1
0
Fork 0
mirror of git://git.code.sf.net/p/zsh/code synced 2024-04-30 05:45:16 +02:00

49756 + 49758(Daniel): replace LPAR() in FAQ.yo by SUBST(_LPAR_)

In FAQ.yo, macros inside mytt() and tt() are not expanded.
Also includes an update for zyodl.vim by Daniel.
This commit is contained in:
Jun-ichi Takimoto 2022-02-15 16:50:21 +09:00
parent 2da1f64da7
commit 31d42ecb84
3 changed files with 14 additions and 7 deletions

View File

@ -1,3 +1,8 @@
2022-02-15 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>
* 49756 + 49758 (Daniel): Etc/FAQ.yo, Util/zyodl.vim: replace
yodl macro LPAR() in FAQ.yo by SUBST(_LPAR_)
2022-02-13 Axel Beckert <abe@deuxchevaux.org> 2022-02-13 Axel Beckert <abe@deuxchevaux.org>
* unposted: README: Fix underline length of "Incompatibilities * unposted: README: Fix underline length of "Incompatibilities

View File

@ -55,8 +55,8 @@ def(emdash)(0)(\
whenhtml(---)\ whenhtml(---)\
whenman(--)whenms(--)whensgml(--)\ whenman(--)whenms(--)whensgml(--)\
whentxt(--))\ whentxt(--))\
def(LPAR)(0)(CHAR(40))\ SUBST(_LPAR_)(CHAR(40))\
def(RPAR)(1)(CHAR(41)) SUBST(_RPAR_)(CHAR(41))
myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2010/02/15) myreport(Z-Shell Frequently-Asked Questions)(Peter Stephenson)(2010/02/15)
COMMENT(-- the following are for Usenet and must appear first)\ COMMENT(-- the following are for Usenet and must appear first)\
description(\ description(\
@ -706,7 +706,7 @@ label(23)
cd() { builtin cd "$@"; print -D $PWD; } cd() { builtin cd "$@"; print -D $PWD; }
) )
(which converts your home directory to a tt(~)). In fact, this problem is (which converts your home directory to a tt(~)). In fact, this problem is
better solved by defining the special function chpwd+LPAR()RPAR() (see better solved by defining the special function chpwd+_LPAR__RPAR_ (see
the manual). Note also that the mytt(;) at the end of the function is the manual). Note also that the mytt(;) at the end of the function is
optional in zsh, but not in ksh or sh (for sh's where it exists). optional in zsh, but not in ksh or sh (for sh's where it exists).
@ -790,7 +790,7 @@ label(23)
function l { /bin/ls -la "$@" | more } function l { /bin/ls -la "$@" | more }
) )
The mytt(l) after mytt(function) is not expanded. Note you don't need The mytt(l) after mytt(function) is not expanded. Note you don't need
the mytt(LPAR()RPAR()) in this case, although it's harmless. the mytt(_LPAR__RPAR_) in this case, although it's harmless.
You need to be careful if you are defining a function with multiple You need to be careful if you are defining a function with multiple
names; most people don't need to do this, so it's an unusual problem, names; most people don't need to do this, so it's an unusual problem,
@ -803,7 +803,7 @@ label(23)
This oddity was fixed in version 5.1. This oddity was fixed in version 5.1.
The rest of this item assumes you use the (more common, The rest of this item assumes you use the (more common,
but equivalent) mytt(LPAR()RPAR()) definitions. but equivalent) mytt(_LPAR__RPAR_) definitions.
Bart Schaefer's rule is: Define first those aliases you expect to Bart Schaefer's rule is: Define first those aliases you expect to
use in the body of a function, but define the function first if the use in the body of a function, but define the function first if the
@ -1986,7 +1986,7 @@ label(327)
mytt(something) mustn't contain tt(/) if the pattern is being used for mytt(something) mustn't contain tt(/) if the pattern is being used for
globbing. globbing.
Likewise, mytt(abc+LPAR()<->~<10-100>RPAR().txt) matches a file consisting of Likewise, mytt(abc+_LPAR_<->~<10-100>_RPAR_.txt) matches a file consisting of
tt(abc), then some digits, then tt(.txt), unless the digits happen to tt(abc), then some digits, then tt(.txt), unless the digits happen to
match a number from 10 to 100 inclusive (remember the handy mytt(<->) match a number from 10 to 100 inclusive (remember the handy mytt(<->)
pattern for matching integers with optional limits to the range). So pattern for matching integers with optional limits to the range). So
@ -2109,7 +2109,7 @@ sect(Why doesn't the expansion mytt(*.{tex,aux,pdf}) do what I expect?)
This use of parentheses is special to zsh. Modern Bourne-like shells This use of parentheses is special to zsh. Modern Bourne-like shells
have a syntax like this, too, but with an mytt(@) in front of the have a syntax like this, too, but with an mytt(@) in front of the
parentheses: again, see link(2.1)(21), and search for mytt(@+LPAR()). parentheses: again, see link(2.1)(21), and search for mytt(@_LPAR_).
This is harder for the user to remember but easier for the shell to This is harder for the user to remember but easier for the shell to
parse! parse!

View File

@ -82,6 +82,8 @@ syn keyword zyodlBullet itemiz conceal cchar=•
syn match zyodlSpecial "\<DASH()-" conceal cchar= syn match zyodlSpecial "\<DASH()-" conceal cchar=
syn match zyodlSpecial "+\?LPAR()" conceal cchar=( syn match zyodlSpecial "+\?LPAR()" conceal cchar=(
syn match zyodlSpecial "+\?RPAR()" conceal cchar=) syn match zyodlSpecial "+\?RPAR()" conceal cchar=)
syn match zyodlSpecial "+\?_LPAR_" conceal cchar=(
syn match zyodlSpecial "+\?_RPAR_" conceal cchar=)
syn match zyodlSpecial "+\?PLUS()" conceal cchar=+ syn match zyodlSpecial "+\?PLUS()" conceal cchar=+
syn match zyodlFAQDash "+\?\<emdash()" conceal cchar= syn match zyodlFAQDash "+\?\<emdash()" conceal cchar=