diff options
114 files changed, 3995 insertions, 2291 deletions
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-12-11 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * Makefile.in (info): Undo 2004-12-05 change. | ||
| 4 | |||
| 1 | 2004-12-08 Luc Teirlinck <teirllm@auburn.edu> | 5 | 2004-12-08 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 6 | ||
| 3 | * info/dir (File): Add URL and Org Mode manuals. | 7 | * info/dir (File): Add URL and Org Mode manuals. |
diff --git a/Makefile.in b/Makefile.in index 3fb0f78421c..9753017d72d 100644 --- a/Makefile.in +++ b/Makefile.in | |||
| @@ -719,9 +719,9 @@ force-info: | |||
| 719 | # put the info files in $(srcdir), | 719 | # put the info files in $(srcdir), |
| 720 | # so we can do ok running make in the build dir. | 720 | # so we can do ok running make in the build dir. |
| 721 | info: force-info | 721 | info: force-info |
| 722 | -(cd man; $(MAKE) $(MFLAGS) info) | 722 | (cd man; $(MAKE) $(MFLAGS) info) |
| 723 | -(cd lispref; $(MAKE) $(MFLAGS) info) | 723 | (cd lispref; $(MAKE) $(MFLAGS) info) |
| 724 | -(cd lispintro; $(MAKE) $(MFLAGS) info) | 724 | (cd lispintro; $(MAKE) $(MFLAGS) info) |
| 725 | dvi: | 725 | dvi: |
| 726 | (cd man; $(MAKE) $(MFLAGS) dvi) | 726 | (cd man; $(MAKE) $(MFLAGS) dvi) |
| 727 | (cd lispref; $(MAKE) $(MFLAGS) elisp.dvi) | 727 | (cd lispref; $(MAKE) $(MFLAGS) elisp.dvi) |
diff --git a/admin/FOR-RELEASE b/admin/FOR-RELEASE index ca0e16bdec9..e00c40b0871 100644 --- a/admin/FOR-RELEASE +++ b/admin/FOR-RELEASE | |||
| @@ -57,7 +57,7 @@ Trying 192.87.102.36... | |||
| 57 | Connected to ftp.nluug.nl. | 57 | Connected to ftp.nluug.nl. |
| 58 | 58 | ||
| 59 | Ange-ftp chokes on the `No route to host' message and doesn't look any | 59 | Ange-ftp chokes on the `No route to host' message and doesn't look any |
| 60 | further. | 60 | further. |
| 61 | 61 | ||
| 62 | I think in the near future we will see more of this problem, so it might be | 62 | I think in the near future we will see more of this problem, so it might be |
| 63 | time to make anfe-ftp more intelligent. | 63 | time to make anfe-ftp more intelligent. |
| @@ -112,6 +112,28 @@ we come to mark the http buffers as dead. | |||
| 112 | 112 | ||
| 113 | * REDISPLAY RELATED BUGS | 113 | * REDISPLAY RELATED BUGS |
| 114 | 114 | ||
| 115 | ** Strange text scrolling with Emacs + GTK | ||
| 116 | |||
| 117 | > I could reproduce the problem with the latest CVS. | ||
| 118 | > | ||
| 119 | > % emacs -Q | ||
| 120 | > M-x info RET | ||
| 121 | > M-> | ||
| 122 | > C-l | ||
| 123 | > C-x ( C-u - 1 C-v C-x ) | ||
| 124 | > C-x e e e e ... | ||
| 125 | > | ||
| 126 | > I see the problem around "CC mode" and "Forms". | ||
| 127 | |||
| 128 | It is not specific for the first line of a buffer. | ||
| 129 | |||
| 130 | Rather it happens for lines which are indented but the | ||
| 131 | indentation is controlled by a display property and | ||
| 132 | the newline is part of that display property -- in | ||
| 133 | that case, the indentation is not recognized for the | ||
| 134 | first display line. | ||
| 135 | |||
| 136 | |||
| 115 | ** Avoid unbreakable loops in redisplay. | 137 | ** Avoid unbreakable loops in redisplay. |
| 116 | 138 | ||
| 117 | Redisplay may loop if there is an error in some display property, e.g. | 139 | Redisplay may loop if there is an error in some display property, e.g. |
| @@ -984,7 +984,7 @@ esac | |||
| 984 | else | 984 | else |
| 985 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 | 985 | echo "$as_me: WARNING: no configuration information is in $ac_dir" >&2 |
| 986 | fi | 986 | fi |
| 987 | cd $ac_popdir | 987 | cd "$ac_popdir" |
| 988 | done | 988 | done |
| 989 | fi | 989 | fi |
| 990 | 990 | ||
| @@ -3250,8 +3250,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3250 | cat conftest.err >&5 | 3250 | cat conftest.err >&5 |
| 3251 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3251 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3252 | (exit $ac_status); } && | 3252 | (exit $ac_status); } && |
| 3253 | { ac_try='test -z "$ac_c_werror_flag" | 3253 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 3254 | || test ! -s conftest.err' | ||
| 3255 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3254 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3256 | (eval $ac_try) 2>&5 | 3255 | (eval $ac_try) 2>&5 |
| 3257 | ac_status=$? | 3256 | ac_status=$? |
| @@ -3309,8 +3308,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3309 | cat conftest.err >&5 | 3308 | cat conftest.err >&5 |
| 3310 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3309 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3311 | (exit $ac_status); } && | 3310 | (exit $ac_status); } && |
| 3312 | { ac_try='test -z "$ac_c_werror_flag" | 3311 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 3313 | || test ! -s conftest.err' | ||
| 3314 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3312 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3315 | (eval $ac_try) 2>&5 | 3313 | (eval $ac_try) 2>&5 |
| 3316 | ac_status=$? | 3314 | ac_status=$? |
| @@ -3426,8 +3424,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3426 | cat conftest.err >&5 | 3424 | cat conftest.err >&5 |
| 3427 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3428 | (exit $ac_status); } && | 3426 | (exit $ac_status); } && |
| 3429 | { ac_try='test -z "$ac_c_werror_flag" | 3427 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 3430 | || test ! -s conftest.err' | ||
| 3431 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3428 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3432 | (eval $ac_try) 2>&5 | 3429 | (eval $ac_try) 2>&5 |
| 3433 | ac_status=$? | 3430 | ac_status=$? |
| @@ -3481,8 +3478,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3481 | cat conftest.err >&5 | 3478 | cat conftest.err >&5 |
| 3482 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3479 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3483 | (exit $ac_status); } && | 3480 | (exit $ac_status); } && |
| 3484 | { ac_try='test -z "$ac_c_werror_flag" | 3481 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 3485 | || test ! -s conftest.err' | ||
| 3486 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3487 | (eval $ac_try) 2>&5 | 3483 | (eval $ac_try) 2>&5 |
| 3488 | ac_status=$? | 3484 | ac_status=$? |
| @@ -3527,8 +3523,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3527 | cat conftest.err >&5 | 3523 | cat conftest.err >&5 |
| 3528 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3524 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3529 | (exit $ac_status); } && | 3525 | (exit $ac_status); } && |
| 3530 | { ac_try='test -z "$ac_c_werror_flag" | 3526 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 3531 | || test ! -s conftest.err' | ||
| 3532 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3533 | (eval $ac_try) 2>&5 | 3528 | (eval $ac_try) 2>&5 |
| 3534 | ac_status=$? | 3529 | ac_status=$? |
| @@ -3572,8 +3567,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 3572 | cat conftest.err >&5 | 3567 | cat conftest.err >&5 |
| 3573 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 3568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 3574 | (exit $ac_status); } && | 3569 | (exit $ac_status); } && |
| 3575 | { ac_try='test -z "$ac_c_werror_flag" | 3570 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 3576 | || test ! -s conftest.err' | ||
| 3577 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 3571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 3578 | (eval $ac_try) 2>&5 | 3572 | (eval $ac_try) 2>&5 |
| 3579 | ac_status=$? | 3573 | ac_status=$? |
| @@ -4206,8 +4200,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 4206 | cat conftest.err >&5 | 4200 | cat conftest.err >&5 |
| 4207 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4201 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4208 | (exit $ac_status); } && | 4202 | (exit $ac_status); } && |
| 4209 | { ac_try='test -z "$ac_c_werror_flag" | 4203 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4210 | || test ! -s conftest.err' | ||
| 4211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4204 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4212 | (eval $ac_try) 2>&5 | 4205 | (eval $ac_try) 2>&5 |
| 4213 | ac_status=$? | 4206 | ac_status=$? |
| @@ -4483,8 +4476,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4483 | cat conftest.err >&5 | 4476 | cat conftest.err >&5 |
| 4484 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4477 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4485 | (exit $ac_status); } && | 4478 | (exit $ac_status); } && |
| 4486 | { ac_try='test -z "$ac_c_werror_flag" | 4479 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4487 | || test ! -s conftest.err' | ||
| 4488 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4480 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4489 | (eval $ac_try) 2>&5 | 4481 | (eval $ac_try) 2>&5 |
| 4490 | ac_status=$? | 4482 | ac_status=$? |
| @@ -4513,8 +4505,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4513 | cat conftest.err >&5 | 4505 | cat conftest.err >&5 |
| 4514 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4506 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4515 | (exit $ac_status); } && | 4507 | (exit $ac_status); } && |
| 4516 | { ac_try='test -z "$ac_c_werror_flag" | 4508 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4517 | || test ! -s conftest.err' | ||
| 4518 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4509 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4519 | (eval $ac_try) 2>&5 | 4510 | (eval $ac_try) 2>&5 |
| 4520 | ac_status=$? | 4511 | ac_status=$? |
| @@ -4584,8 +4575,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4584 | cat conftest.err >&5 | 4575 | cat conftest.err >&5 |
| 4585 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4576 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4586 | (exit $ac_status); } && | 4577 | (exit $ac_status); } && |
| 4587 | { ac_try='test -z "$ac_c_werror_flag" | 4578 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4588 | || test ! -s conftest.err' | ||
| 4589 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4579 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4590 | (eval $ac_try) 2>&5 | 4580 | (eval $ac_try) 2>&5 |
| 4591 | ac_status=$? | 4581 | ac_status=$? |
| @@ -4637,8 +4627,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4637 | cat conftest.err >&5 | 4627 | cat conftest.err >&5 |
| 4638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4639 | (exit $ac_status); } && | 4629 | (exit $ac_status); } && |
| 4640 | { ac_try='test -z "$ac_c_werror_flag" | 4630 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4641 | || test ! -s conftest.err' | ||
| 4642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4631 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4643 | (eval $ac_try) 2>&5 | 4632 | (eval $ac_try) 2>&5 |
| 4644 | ac_status=$? | 4633 | ac_status=$? |
| @@ -4709,8 +4698,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4709 | cat conftest.err >&5 | 4698 | cat conftest.err >&5 |
| 4710 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4699 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4711 | (exit $ac_status); } && | 4700 | (exit $ac_status); } && |
| 4712 | { ac_try='test -z "$ac_c_werror_flag" | 4701 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4713 | || test ! -s conftest.err' | ||
| 4714 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4702 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4715 | (eval $ac_try) 2>&5 | 4703 | (eval $ac_try) 2>&5 |
| 4716 | ac_status=$? | 4704 | ac_status=$? |
| @@ -4762,8 +4750,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4762 | cat conftest.err >&5 | 4750 | cat conftest.err >&5 |
| 4763 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4751 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4764 | (exit $ac_status); } && | 4752 | (exit $ac_status); } && |
| 4765 | { ac_try='test -z "$ac_c_werror_flag" | 4753 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4766 | || test ! -s conftest.err' | ||
| 4767 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4754 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4768 | (eval $ac_try) 2>&5 | 4755 | (eval $ac_try) 2>&5 |
| 4769 | ac_status=$? | 4756 | ac_status=$? |
| @@ -4833,8 +4820,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 4833 | cat conftest.err >&5 | 4820 | cat conftest.err >&5 |
| 4834 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4821 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 4835 | (exit $ac_status); } && | 4822 | (exit $ac_status); } && |
| 4836 | { ac_try='test -z "$ac_c_werror_flag" | 4823 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 4837 | || test ! -s conftest.err' | ||
| 4838 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4824 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 4839 | (eval $ac_try) 2>&5 | 4825 | (eval $ac_try) 2>&5 |
| 4840 | ac_status=$? | 4826 | ac_status=$? |
| @@ -5004,8 +4990,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5004 | cat conftest.err >&5 | 4990 | cat conftest.err >&5 |
| 5005 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 4991 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5006 | (exit $ac_status); } && | 4992 | (exit $ac_status); } && |
| 5007 | { ac_try='test -z "$ac_c_werror_flag" | 4993 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5008 | || test ! -s conftest.err' | ||
| 5009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 4994 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5010 | (eval $ac_try) 2>&5 | 4995 | (eval $ac_try) 2>&5 |
| 5011 | ac_status=$? | 4996 | ac_status=$? |
| @@ -5074,8 +5059,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5074 | cat conftest.err >&5 | 5059 | cat conftest.err >&5 |
| 5075 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5060 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5076 | (exit $ac_status); } && | 5061 | (exit $ac_status); } && |
| 5077 | { ac_try='test -z "$ac_c_werror_flag" | 5062 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5078 | || test ! -s conftest.err' | ||
| 5079 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5063 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5080 | (eval $ac_try) 2>&5 | 5064 | (eval $ac_try) 2>&5 |
| 5081 | ac_status=$? | 5065 | ac_status=$? |
| @@ -5229,8 +5213,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 5229 | cat conftest.err >&5 | 5213 | cat conftest.err >&5 |
| 5230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5214 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5231 | (exit $ac_status); } && | 5215 | (exit $ac_status); } && |
| 5232 | { ac_try='test -z "$ac_c_werror_flag" | 5216 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5233 | || test ! -s conftest.err' | ||
| 5234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5217 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5235 | (eval $ac_try) 2>&5 | 5218 | (eval $ac_try) 2>&5 |
| 5236 | ac_status=$? | 5219 | ac_status=$? |
| @@ -5323,8 +5306,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5323 | cat conftest.err >&5 | 5306 | cat conftest.err >&5 |
| 5324 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5325 | (exit $ac_status); } && | 5308 | (exit $ac_status); } && |
| 5326 | { ac_try='test -z "$ac_c_werror_flag" | 5309 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5327 | || test ! -s conftest.err' | ||
| 5328 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5310 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5329 | (eval $ac_try) 2>&5 | 5311 | (eval $ac_try) 2>&5 |
| 5330 | ac_status=$? | 5312 | ac_status=$? |
| @@ -5466,8 +5448,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5466 | cat conftest.err >&5 | 5448 | cat conftest.err >&5 |
| 5467 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5468 | (exit $ac_status); } && | 5450 | (exit $ac_status); } && |
| 5469 | { ac_try='test -z "$ac_c_werror_flag" | 5451 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5470 | || test ! -s conftest.err' | ||
| 5471 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5452 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5472 | (eval $ac_try) 2>&5 | 5453 | (eval $ac_try) 2>&5 |
| 5473 | ac_status=$? | 5454 | ac_status=$? |
| @@ -5586,8 +5567,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5586 | cat conftest.err >&5 | 5567 | cat conftest.err >&5 |
| 5587 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5568 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5588 | (exit $ac_status); } && | 5569 | (exit $ac_status); } && |
| 5589 | { ac_try='test -z "$ac_c_werror_flag" | 5570 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5590 | || test ! -s conftest.err' | ||
| 5591 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5571 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5592 | (eval $ac_try) 2>&5 | 5572 | (eval $ac_try) 2>&5 |
| 5593 | ac_status=$? | 5573 | ac_status=$? |
| @@ -5752,8 +5732,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5752 | cat conftest.err >&5 | 5732 | cat conftest.err >&5 |
| 5753 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5733 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5754 | (exit $ac_status); } && | 5734 | (exit $ac_status); } && |
| 5755 | { ac_try='test -z "$ac_c_werror_flag" | 5735 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5756 | || test ! -s conftest.err' | ||
| 5757 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5736 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5758 | (eval $ac_try) 2>&5 | 5737 | (eval $ac_try) 2>&5 |
| 5759 | ac_status=$? | 5738 | ac_status=$? |
| @@ -5816,8 +5795,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5816 | cat conftest.err >&5 | 5795 | cat conftest.err >&5 |
| 5817 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5796 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5818 | (exit $ac_status); } && | 5797 | (exit $ac_status); } && |
| 5819 | { ac_try='test -z "$ac_c_werror_flag" | 5798 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5820 | || test ! -s conftest.err' | ||
| 5821 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5799 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5822 | (eval $ac_try) 2>&5 | 5800 | (eval $ac_try) 2>&5 |
| 5823 | ac_status=$? | 5801 | ac_status=$? |
| @@ -5890,8 +5868,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5890 | cat conftest.err >&5 | 5868 | cat conftest.err >&5 |
| 5891 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5869 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5892 | (exit $ac_status); } && | 5870 | (exit $ac_status); } && |
| 5893 | { ac_try='test -z "$ac_c_werror_flag" | 5871 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5894 | || test ! -s conftest.err' | ||
| 5895 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5872 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5896 | (eval $ac_try) 2>&5 | 5873 | (eval $ac_try) 2>&5 |
| 5897 | ac_status=$? | 5874 | ac_status=$? |
| @@ -5977,8 +5954,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 5977 | cat conftest.err >&5 | 5954 | cat conftest.err >&5 |
| 5978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 5955 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 5979 | (exit $ac_status); } && | 5956 | (exit $ac_status); } && |
| 5980 | { ac_try='test -z "$ac_c_werror_flag" | 5957 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 5981 | || test ! -s conftest.err' | ||
| 5982 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 5958 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 5983 | (eval $ac_try) 2>&5 | 5959 | (eval $ac_try) 2>&5 |
| 5984 | ac_status=$? | 5960 | ac_status=$? |
| @@ -6051,8 +6027,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6051 | cat conftest.err >&5 | 6027 | cat conftest.err >&5 |
| 6052 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6053 | (exit $ac_status); } && | 6029 | (exit $ac_status); } && |
| 6054 | { ac_try='test -z "$ac_c_werror_flag" | 6030 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6055 | || test ! -s conftest.err' | ||
| 6056 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6031 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6057 | (eval $ac_try) 2>&5 | 6032 | (eval $ac_try) 2>&5 |
| 6058 | ac_status=$? | 6033 | ac_status=$? |
| @@ -6122,8 +6097,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6122 | cat conftest.err >&5 | 6097 | cat conftest.err >&5 |
| 6123 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6124 | (exit $ac_status); } && | 6099 | (exit $ac_status); } && |
| 6125 | { ac_try='test -z "$ac_c_werror_flag" | 6100 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6126 | || test ! -s conftest.err' | ||
| 6127 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6101 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6128 | (eval $ac_try) 2>&5 | 6102 | (eval $ac_try) 2>&5 |
| 6129 | ac_status=$? | 6103 | ac_status=$? |
| @@ -6182,8 +6156,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6182 | cat conftest.err >&5 | 6156 | cat conftest.err >&5 |
| 6183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6157 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6184 | (exit $ac_status); } && | 6158 | (exit $ac_status); } && |
| 6185 | { ac_try='test -z "$ac_c_werror_flag" | 6159 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6186 | || test ! -s conftest.err' | ||
| 6187 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6160 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6188 | (eval $ac_try) 2>&5 | 6161 | (eval $ac_try) 2>&5 |
| 6189 | ac_status=$? | 6162 | ac_status=$? |
| @@ -6252,8 +6225,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6252 | cat conftest.err >&5 | 6225 | cat conftest.err >&5 |
| 6253 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6226 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6254 | (exit $ac_status); } && | 6227 | (exit $ac_status); } && |
| 6255 | { ac_try='test -z "$ac_c_werror_flag" | 6228 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6256 | || test ! -s conftest.err' | ||
| 6257 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6229 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6258 | (eval $ac_try) 2>&5 | 6230 | (eval $ac_try) 2>&5 |
| 6259 | ac_status=$? | 6231 | ac_status=$? |
| @@ -6314,8 +6286,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6314 | cat conftest.err >&5 | 6286 | cat conftest.err >&5 |
| 6315 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6287 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6316 | (exit $ac_status); } && | 6288 | (exit $ac_status); } && |
| 6317 | { ac_try='test -z "$ac_c_werror_flag" | 6289 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6318 | || test ! -s conftest.err' | ||
| 6319 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6290 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6320 | (eval $ac_try) 2>&5 | 6291 | (eval $ac_try) 2>&5 |
| 6321 | ac_status=$? | 6292 | ac_status=$? |
| @@ -6381,8 +6352,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6381 | cat conftest.err >&5 | 6352 | cat conftest.err >&5 |
| 6382 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6353 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6383 | (exit $ac_status); } && | 6354 | (exit $ac_status); } && |
| 6384 | { ac_try='test -z "$ac_c_werror_flag" | 6355 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6385 | || test ! -s conftest.err' | ||
| 6386 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6356 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6387 | (eval $ac_try) 2>&5 | 6357 | (eval $ac_try) 2>&5 |
| 6388 | ac_status=$? | 6358 | ac_status=$? |
| @@ -6528,8 +6498,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6528 | cat conftest.err >&5 | 6498 | cat conftest.err >&5 |
| 6529 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6530 | (exit $ac_status); } && | 6500 | (exit $ac_status); } && |
| 6531 | { ac_try='test -z "$ac_c_werror_flag" | 6501 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6532 | || test ! -s conftest.err' | ||
| 6533 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6502 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6534 | (eval $ac_try) 2>&5 | 6503 | (eval $ac_try) 2>&5 |
| 6535 | ac_status=$? | 6504 | ac_status=$? |
| @@ -6593,8 +6562,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6593 | cat conftest.err >&5 | 6562 | cat conftest.err >&5 |
| 6594 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6563 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6595 | (exit $ac_status); } && | 6564 | (exit $ac_status); } && |
| 6596 | { ac_try='test -z "$ac_c_werror_flag" | 6565 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6597 | || test ! -s conftest.err' | ||
| 6598 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6566 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6599 | (eval $ac_try) 2>&5 | 6567 | (eval $ac_try) 2>&5 |
| 6600 | ac_status=$? | 6568 | ac_status=$? |
| @@ -6659,8 +6627,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6659 | cat conftest.err >&5 | 6627 | cat conftest.err >&5 |
| 6660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6628 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6661 | (exit $ac_status); } && | 6629 | (exit $ac_status); } && |
| 6662 | { ac_try='test -z "$ac_c_werror_flag" | 6630 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6663 | || test ! -s conftest.err' | ||
| 6664 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6631 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6665 | (eval $ac_try) 2>&5 | 6632 | (eval $ac_try) 2>&5 |
| 6666 | ac_status=$? | 6633 | ac_status=$? |
| @@ -6706,8 +6673,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6706 | cat conftest.err >&5 | 6673 | cat conftest.err >&5 |
| 6707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6674 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6708 | (exit $ac_status); } && | 6675 | (exit $ac_status); } && |
| 6709 | { ac_try='test -z "$ac_c_werror_flag" | 6676 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6710 | || test ! -s conftest.err' | ||
| 6711 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6677 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6712 | (eval $ac_try) 2>&5 | 6678 | (eval $ac_try) 2>&5 |
| 6713 | ac_status=$? | 6679 | ac_status=$? |
| @@ -6781,8 +6747,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 6781 | cat conftest.err >&5 | 6747 | cat conftest.err >&5 |
| 6782 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6783 | (exit $ac_status); } && | 6749 | (exit $ac_status); } && |
| 6784 | { ac_try='test -z "$ac_c_werror_flag" | 6750 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6785 | || test ! -s conftest.err' | ||
| 6786 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6751 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6787 | (eval $ac_try) 2>&5 | 6752 | (eval $ac_try) 2>&5 |
| 6788 | ac_status=$? | 6753 | ac_status=$? |
| @@ -6847,8 +6812,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6847 | cat conftest.err >&5 | 6812 | cat conftest.err >&5 |
| 6848 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6813 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6849 | (exit $ac_status); } && | 6814 | (exit $ac_status); } && |
| 6850 | { ac_try='test -z "$ac_c_werror_flag" | 6815 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6851 | || test ! -s conftest.err' | ||
| 6852 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6816 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6853 | (eval $ac_try) 2>&5 | 6817 | (eval $ac_try) 2>&5 |
| 6854 | ac_status=$? | 6818 | ac_status=$? |
| @@ -6892,8 +6856,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6892 | cat conftest.err >&5 | 6856 | cat conftest.err >&5 |
| 6893 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6857 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6894 | (exit $ac_status); } && | 6858 | (exit $ac_status); } && |
| 6895 | { ac_try='test -z "$ac_c_werror_flag" | 6859 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6896 | || test ! -s conftest.err' | ||
| 6897 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6860 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6898 | (eval $ac_try) 2>&5 | 6861 | (eval $ac_try) 2>&5 |
| 6899 | ac_status=$? | 6862 | ac_status=$? |
| @@ -6964,8 +6927,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 6964 | cat conftest.err >&5 | 6927 | cat conftest.err >&5 |
| 6965 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6928 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 6966 | (exit $ac_status); } && | 6929 | (exit $ac_status); } && |
| 6967 | { ac_try='test -z "$ac_c_werror_flag" | 6930 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 6968 | || test ! -s conftest.err' | ||
| 6969 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6931 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 6970 | (eval $ac_try) 2>&5 | 6932 | (eval $ac_try) 2>&5 |
| 6971 | ac_status=$? | 6933 | ac_status=$? |
| @@ -7015,8 +6977,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7015 | cat conftest.err >&5 | 6977 | cat conftest.err >&5 |
| 7016 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 6978 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7017 | (exit $ac_status); } && | 6979 | (exit $ac_status); } && |
| 7018 | { ac_try='test -z "$ac_c_werror_flag" | 6980 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7019 | || test ! -s conftest.err' | ||
| 7020 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 6981 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7021 | (eval $ac_try) 2>&5 | 6982 | (eval $ac_try) 2>&5 |
| 7022 | ac_status=$? | 6983 | ac_status=$? |
| @@ -7087,8 +7048,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7087 | cat conftest.err >&5 | 7048 | cat conftest.err >&5 |
| 7088 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7049 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7089 | (exit $ac_status); } && | 7050 | (exit $ac_status); } && |
| 7090 | { ac_try='test -z "$ac_c_werror_flag" | 7051 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7091 | || test ! -s conftest.err' | ||
| 7092 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7052 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7093 | (eval $ac_try) 2>&5 | 7053 | (eval $ac_try) 2>&5 |
| 7094 | ac_status=$? | 7054 | ac_status=$? |
| @@ -7138,8 +7098,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7138 | cat conftest.err >&5 | 7098 | cat conftest.err >&5 |
| 7139 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7099 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7140 | (exit $ac_status); } && | 7100 | (exit $ac_status); } && |
| 7141 | { ac_try='test -z "$ac_c_werror_flag" | 7101 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7142 | || test ! -s conftest.err' | ||
| 7143 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7102 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7144 | (eval $ac_try) 2>&5 | 7103 | (eval $ac_try) 2>&5 |
| 7145 | ac_status=$? | 7104 | ac_status=$? |
| @@ -7210,8 +7169,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7210 | cat conftest.err >&5 | 7169 | cat conftest.err >&5 |
| 7211 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7170 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7212 | (exit $ac_status); } && | 7171 | (exit $ac_status); } && |
| 7213 | { ac_try='test -z "$ac_c_werror_flag" | 7172 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7214 | || test ! -s conftest.err' | ||
| 7215 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7173 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7216 | (eval $ac_try) 2>&5 | 7174 | (eval $ac_try) 2>&5 |
| 7217 | ac_status=$? | 7175 | ac_status=$? |
| @@ -7261,8 +7219,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7261 | cat conftest.err >&5 | 7219 | cat conftest.err >&5 |
| 7262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7220 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7263 | (exit $ac_status); } && | 7221 | (exit $ac_status); } && |
| 7264 | { ac_try='test -z "$ac_c_werror_flag" | 7222 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7265 | || test ! -s conftest.err' | ||
| 7266 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7223 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7267 | (eval $ac_try) 2>&5 | 7224 | (eval $ac_try) 2>&5 |
| 7268 | ac_status=$? | 7225 | ac_status=$? |
| @@ -7333,8 +7290,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7333 | cat conftest.err >&5 | 7290 | cat conftest.err >&5 |
| 7334 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7291 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7335 | (exit $ac_status); } && | 7292 | (exit $ac_status); } && |
| 7336 | { ac_try='test -z "$ac_c_werror_flag" | 7293 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7337 | || test ! -s conftest.err' | ||
| 7338 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7294 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7339 | (eval $ac_try) 2>&5 | 7295 | (eval $ac_try) 2>&5 |
| 7340 | ac_status=$? | 7296 | ac_status=$? |
| @@ -7384,8 +7340,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7384 | cat conftest.err >&5 | 7340 | cat conftest.err >&5 |
| 7385 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7341 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7386 | (exit $ac_status); } && | 7342 | (exit $ac_status); } && |
| 7387 | { ac_try='test -z "$ac_c_werror_flag" | 7343 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7388 | || test ! -s conftest.err' | ||
| 7389 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7344 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7390 | (eval $ac_try) 2>&5 | 7345 | (eval $ac_try) 2>&5 |
| 7391 | ac_status=$? | 7346 | ac_status=$? |
| @@ -7456,8 +7411,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7456 | cat conftest.err >&5 | 7411 | cat conftest.err >&5 |
| 7457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7412 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7458 | (exit $ac_status); } && | 7413 | (exit $ac_status); } && |
| 7459 | { ac_try='test -z "$ac_c_werror_flag" | 7414 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7460 | || test ! -s conftest.err' | ||
| 7461 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7415 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7462 | (eval $ac_try) 2>&5 | 7416 | (eval $ac_try) 2>&5 |
| 7463 | ac_status=$? | 7417 | ac_status=$? |
| @@ -7507,8 +7461,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7507 | cat conftest.err >&5 | 7461 | cat conftest.err >&5 |
| 7508 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7462 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7509 | (exit $ac_status); } && | 7463 | (exit $ac_status); } && |
| 7510 | { ac_try='test -z "$ac_c_werror_flag" | 7464 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7511 | || test ! -s conftest.err' | ||
| 7512 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7465 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7513 | (eval $ac_try) 2>&5 | 7466 | (eval $ac_try) 2>&5 |
| 7514 | ac_status=$? | 7467 | ac_status=$? |
| @@ -7595,8 +7548,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7595 | cat conftest.err >&5 | 7548 | cat conftest.err >&5 |
| 7596 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7549 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7597 | (exit $ac_status); } && | 7550 | (exit $ac_status); } && |
| 7598 | { ac_try='test -z "$ac_c_werror_flag" | 7551 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7599 | || test ! -s conftest.err' | ||
| 7600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7552 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7601 | (eval $ac_try) 2>&5 | 7553 | (eval $ac_try) 2>&5 |
| 7602 | ac_status=$? | 7554 | ac_status=$? |
| @@ -7702,8 +7654,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7702 | cat conftest.err >&5 | 7654 | cat conftest.err >&5 |
| 7703 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7655 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7704 | (exit $ac_status); } && | 7656 | (exit $ac_status); } && |
| 7705 | { ac_try='test -z "$ac_c_werror_flag" | 7657 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7706 | || test ! -s conftest.err' | ||
| 7707 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7658 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7708 | (eval $ac_try) 2>&5 | 7659 | (eval $ac_try) 2>&5 |
| 7709 | ac_status=$? | 7660 | ac_status=$? |
| @@ -7763,8 +7714,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 7763 | cat conftest.err >&5 | 7714 | cat conftest.err >&5 |
| 7764 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 7715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 7765 | (exit $ac_status); } && | 7716 | (exit $ac_status); } && |
| 7766 | { ac_try='test -z "$ac_c_werror_flag" | 7717 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 7767 | || test ! -s conftest.err' | ||
| 7768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 7718 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 7769 | (eval $ac_try) 2>&5 | 7719 | (eval $ac_try) 2>&5 |
| 7770 | ac_status=$? | 7720 | ac_status=$? |
| @@ -7888,6 +7838,7 @@ fi | |||
| 7888 | echo "$as_me:$LINENO: checking for X" >&5 | 7838 | echo "$as_me:$LINENO: checking for X" >&5 |
| 7889 | echo $ECHO_N "checking for X... $ECHO_C" >&6 | 7839 | echo $ECHO_N "checking for X... $ECHO_C" >&6 |
| 7890 | 7840 | ||
| 7841 | ac_path_x_has_been_run=yes | ||
| 7891 | 7842 | ||
| 7892 | # Check whether --with-x or --without-x was given. | 7843 | # Check whether --with-x or --without-x was given. |
| 7893 | if test "${with_x+set}" = set; then | 7844 | if test "${with_x+set}" = set; then |
| @@ -7980,7 +7931,7 @@ ac_x_header_dirs=' | |||
| 7980 | /usr/openwin/share/include' | 7931 | /usr/openwin/share/include' |
| 7981 | 7932 | ||
| 7982 | if test "$ac_x_includes" = no; then | 7933 | if test "$ac_x_includes" = no; then |
| 7983 | # Guess where to find include files, by looking for Intrinsic.h. | 7934 | # Guess where to find include files, by looking for a specified header file. |
| 7984 | # First, try using that file with no special directory specified. | 7935 | # First, try using that file with no special directory specified. |
| 7985 | cat >conftest.$ac_ext <<_ACEOF | 7936 | cat >conftest.$ac_ext <<_ACEOF |
| 7986 | /* confdefs.h. */ | 7937 | /* confdefs.h. */ |
| @@ -8054,8 +8005,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8054 | cat conftest.err >&5 | 8005 | cat conftest.err >&5 |
| 8055 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8006 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8056 | (exit $ac_status); } && | 8007 | (exit $ac_status); } && |
| 8057 | { ac_try='test -z "$ac_c_werror_flag" | 8008 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8058 | || test ! -s conftest.err' | ||
| 8059 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8060 | (eval $ac_try) 2>&5 | 8010 | (eval $ac_try) 2>&5 |
| 8061 | ac_status=$? | 8011 | ac_status=$? |
| @@ -8115,8 +8065,12 @@ else | |||
| 8115 | # Update the cache value to reflect the command line values. | 8065 | # Update the cache value to reflect the command line values. |
| 8116 | ac_cv_have_x="have_x=yes \ | 8066 | ac_cv_have_x="have_x=yes \ |
| 8117 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" | 8067 | ac_x_includes=$x_includes ac_x_libraries=$x_libraries" |
| 8118 | echo "$as_me:$LINENO: result: libraries $x_libraries, headers $x_includes" >&5 | 8068 | # It might be that x_includes is empty (headers are found in the |
| 8119 | echo "${ECHO_T}libraries $x_libraries, headers $x_includes" >&6 | 8069 | # standard search path. Then output the corresponding message |
| 8070 | ac_out_x_includes=$x_includes | ||
| 8071 | test "x$x_includes" = x && ac_out_x_includes="in standard search path" | ||
| 8072 | echo "$as_me:$LINENO: result: libraries $x_libraries, headers $ac_out_x_includes" >&5 | ||
| 8073 | echo "${ECHO_T}libraries $x_libraries, headers $ac_out_x_includes" >&6 | ||
| 8120 | fi | 8074 | fi |
| 8121 | 8075 | ||
| 8122 | if test "$no_x" = yes; then | 8076 | if test "$no_x" = yes; then |
| @@ -8280,8 +8234,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8280 | cat conftest.err >&5 | 8234 | cat conftest.err >&5 |
| 8281 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8235 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8282 | (exit $ac_status); } && | 8236 | (exit $ac_status); } && |
| 8283 | { ac_try='test -z "$ac_c_werror_flag" | 8237 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8284 | || test ! -s conftest.err' | ||
| 8285 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8238 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8286 | (eval $ac_try) 2>&5 | 8239 | (eval $ac_try) 2>&5 |
| 8287 | ac_status=$? | 8240 | ac_status=$? |
| @@ -8376,8 +8329,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8376 | cat conftest.err >&5 | 8329 | cat conftest.err >&5 |
| 8377 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8330 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8378 | (exit $ac_status); } && | 8331 | (exit $ac_status); } && |
| 8379 | { ac_try='test -z "$ac_c_werror_flag" | 8332 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8380 | || test ! -s conftest.err' | ||
| 8381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8382 | (eval $ac_try) 2>&5 | 8334 | (eval $ac_try) 2>&5 |
| 8383 | ac_status=$? | 8335 | ac_status=$? |
| @@ -8436,8 +8388,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8436 | cat conftest.err >&5 | 8388 | cat conftest.err >&5 |
| 8437 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8389 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8438 | (exit $ac_status); } && | 8390 | (exit $ac_status); } && |
| 8439 | { ac_try='test -z "$ac_c_werror_flag" | 8391 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8440 | || test ! -s conftest.err' | ||
| 8441 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8392 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8442 | (eval $ac_try) 2>&5 | 8393 | (eval $ac_try) 2>&5 |
| 8443 | ac_status=$? | 8394 | ac_status=$? |
| @@ -8521,8 +8472,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 8521 | cat conftest.err >&5 | 8472 | cat conftest.err >&5 |
| 8522 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8473 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8523 | (exit $ac_status); } && | 8474 | (exit $ac_status); } && |
| 8524 | { ac_try='test -z "$ac_c_werror_flag" | 8475 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8525 | || test ! -s conftest.err' | ||
| 8526 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8476 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8527 | (eval $ac_try) 2>&5 | 8477 | (eval $ac_try) 2>&5 |
| 8528 | ac_status=$? | 8478 | ac_status=$? |
| @@ -8706,8 +8656,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8706 | cat conftest.err >&5 | 8656 | cat conftest.err >&5 |
| 8707 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8657 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8708 | (exit $ac_status); } && | 8658 | (exit $ac_status); } && |
| 8709 | { ac_try='test -z "$ac_c_werror_flag" | 8659 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8710 | || test ! -s conftest.err' | ||
| 8711 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8660 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8712 | (eval $ac_try) 2>&5 | 8661 | (eval $ac_try) 2>&5 |
| 8713 | ac_status=$? | 8662 | ac_status=$? |
| @@ -8959,8 +8908,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 8959 | cat conftest.err >&5 | 8908 | cat conftest.err >&5 |
| 8960 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8909 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 8961 | (exit $ac_status); } && | 8910 | (exit $ac_status); } && |
| 8962 | { ac_try='test -z "$ac_c_werror_flag" | 8911 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 8963 | || test ! -s conftest.err' | ||
| 8964 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8912 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 8965 | (eval $ac_try) 2>&5 | 8913 | (eval $ac_try) 2>&5 |
| 8966 | ac_status=$? | 8914 | ac_status=$? |
| @@ -9027,8 +8975,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9027 | cat conftest.err >&5 | 8975 | cat conftest.err >&5 |
| 9028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 8976 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9029 | (exit $ac_status); } && | 8977 | (exit $ac_status); } && |
| 9030 | { ac_try='test -z "$ac_c_werror_flag" | 8978 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9031 | || test ! -s conftest.err' | ||
| 9032 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 8979 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9033 | (eval $ac_try) 2>&5 | 8980 | (eval $ac_try) 2>&5 |
| 9034 | ac_status=$? | 8981 | ac_status=$? |
| @@ -9097,8 +9044,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9097 | cat conftest.err >&5 | 9044 | cat conftest.err >&5 |
| 9098 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9045 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9099 | (exit $ac_status); } && | 9046 | (exit $ac_status); } && |
| 9100 | { ac_try='test -z "$ac_c_werror_flag" | 9047 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9101 | || test ! -s conftest.err' | ||
| 9102 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9103 | (eval $ac_try) 2>&5 | 9049 | (eval $ac_try) 2>&5 |
| 9104 | ac_status=$? | 9050 | ac_status=$? |
| @@ -9183,8 +9129,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9183 | cat conftest.err >&5 | 9129 | cat conftest.err >&5 |
| 9184 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9130 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9185 | (exit $ac_status); } && | 9131 | (exit $ac_status); } && |
| 9186 | { ac_try='test -z "$ac_c_werror_flag" | 9132 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9187 | || test ! -s conftest.err' | ||
| 9188 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9133 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9189 | (eval $ac_try) 2>&5 | 9134 | (eval $ac_try) 2>&5 |
| 9190 | ac_status=$? | 9135 | ac_status=$? |
| @@ -9261,8 +9206,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9261 | cat conftest.err >&5 | 9206 | cat conftest.err >&5 |
| 9262 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9207 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9263 | (exit $ac_status); } && | 9208 | (exit $ac_status); } && |
| 9264 | { ac_try='test -z "$ac_c_werror_flag" | 9209 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9265 | || test ! -s conftest.err' | ||
| 9266 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9210 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9267 | (eval $ac_try) 2>&5 | 9211 | (eval $ac_try) 2>&5 |
| 9268 | ac_status=$? | 9212 | ac_status=$? |
| @@ -9316,8 +9260,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9316 | cat conftest.err >&5 | 9260 | cat conftest.err >&5 |
| 9317 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9261 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9318 | (exit $ac_status); } && | 9262 | (exit $ac_status); } && |
| 9319 | { ac_try='test -z "$ac_c_werror_flag" | 9263 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9320 | || test ! -s conftest.err' | ||
| 9321 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9264 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9322 | (eval $ac_try) 2>&5 | 9265 | (eval $ac_try) 2>&5 |
| 9323 | ac_status=$? | 9266 | ac_status=$? |
| @@ -9386,8 +9329,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9386 | cat conftest.err >&5 | 9329 | cat conftest.err >&5 |
| 9387 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9330 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9388 | (exit $ac_status); } && | 9331 | (exit $ac_status); } && |
| 9389 | { ac_try='test -z "$ac_c_werror_flag" | 9332 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9390 | || test ! -s conftest.err' | ||
| 9391 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9333 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9392 | (eval $ac_try) 2>&5 | 9334 | (eval $ac_try) 2>&5 |
| 9393 | ac_status=$? | 9335 | ac_status=$? |
| @@ -9491,8 +9433,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9491 | cat conftest.err >&5 | 9433 | cat conftest.err >&5 |
| 9492 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9434 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9493 | (exit $ac_status); } && | 9435 | (exit $ac_status); } && |
| 9494 | { ac_try='test -z "$ac_c_werror_flag" | 9436 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9495 | || test ! -s conftest.err' | ||
| 9496 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9437 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9497 | (eval $ac_try) 2>&5 | 9438 | (eval $ac_try) 2>&5 |
| 9498 | ac_status=$? | 9439 | ac_status=$? |
| @@ -9559,8 +9500,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9559 | cat conftest.err >&5 | 9500 | cat conftest.err >&5 |
| 9560 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9501 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9561 | (exit $ac_status); } && | 9502 | (exit $ac_status); } && |
| 9562 | { ac_try='test -z "$ac_c_werror_flag" | 9503 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9563 | || test ! -s conftest.err' | ||
| 9564 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9504 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9565 | (eval $ac_try) 2>&5 | 9505 | (eval $ac_try) 2>&5 |
| 9566 | ac_status=$? | 9506 | ac_status=$? |
| @@ -9630,8 +9570,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9630 | cat conftest.err >&5 | 9570 | cat conftest.err >&5 |
| 9631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9632 | (exit $ac_status); } && | 9572 | (exit $ac_status); } && |
| 9633 | { ac_try='test -z "$ac_c_werror_flag" | 9573 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9634 | || test ! -s conftest.err' | ||
| 9635 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9574 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9636 | (eval $ac_try) 2>&5 | 9575 | (eval $ac_try) 2>&5 |
| 9637 | ac_status=$? | 9576 | ac_status=$? |
| @@ -9871,8 +9810,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 9871 | cat conftest.err >&5 | 9810 | cat conftest.err >&5 |
| 9872 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 9811 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 9873 | (exit $ac_status); } && | 9812 | (exit $ac_status); } && |
| 9874 | { ac_try='test -z "$ac_c_werror_flag" | 9813 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 9875 | || test ! -s conftest.err' | ||
| 9876 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 9814 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 9877 | (eval $ac_try) 2>&5 | 9815 | (eval $ac_try) 2>&5 |
| 9878 | ac_status=$? | 9816 | ac_status=$? |
| @@ -10394,8 +10332,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10394 | cat conftest.err >&5 | 10332 | cat conftest.err >&5 |
| 10395 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10333 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10396 | (exit $ac_status); } && | 10334 | (exit $ac_status); } && |
| 10397 | { ac_try='test -z "$ac_c_werror_flag" | 10335 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10398 | || test ! -s conftest.err' | ||
| 10399 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10336 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10400 | (eval $ac_try) 2>&5 | 10337 | (eval $ac_try) 2>&5 |
| 10401 | ac_status=$? | 10338 | ac_status=$? |
| @@ -10467,8 +10404,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10467 | cat conftest.err >&5 | 10404 | cat conftest.err >&5 |
| 10468 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10405 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10469 | (exit $ac_status); } && | 10406 | (exit $ac_status); } && |
| 10470 | { ac_try='test -z "$ac_c_werror_flag" | 10407 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10471 | || test ! -s conftest.err' | ||
| 10472 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10408 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10473 | (eval $ac_try) 2>&5 | 10409 | (eval $ac_try) 2>&5 |
| 10474 | ac_status=$? | 10410 | ac_status=$? |
| @@ -10550,8 +10486,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10550 | cat conftest.err >&5 | 10486 | cat conftest.err >&5 |
| 10551 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10487 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10552 | (exit $ac_status); } && | 10488 | (exit $ac_status); } && |
| 10553 | { ac_try='test -z "$ac_c_werror_flag" | 10489 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10554 | || test ! -s conftest.err' | ||
| 10555 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10490 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10556 | (eval $ac_try) 2>&5 | 10491 | (eval $ac_try) 2>&5 |
| 10557 | ac_status=$? | 10492 | ac_status=$? |
| @@ -10630,8 +10565,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10630 | cat conftest.err >&5 | 10565 | cat conftest.err >&5 |
| 10631 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10566 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10632 | (exit $ac_status); } && | 10567 | (exit $ac_status); } && |
| 10633 | { ac_try='test -z "$ac_c_werror_flag" | 10568 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10634 | || test ! -s conftest.err' | ||
| 10635 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10569 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10636 | (eval $ac_try) 2>&5 | 10570 | (eval $ac_try) 2>&5 |
| 10637 | ac_status=$? | 10571 | ac_status=$? |
| @@ -10705,8 +10639,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10705 | cat conftest.err >&5 | 10639 | cat conftest.err >&5 |
| 10706 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10707 | (exit $ac_status); } && | 10641 | (exit $ac_status); } && |
| 10708 | { ac_try='test -z "$ac_c_werror_flag" | 10642 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10709 | || test ! -s conftest.err' | ||
| 10710 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10643 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10711 | (eval $ac_try) 2>&5 | 10644 | (eval $ac_try) 2>&5 |
| 10712 | ac_status=$? | 10645 | ac_status=$? |
| @@ -10774,8 +10707,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 10774 | cat conftest.err >&5 | 10707 | cat conftest.err >&5 |
| 10775 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10708 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10776 | (exit $ac_status); } && | 10709 | (exit $ac_status); } && |
| 10777 | { ac_try='test -z "$ac_c_werror_flag" | 10710 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10778 | || test ! -s conftest.err' | ||
| 10779 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10711 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10780 | (eval $ac_try) 2>&5 | 10712 | (eval $ac_try) 2>&5 |
| 10781 | ac_status=$? | 10713 | ac_status=$? |
| @@ -10844,8 +10776,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10844 | cat conftest.err >&5 | 10776 | cat conftest.err >&5 |
| 10845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10777 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10846 | (exit $ac_status); } && | 10778 | (exit $ac_status); } && |
| 10847 | { ac_try='test -z "$ac_c_werror_flag" | 10779 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10848 | || test ! -s conftest.err' | ||
| 10849 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10780 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10850 | (eval $ac_try) 2>&5 | 10781 | (eval $ac_try) 2>&5 |
| 10851 | ac_status=$? | 10782 | ac_status=$? |
| @@ -10969,8 +10900,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 10969 | cat conftest.err >&5 | 10900 | cat conftest.err >&5 |
| 10970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10901 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 10971 | (exit $ac_status); } && | 10902 | (exit $ac_status); } && |
| 10972 | { ac_try='test -z "$ac_c_werror_flag" | 10903 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 10973 | || test ! -s conftest.err' | ||
| 10974 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 10904 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 10975 | (eval $ac_try) 2>&5 | 10905 | (eval $ac_try) 2>&5 |
| 10976 | ac_status=$? | 10906 | ac_status=$? |
| @@ -11066,8 +10996,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11066 | cat conftest.err >&5 | 10996 | cat conftest.err >&5 |
| 11067 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 10997 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11068 | (exit $ac_status); } && | 10998 | (exit $ac_status); } && |
| 11069 | { ac_try='test -z "$ac_c_werror_flag" | 10999 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11070 | || test ! -s conftest.err' | ||
| 11071 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11000 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11072 | (eval $ac_try) 2>&5 | 11001 | (eval $ac_try) 2>&5 |
| 11073 | ac_status=$? | 11002 | ac_status=$? |
| @@ -11147,8 +11076,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11147 | cat conftest.err >&5 | 11076 | cat conftest.err >&5 |
| 11148 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11077 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11149 | (exit $ac_status); } && | 11078 | (exit $ac_status); } && |
| 11150 | { ac_try='test -z "$ac_c_werror_flag" | 11079 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11151 | || test ! -s conftest.err' | ||
| 11152 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11080 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11153 | (eval $ac_try) 2>&5 | 11081 | (eval $ac_try) 2>&5 |
| 11154 | ac_status=$? | 11082 | ac_status=$? |
| @@ -11216,8 +11144,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11216 | cat conftest.err >&5 | 11144 | cat conftest.err >&5 |
| 11217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11218 | (exit $ac_status); } && | 11146 | (exit $ac_status); } && |
| 11219 | { ac_try='test -z "$ac_c_werror_flag" | 11147 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11220 | || test ! -s conftest.err' | ||
| 11221 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11148 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11222 | (eval $ac_try) 2>&5 | 11149 | (eval $ac_try) 2>&5 |
| 11223 | ac_status=$? | 11150 | ac_status=$? |
| @@ -11362,8 +11289,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11362 | cat conftest.err >&5 | 11289 | cat conftest.err >&5 |
| 11363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11364 | (exit $ac_status); } && | 11291 | (exit $ac_status); } && |
| 11365 | { ac_try='test -z "$ac_c_werror_flag" | 11292 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11366 | || test ! -s conftest.err' | ||
| 11367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11293 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11368 | (eval $ac_try) 2>&5 | 11294 | (eval $ac_try) 2>&5 |
| 11369 | ac_status=$? | 11295 | ac_status=$? |
| @@ -11472,8 +11398,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11472 | cat conftest.err >&5 | 11398 | cat conftest.err >&5 |
| 11473 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11474 | (exit $ac_status); } && | 11400 | (exit $ac_status); } && |
| 11475 | { ac_try='test -z "$ac_c_werror_flag" | 11401 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11476 | || test ! -s conftest.err' | ||
| 11477 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11402 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11478 | (eval $ac_try) 2>&5 | 11403 | (eval $ac_try) 2>&5 |
| 11479 | ac_status=$? | 11404 | ac_status=$? |
| @@ -11618,8 +11543,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11618 | cat conftest.err >&5 | 11543 | cat conftest.err >&5 |
| 11619 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11544 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11620 | (exit $ac_status); } && | 11545 | (exit $ac_status); } && |
| 11621 | { ac_try='test -z "$ac_c_werror_flag" | 11546 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11622 | || test ! -s conftest.err' | ||
| 11623 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11547 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11624 | (eval $ac_try) 2>&5 | 11548 | (eval $ac_try) 2>&5 |
| 11625 | ac_status=$? | 11549 | ac_status=$? |
| @@ -11726,8 +11650,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11726 | cat conftest.err >&5 | 11650 | cat conftest.err >&5 |
| 11727 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11651 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11728 | (exit $ac_status); } && | 11652 | (exit $ac_status); } && |
| 11729 | { ac_try='test -z "$ac_c_werror_flag" | 11653 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11730 | || test ! -s conftest.err' | ||
| 11731 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11654 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11732 | (eval $ac_try) 2>&5 | 11655 | (eval $ac_try) 2>&5 |
| 11733 | ac_status=$? | 11656 | ac_status=$? |
| @@ -11881,8 +11804,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 11881 | cat conftest.err >&5 | 11804 | cat conftest.err >&5 |
| 11882 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11805 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11883 | (exit $ac_status); } && | 11806 | (exit $ac_status); } && |
| 11884 | { ac_try='test -z "$ac_c_werror_flag" | 11807 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11885 | || test ! -s conftest.err' | ||
| 11886 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11808 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11887 | (eval $ac_try) 2>&5 | 11809 | (eval $ac_try) 2>&5 |
| 11888 | ac_status=$? | 11810 | ac_status=$? |
| @@ -11957,8 +11879,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 11957 | cat conftest.err >&5 | 11879 | cat conftest.err >&5 |
| 11958 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 11880 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 11959 | (exit $ac_status); } && | 11881 | (exit $ac_status); } && |
| 11960 | { ac_try='test -z "$ac_c_werror_flag" | 11882 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 11961 | || test ! -s conftest.err' | ||
| 11962 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 11883 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 11963 | (eval $ac_try) 2>&5 | 11884 | (eval $ac_try) 2>&5 |
| 11964 | ac_status=$? | 11885 | ac_status=$? |
| @@ -12106,8 +12027,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12106 | cat conftest.err >&5 | 12027 | cat conftest.err >&5 |
| 12107 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12028 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12108 | (exit $ac_status); } && | 12029 | (exit $ac_status); } && |
| 12109 | { ac_try='test -z "$ac_c_werror_flag" | 12030 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12110 | || test ! -s conftest.err' | ||
| 12111 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12031 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12112 | (eval $ac_try) 2>&5 | 12032 | (eval $ac_try) 2>&5 |
| 12113 | ac_status=$? | 12033 | ac_status=$? |
| @@ -12184,8 +12104,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 12184 | cat conftest.err >&5 | 12104 | cat conftest.err >&5 |
| 12185 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12105 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12186 | (exit $ac_status); } && | 12106 | (exit $ac_status); } && |
| 12187 | { ac_try='test -z "$ac_c_werror_flag" | 12107 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12188 | || test ! -s conftest.err' | ||
| 12189 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12108 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12190 | (eval $ac_try) 2>&5 | 12109 | (eval $ac_try) 2>&5 |
| 12191 | ac_status=$? | 12110 | ac_status=$? |
| @@ -12332,8 +12251,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12332 | cat conftest.err >&5 | 12251 | cat conftest.err >&5 |
| 12333 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12252 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12334 | (exit $ac_status); } && | 12253 | (exit $ac_status); } && |
| 12335 | { ac_try='test -z "$ac_c_werror_flag" | 12254 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12336 | || test ! -s conftest.err' | ||
| 12337 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12255 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12338 | (eval $ac_try) 2>&5 | 12256 | (eval $ac_try) 2>&5 |
| 12339 | ac_status=$? | 12257 | ac_status=$? |
| @@ -12409,8 +12327,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 12409 | cat conftest.err >&5 | 12327 | cat conftest.err >&5 |
| 12410 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12328 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12411 | (exit $ac_status); } && | 12329 | (exit $ac_status); } && |
| 12412 | { ac_try='test -z "$ac_c_werror_flag" | 12330 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12413 | || test ! -s conftest.err' | ||
| 12414 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12331 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12415 | (eval $ac_try) 2>&5 | 12332 | (eval $ac_try) 2>&5 |
| 12416 | ac_status=$? | 12333 | ac_status=$? |
| @@ -12553,8 +12470,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 12553 | cat conftest.err >&5 | 12470 | cat conftest.err >&5 |
| 12554 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12471 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12555 | (exit $ac_status); } && | 12472 | (exit $ac_status); } && |
| 12556 | { ac_try='test -z "$ac_c_werror_flag" | 12473 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12557 | || test ! -s conftest.err' | ||
| 12558 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12474 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12559 | (eval $ac_try) 2>&5 | 12475 | (eval $ac_try) 2>&5 |
| 12560 | ac_status=$? | 12476 | ac_status=$? |
| @@ -12722,8 +12638,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 12722 | cat conftest.err >&5 | 12638 | cat conftest.err >&5 |
| 12723 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12639 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12724 | (exit $ac_status); } && | 12640 | (exit $ac_status); } && |
| 12725 | { ac_try='test -z "$ac_c_werror_flag" | 12641 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12726 | || test ! -s conftest.err' | ||
| 12727 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12728 | (eval $ac_try) 2>&5 | 12643 | (eval $ac_try) 2>&5 |
| 12729 | ac_status=$? | 12644 | ac_status=$? |
| @@ -12868,8 +12783,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12868 | cat conftest.err >&5 | 12783 | cat conftest.err >&5 |
| 12869 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12784 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12870 | (exit $ac_status); } && | 12785 | (exit $ac_status); } && |
| 12871 | { ac_try='test -z "$ac_c_werror_flag" | 12786 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12872 | || test ! -s conftest.err' | ||
| 12873 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12787 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12874 | (eval $ac_try) 2>&5 | 12788 | (eval $ac_try) 2>&5 |
| 12875 | ac_status=$? | 12789 | ac_status=$? |
| @@ -12945,8 +12859,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 12945 | cat conftest.err >&5 | 12859 | cat conftest.err >&5 |
| 12946 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12860 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 12947 | (exit $ac_status); } && | 12861 | (exit $ac_status); } && |
| 12948 | { ac_try='test -z "$ac_c_werror_flag" | 12862 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 12949 | || test ! -s conftest.err' | ||
| 12950 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12863 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 12951 | (eval $ac_try) 2>&5 | 12864 | (eval $ac_try) 2>&5 |
| 12952 | ac_status=$? | 12865 | ac_status=$? |
| @@ -13009,8 +12922,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13009 | cat conftest.err >&5 | 12922 | cat conftest.err >&5 |
| 13010 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 12923 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13011 | (exit $ac_status); } && | 12924 | (exit $ac_status); } && |
| 13012 | { ac_try='test -z "$ac_c_werror_flag" | 12925 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13013 | || test ! -s conftest.err' | ||
| 13014 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 12926 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13015 | (eval $ac_try) 2>&5 | 12927 | (eval $ac_try) 2>&5 |
| 13016 | ac_status=$? | 12928 | ac_status=$? |
| @@ -13091,8 +13003,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13091 | cat conftest.err >&5 | 13003 | cat conftest.err >&5 |
| 13092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13004 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13093 | (exit $ac_status); } && | 13005 | (exit $ac_status); } && |
| 13094 | { ac_try='test -z "$ac_c_werror_flag" | 13006 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13095 | || test ! -s conftest.err' | ||
| 13096 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13007 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13097 | (eval $ac_try) 2>&5 | 13008 | (eval $ac_try) 2>&5 |
| 13098 | ac_status=$? | 13009 | ac_status=$? |
| @@ -13233,8 +13144,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13233 | cat conftest.err >&5 | 13144 | cat conftest.err >&5 |
| 13234 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13145 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13235 | (exit $ac_status); } && | 13146 | (exit $ac_status); } && |
| 13236 | { ac_try='test -z "$ac_c_werror_flag" | 13147 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13237 | || test ! -s conftest.err' | ||
| 13238 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13148 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13239 | (eval $ac_try) 2>&5 | 13149 | (eval $ac_try) 2>&5 |
| 13240 | ac_status=$? | 13150 | ac_status=$? |
| @@ -13379,8 +13289,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13379 | cat conftest.err >&5 | 13289 | cat conftest.err >&5 |
| 13380 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13290 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13381 | (exit $ac_status); } && | 13291 | (exit $ac_status); } && |
| 13382 | { ac_try='test -z "$ac_c_werror_flag" | 13292 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13383 | || test ! -s conftest.err' | ||
| 13384 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13293 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13385 | (eval $ac_try) 2>&5 | 13294 | (eval $ac_try) 2>&5 |
| 13386 | ac_status=$? | 13295 | ac_status=$? |
| @@ -13456,8 +13365,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13456 | cat conftest.err >&5 | 13365 | cat conftest.err >&5 |
| 13457 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13366 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13458 | (exit $ac_status); } && | 13367 | (exit $ac_status); } && |
| 13459 | { ac_try='test -z "$ac_c_werror_flag" | 13368 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13460 | || test ! -s conftest.err' | ||
| 13461 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13369 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13462 | (eval $ac_try) 2>&5 | 13370 | (eval $ac_try) 2>&5 |
| 13463 | ac_status=$? | 13371 | ac_status=$? |
| @@ -13530,8 +13438,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13530 | cat conftest.err >&5 | 13438 | cat conftest.err >&5 |
| 13531 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13439 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13532 | (exit $ac_status); } && | 13440 | (exit $ac_status); } && |
| 13533 | { ac_try='test -z "$ac_c_werror_flag" | 13441 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13534 | || test ! -s conftest.err' | ||
| 13535 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13442 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13536 | (eval $ac_try) 2>&5 | 13443 | (eval $ac_try) 2>&5 |
| 13537 | ac_status=$? | 13444 | ac_status=$? |
| @@ -13686,8 +13593,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 13686 | cat conftest.err >&5 | 13593 | cat conftest.err >&5 |
| 13687 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13594 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13688 | (exit $ac_status); } && | 13595 | (exit $ac_status); } && |
| 13689 | { ac_try='test -z "$ac_c_werror_flag" | 13596 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13690 | || test ! -s conftest.err' | ||
| 13691 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13597 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13692 | (eval $ac_try) 2>&5 | 13598 | (eval $ac_try) 2>&5 |
| 13693 | ac_status=$? | 13599 | ac_status=$? |
| @@ -13753,8 +13659,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 13753 | cat conftest.err >&5 | 13659 | cat conftest.err >&5 |
| 13754 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13660 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 13755 | (exit $ac_status); } && | 13661 | (exit $ac_status); } && |
| 13756 | { ac_try='test -z "$ac_c_werror_flag" | 13662 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 13757 | || test ! -s conftest.err' | ||
| 13758 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13663 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 13759 | (eval $ac_try) 2>&5 | 13664 | (eval $ac_try) 2>&5 |
| 13760 | ac_status=$? | 13665 | ac_status=$? |
| @@ -14013,8 +13918,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14013 | cat conftest.err >&5 | 13918 | cat conftest.err >&5 |
| 14014 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14015 | (exit $ac_status); } && | 13920 | (exit $ac_status); } && |
| 14016 | { ac_try='test -z "$ac_c_werror_flag" | 13921 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14017 | || test ! -s conftest.err' | ||
| 14018 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13922 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14019 | (eval $ac_try) 2>&5 | 13923 | (eval $ac_try) 2>&5 |
| 14020 | ac_status=$? | 13924 | ac_status=$? |
| @@ -14081,8 +13985,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 14081 | cat conftest.err >&5 | 13985 | cat conftest.err >&5 |
| 14082 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 13986 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14083 | (exit $ac_status); } && | 13987 | (exit $ac_status); } && |
| 14084 | { ac_try='test -z "$ac_c_werror_flag" | 13988 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14085 | || test ! -s conftest.err' | ||
| 14086 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 13989 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14087 | (eval $ac_try) 2>&5 | 13990 | (eval $ac_try) 2>&5 |
| 14088 | ac_status=$? | 13991 | ac_status=$? |
| @@ -14234,8 +14137,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 14234 | cat conftest.err >&5 | 14137 | cat conftest.err >&5 |
| 14235 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14138 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14236 | (exit $ac_status); } && | 14139 | (exit $ac_status); } && |
| 14237 | { ac_try='test -z "$ac_c_werror_flag" | 14140 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14238 | || test ! -s conftest.err' | ||
| 14239 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14141 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14240 | (eval $ac_try) 2>&5 | 14142 | (eval $ac_try) 2>&5 |
| 14241 | ac_status=$? | 14143 | ac_status=$? |
| @@ -14419,8 +14321,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14419 | cat conftest.err >&5 | 14321 | cat conftest.err >&5 |
| 14420 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14322 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14421 | (exit $ac_status); } && | 14323 | (exit $ac_status); } && |
| 14422 | { ac_try='test -z "$ac_c_werror_flag" | 14324 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14423 | || test ! -s conftest.err' | ||
| 14424 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14325 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14425 | (eval $ac_try) 2>&5 | 14326 | (eval $ac_try) 2>&5 |
| 14426 | ac_status=$? | 14327 | ac_status=$? |
| @@ -14747,8 +14648,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14747 | cat conftest.err >&5 | 14648 | cat conftest.err >&5 |
| 14748 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14649 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14749 | (exit $ac_status); } && | 14650 | (exit $ac_status); } && |
| 14750 | { ac_try='test -z "$ac_c_werror_flag" | 14651 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14751 | || test ! -s conftest.err' | ||
| 14752 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14652 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14753 | (eval $ac_try) 2>&5 | 14653 | (eval $ac_try) 2>&5 |
| 14754 | ac_status=$? | 14654 | ac_status=$? |
| @@ -14849,8 +14749,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14849 | cat conftest.err >&5 | 14749 | cat conftest.err >&5 |
| 14850 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14750 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14851 | (exit $ac_status); } && | 14751 | (exit $ac_status); } && |
| 14852 | { ac_try='test -z "$ac_c_werror_flag" | 14752 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14853 | || test ! -s conftest.err' | ||
| 14854 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14753 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14855 | (eval $ac_try) 2>&5 | 14754 | (eval $ac_try) 2>&5 |
| 14856 | ac_status=$? | 14755 | ac_status=$? |
| @@ -14923,8 +14822,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 14923 | cat conftest.err >&5 | 14822 | cat conftest.err >&5 |
| 14924 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14823 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 14925 | (exit $ac_status); } && | 14824 | (exit $ac_status); } && |
| 14926 | { ac_try='test -z "$ac_c_werror_flag" | 14825 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 14927 | || test ! -s conftest.err' | ||
| 14928 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14826 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 14929 | (eval $ac_try) 2>&5 | 14827 | (eval $ac_try) 2>&5 |
| 14930 | ac_status=$? | 14828 | ac_status=$? |
| @@ -15003,8 +14901,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15003 | cat conftest.err >&5 | 14901 | cat conftest.err >&5 |
| 15004 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14902 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15005 | (exit $ac_status); } && | 14903 | (exit $ac_status); } && |
| 15006 | { ac_try='test -z "$ac_c_werror_flag" | 14904 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15007 | || test ! -s conftest.err' | ||
| 15008 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14905 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15009 | (eval $ac_try) 2>&5 | 14906 | (eval $ac_try) 2>&5 |
| 15010 | ac_status=$? | 14907 | ac_status=$? |
| @@ -15073,8 +14970,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15073 | cat conftest.err >&5 | 14970 | cat conftest.err >&5 |
| 15074 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 14971 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15075 | (exit $ac_status); } && | 14972 | (exit $ac_status); } && |
| 15076 | { ac_try='test -z "$ac_c_werror_flag" | 14973 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15077 | || test ! -s conftest.err' | ||
| 15078 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 14974 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15079 | (eval $ac_try) 2>&5 | 14975 | (eval $ac_try) 2>&5 |
| 15080 | ac_status=$? | 14976 | ac_status=$? |
| @@ -15142,8 +15038,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15142 | cat conftest.err >&5 | 15038 | cat conftest.err >&5 |
| 15143 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15039 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15144 | (exit $ac_status); } && | 15040 | (exit $ac_status); } && |
| 15145 | { ac_try='test -z "$ac_c_werror_flag" | 15041 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15146 | || test ! -s conftest.err' | ||
| 15147 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15042 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15148 | (eval $ac_try) 2>&5 | 15043 | (eval $ac_try) 2>&5 |
| 15149 | ac_status=$? | 15044 | ac_status=$? |
| @@ -15217,8 +15112,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15217 | cat conftest.err >&5 | 15112 | cat conftest.err >&5 |
| 15218 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15113 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15219 | (exit $ac_status); } && | 15114 | (exit $ac_status); } && |
| 15220 | { ac_try='test -z "$ac_c_werror_flag" | 15115 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15221 | || test ! -s conftest.err' | ||
| 15222 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15116 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15223 | (eval $ac_try) 2>&5 | 15117 | (eval $ac_try) 2>&5 |
| 15224 | ac_status=$? | 15118 | ac_status=$? |
| @@ -15322,8 +15216,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15322 | cat conftest.err >&5 | 15216 | cat conftest.err >&5 |
| 15323 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15217 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15324 | (exit $ac_status); } && | 15218 | (exit $ac_status); } && |
| 15325 | { ac_try='test -z "$ac_c_werror_flag" | 15219 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15326 | || test ! -s conftest.err' | ||
| 15327 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15220 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15328 | (eval $ac_try) 2>&5 | 15221 | (eval $ac_try) 2>&5 |
| 15329 | ac_status=$? | 15222 | ac_status=$? |
| @@ -15398,8 +15291,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15398 | cat conftest.err >&5 | 15291 | cat conftest.err >&5 |
| 15399 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15292 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15400 | (exit $ac_status); } && | 15293 | (exit $ac_status); } && |
| 15401 | { ac_try='test -z "$ac_c_werror_flag" | 15294 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15402 | || test ! -s conftest.err' | ||
| 15403 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15295 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15404 | (eval $ac_try) 2>&5 | 15296 | (eval $ac_try) 2>&5 |
| 15405 | ac_status=$? | 15297 | ac_status=$? |
| @@ -15551,8 +15443,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15551 | cat conftest.err >&5 | 15443 | cat conftest.err >&5 |
| 15552 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15444 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15553 | (exit $ac_status); } && | 15445 | (exit $ac_status); } && |
| 15554 | { ac_try='test -z "$ac_c_werror_flag" | 15446 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15555 | || test ! -s conftest.err' | ||
| 15556 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15447 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15557 | (eval $ac_try) 2>&5 | 15448 | (eval $ac_try) 2>&5 |
| 15558 | ac_status=$? | 15449 | ac_status=$? |
| @@ -15620,8 +15511,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15620 | cat conftest.err >&5 | 15511 | cat conftest.err >&5 |
| 15621 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15512 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15622 | (exit $ac_status); } && | 15513 | (exit $ac_status); } && |
| 15623 | { ac_try='test -z "$ac_c_werror_flag" | 15514 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15624 | || test ! -s conftest.err' | ||
| 15625 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15515 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15626 | (eval $ac_try) 2>&5 | 15516 | (eval $ac_try) 2>&5 |
| 15627 | ac_status=$? | 15517 | ac_status=$? |
| @@ -15798,8 +15688,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 15798 | cat conftest.err >&5 | 15688 | cat conftest.err >&5 |
| 15799 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15689 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15800 | (exit $ac_status); } && | 15690 | (exit $ac_status); } && |
| 15801 | { ac_try='test -z "$ac_c_werror_flag" | 15691 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15802 | || test ! -s conftest.err' | ||
| 15803 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15692 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15804 | (eval $ac_try) 2>&5 | 15693 | (eval $ac_try) 2>&5 |
| 15805 | ac_status=$? | 15694 | ac_status=$? |
| @@ -15875,8 +15764,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 15875 | cat conftest.err >&5 | 15764 | cat conftest.err >&5 |
| 15876 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15765 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 15877 | (exit $ac_status); } && | 15766 | (exit $ac_status); } && |
| 15878 | { ac_try='test -z "$ac_c_werror_flag" | 15767 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 15879 | || test ! -s conftest.err' | ||
| 15880 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15768 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 15881 | (eval $ac_try) 2>&5 | 15769 | (eval $ac_try) 2>&5 |
| 15882 | ac_status=$? | 15770 | ac_status=$? |
| @@ -16030,8 +15918,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16030 | cat conftest.err >&5 | 15918 | cat conftest.err >&5 |
| 16031 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 15919 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16032 | (exit $ac_status); } && | 15920 | (exit $ac_status); } && |
| 16033 | { ac_try='test -z "$ac_c_werror_flag" | 15921 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16034 | || test ! -s conftest.err' | ||
| 16035 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 15922 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16036 | (eval $ac_try) 2>&5 | 15923 | (eval $ac_try) 2>&5 |
| 16037 | ac_status=$? | 15924 | ac_status=$? |
| @@ -16182,8 +16069,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16182 | cat conftest.err >&5 | 16069 | cat conftest.err >&5 |
| 16183 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16184 | (exit $ac_status); } && | 16071 | (exit $ac_status); } && |
| 16185 | { ac_try='test -z "$ac_c_werror_flag" | 16072 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16186 | || test ! -s conftest.err' | ||
| 16187 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16073 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16188 | (eval $ac_try) 2>&5 | 16074 | (eval $ac_try) 2>&5 |
| 16189 | ac_status=$? | 16075 | ac_status=$? |
| @@ -16334,8 +16220,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16334 | cat conftest.err >&5 | 16220 | cat conftest.err >&5 |
| 16335 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16221 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16336 | (exit $ac_status); } && | 16222 | (exit $ac_status); } && |
| 16337 | { ac_try='test -z "$ac_c_werror_flag" | 16223 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16338 | || test ! -s conftest.err' | ||
| 16339 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16224 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16340 | (eval $ac_try) 2>&5 | 16225 | (eval $ac_try) 2>&5 |
| 16341 | ac_status=$? | 16226 | ac_status=$? |
| @@ -16477,8 +16362,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16477 | cat conftest.err >&5 | 16362 | cat conftest.err >&5 |
| 16478 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16479 | (exit $ac_status); } && | 16364 | (exit $ac_status); } && |
| 16480 | { ac_try='test -z "$ac_c_werror_flag" | 16365 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16481 | || test ! -s conftest.err' | ||
| 16482 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16366 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16483 | (eval $ac_try) 2>&5 | 16367 | (eval $ac_try) 2>&5 |
| 16484 | ac_status=$? | 16368 | ac_status=$? |
| @@ -16522,8 +16406,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16522 | cat conftest.err >&5 | 16406 | cat conftest.err >&5 |
| 16523 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16407 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16524 | (exit $ac_status); } && | 16408 | (exit $ac_status); } && |
| 16525 | { ac_try='test -z "$ac_c_werror_flag" | 16409 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16526 | || test ! -s conftest.err' | ||
| 16527 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16410 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16528 | (eval $ac_try) 2>&5 | 16411 | (eval $ac_try) 2>&5 |
| 16529 | ac_status=$? | 16412 | ac_status=$? |
| @@ -16669,8 +16552,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16669 | cat conftest.err >&5 | 16552 | cat conftest.err >&5 |
| 16670 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16553 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16671 | (exit $ac_status); } && | 16554 | (exit $ac_status); } && |
| 16672 | { ac_try='test -z "$ac_c_werror_flag" | 16555 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16673 | || test ! -s conftest.err' | ||
| 16674 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16556 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16675 | (eval $ac_try) 2>&5 | 16557 | (eval $ac_try) 2>&5 |
| 16676 | ac_status=$? | 16558 | ac_status=$? |
| @@ -16714,8 +16596,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16714 | cat conftest.err >&5 | 16596 | cat conftest.err >&5 |
| 16715 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16597 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16716 | (exit $ac_status); } && | 16598 | (exit $ac_status); } && |
| 16717 | { ac_try='test -z "$ac_c_werror_flag" | 16599 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16718 | || test ! -s conftest.err' | ||
| 16719 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16600 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16720 | (eval $ac_try) 2>&5 | 16601 | (eval $ac_try) 2>&5 |
| 16721 | ac_status=$? | 16602 | ac_status=$? |
| @@ -16780,8 +16661,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16780 | cat conftest.err >&5 | 16661 | cat conftest.err >&5 |
| 16781 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16662 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16782 | (exit $ac_status); } && | 16663 | (exit $ac_status); } && |
| 16783 | { ac_try='test -z "$ac_c_werror_flag" | 16664 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16784 | || test ! -s conftest.err' | ||
| 16785 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16665 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16786 | (eval $ac_try) 2>&5 | 16666 | (eval $ac_try) 2>&5 |
| 16787 | ac_status=$? | 16667 | ac_status=$? |
| @@ -16844,8 +16724,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 16844 | cat conftest.err >&5 | 16724 | cat conftest.err >&5 |
| 16845 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16725 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16846 | (exit $ac_status); } && | 16726 | (exit $ac_status); } && |
| 16847 | { ac_try='test -z "$ac_c_werror_flag" | 16727 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16848 | || test ! -s conftest.err' | ||
| 16849 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16728 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16850 | (eval $ac_try) 2>&5 | 16729 | (eval $ac_try) 2>&5 |
| 16851 | ac_status=$? | 16730 | ac_status=$? |
| @@ -16947,8 +16826,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 16947 | cat conftest.err >&5 | 16826 | cat conftest.err >&5 |
| 16948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16827 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 16949 | (exit $ac_status); } && | 16828 | (exit $ac_status); } && |
| 16950 | { ac_try='test -z "$ac_c_werror_flag" | 16829 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 16951 | || test ! -s conftest.err' | ||
| 16952 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16830 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 16953 | (eval $ac_try) 2>&5 | 16831 | (eval $ac_try) 2>&5 |
| 16954 | ac_status=$? | 16832 | ac_status=$? |
| @@ -17017,8 +16895,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17017 | cat conftest.err >&5 | 16895 | cat conftest.err >&5 |
| 17018 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 16896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17019 | (exit $ac_status); } && | 16897 | (exit $ac_status); } && |
| 17020 | { ac_try='test -z "$ac_c_werror_flag" | 16898 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17021 | || test ! -s conftest.err' | ||
| 17022 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 16899 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17023 | (eval $ac_try) 2>&5 | 16900 | (eval $ac_try) 2>&5 |
| 17024 | ac_status=$? | 16901 | ac_status=$? |
| @@ -17125,8 +17002,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17125 | cat conftest.err >&5 | 17002 | cat conftest.err >&5 |
| 17126 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17003 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17127 | (exit $ac_status); } && | 17004 | (exit $ac_status); } && |
| 17128 | { ac_try='test -z "$ac_c_werror_flag" | 17005 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17129 | || test ! -s conftest.err' | ||
| 17130 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17006 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17131 | (eval $ac_try) 2>&5 | 17007 | (eval $ac_try) 2>&5 |
| 17132 | ac_status=$? | 17008 | ac_status=$? |
| @@ -17229,8 +17105,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17229 | cat conftest.err >&5 | 17105 | cat conftest.err >&5 |
| 17230 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17106 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17231 | (exit $ac_status); } && | 17107 | (exit $ac_status); } && |
| 17232 | { ac_try='test -z "$ac_c_werror_flag" | 17108 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17233 | || test ! -s conftest.err' | ||
| 17234 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17109 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17235 | (eval $ac_try) 2>&5 | 17110 | (eval $ac_try) 2>&5 |
| 17236 | ac_status=$? | 17111 | ac_status=$? |
| @@ -17306,8 +17181,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17306 | cat conftest.err >&5 | 17181 | cat conftest.err >&5 |
| 17307 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17182 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17308 | (exit $ac_status); } && | 17183 | (exit $ac_status); } && |
| 17309 | { ac_try='test -z "$ac_c_werror_flag" | 17184 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17310 | || test ! -s conftest.err' | ||
| 17311 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17185 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17312 | (eval $ac_try) 2>&5 | 17186 | (eval $ac_try) 2>&5 |
| 17313 | ac_status=$? | 17187 | ac_status=$? |
| @@ -17411,8 +17285,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17411 | cat conftest.err >&5 | 17285 | cat conftest.err >&5 |
| 17412 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17286 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17413 | (exit $ac_status); } && | 17287 | (exit $ac_status); } && |
| 17414 | { ac_try='test -z "$ac_c_werror_flag" | 17288 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17415 | || test ! -s conftest.err' | ||
| 17416 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17289 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17417 | (eval $ac_try) 2>&5 | 17290 | (eval $ac_try) 2>&5 |
| 17418 | ac_status=$? | 17291 | ac_status=$? |
| @@ -17504,8 +17377,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17504 | cat conftest.err >&5 | 17377 | cat conftest.err >&5 |
| 17505 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17378 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17506 | (exit $ac_status); } && | 17379 | (exit $ac_status); } && |
| 17507 | { ac_try='test -z "$ac_c_werror_flag" | 17380 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17508 | || test ! -s conftest.err' | ||
| 17509 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17381 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17510 | (eval $ac_try) 2>&5 | 17382 | (eval $ac_try) 2>&5 |
| 17511 | ac_status=$? | 17383 | ac_status=$? |
| @@ -17570,8 +17442,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17570 | cat conftest.err >&5 | 17442 | cat conftest.err >&5 |
| 17571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17443 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17572 | (exit $ac_status); } && | 17444 | (exit $ac_status); } && |
| 17573 | { ac_try='test -z "$ac_c_werror_flag" | 17445 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17574 | || test ! -s conftest.err' | ||
| 17575 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17446 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17576 | (eval $ac_try) 2>&5 | 17447 | (eval $ac_try) 2>&5 |
| 17577 | ac_status=$? | 17448 | ac_status=$? |
| @@ -17637,8 +17508,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17637 | cat conftest.err >&5 | 17508 | cat conftest.err >&5 |
| 17638 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17509 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17639 | (exit $ac_status); } && | 17510 | (exit $ac_status); } && |
| 17640 | { ac_try='test -z "$ac_c_werror_flag" | 17511 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17641 | || test ! -s conftest.err' | ||
| 17642 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17512 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17643 | (eval $ac_try) 2>&5 | 17513 | (eval $ac_try) 2>&5 |
| 17644 | ac_status=$? | 17514 | ac_status=$? |
| @@ -17748,8 +17618,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17748 | cat conftest.err >&5 | 17618 | cat conftest.err >&5 |
| 17749 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17619 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17750 | (exit $ac_status); } && | 17620 | (exit $ac_status); } && |
| 17751 | { ac_try='test -z "$ac_c_werror_flag" | 17621 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17752 | || test ! -s conftest.err' | ||
| 17753 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17622 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17754 | (eval $ac_try) 2>&5 | 17623 | (eval $ac_try) 2>&5 |
| 17755 | ac_status=$? | 17624 | ac_status=$? |
| @@ -17814,8 +17683,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17814 | cat conftest.err >&5 | 17683 | cat conftest.err >&5 |
| 17815 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17684 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17816 | (exit $ac_status); } && | 17685 | (exit $ac_status); } && |
| 17817 | { ac_try='test -z "$ac_c_werror_flag" | 17686 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17818 | || test ! -s conftest.err' | ||
| 17819 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17687 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17820 | (eval $ac_try) 2>&5 | 17688 | (eval $ac_try) 2>&5 |
| 17821 | ac_status=$? | 17689 | ac_status=$? |
| @@ -17895,8 +17763,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17895 | cat conftest.err >&5 | 17763 | cat conftest.err >&5 |
| 17896 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17764 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17897 | (exit $ac_status); } && | 17765 | (exit $ac_status); } && |
| 17898 | { ac_try='test -z "$ac_c_werror_flag" | 17766 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17899 | || test ! -s conftest.err' | ||
| 17900 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17767 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17901 | (eval $ac_try) 2>&5 | 17768 | (eval $ac_try) 2>&5 |
| 17902 | ac_status=$? | 17769 | ac_status=$? |
| @@ -17969,8 +17836,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 17969 | cat conftest.err >&5 | 17836 | cat conftest.err >&5 |
| 17970 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17837 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 17971 | (exit $ac_status); } && | 17838 | (exit $ac_status); } && |
| 17972 | { ac_try='test -z "$ac_c_werror_flag" | 17839 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 17973 | || test ! -s conftest.err' | ||
| 17974 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17840 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 17975 | (eval $ac_try) 2>&5 | 17841 | (eval $ac_try) 2>&5 |
| 17976 | ac_status=$? | 17842 | ac_status=$? |
| @@ -18043,8 +17909,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18043 | cat conftest.err >&5 | 17909 | cat conftest.err >&5 |
| 18044 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17910 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18045 | (exit $ac_status); } && | 17911 | (exit $ac_status); } && |
| 18046 | { ac_try='test -z "$ac_c_werror_flag" | 17912 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18047 | || test ! -s conftest.err' | ||
| 18048 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17913 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18049 | (eval $ac_try) 2>&5 | 17914 | (eval $ac_try) 2>&5 |
| 18050 | ac_status=$? | 17915 | ac_status=$? |
| @@ -18117,8 +17982,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18117 | cat conftest.err >&5 | 17982 | cat conftest.err >&5 |
| 18118 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 17983 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18119 | (exit $ac_status); } && | 17984 | (exit $ac_status); } && |
| 18120 | { ac_try='test -z "$ac_c_werror_flag" | 17985 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18121 | || test ! -s conftest.err' | ||
| 18122 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 17986 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18123 | (eval $ac_try) 2>&5 | 17987 | (eval $ac_try) 2>&5 |
| 18124 | ac_status=$? | 17988 | ac_status=$? |
| @@ -18192,8 +18056,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18192 | cat conftest.err >&5 | 18056 | cat conftest.err >&5 |
| 18193 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18057 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18194 | (exit $ac_status); } && | 18058 | (exit $ac_status); } && |
| 18195 | { ac_try='test -z "$ac_c_werror_flag" | 18059 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18196 | || test ! -s conftest.err' | ||
| 18197 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18060 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18198 | (eval $ac_try) 2>&5 | 18061 | (eval $ac_try) 2>&5 |
| 18199 | ac_status=$? | 18062 | ac_status=$? |
| @@ -18265,8 +18128,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18265 | cat conftest.err >&5 | 18128 | cat conftest.err >&5 |
| 18266 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18129 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18267 | (exit $ac_status); } && | 18130 | (exit $ac_status); } && |
| 18268 | { ac_try='test -z "$ac_c_werror_flag" | 18131 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18269 | || test ! -s conftest.err' | ||
| 18270 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18132 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18271 | (eval $ac_try) 2>&5 | 18133 | (eval $ac_try) 2>&5 |
| 18272 | ac_status=$? | 18134 | ac_status=$? |
| @@ -18341,8 +18203,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18341 | cat conftest.err >&5 | 18203 | cat conftest.err >&5 |
| 18342 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18204 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18343 | (exit $ac_status); } && | 18205 | (exit $ac_status); } && |
| 18344 | { ac_try='test -z "$ac_c_werror_flag" | 18206 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18345 | || test ! -s conftest.err' | ||
| 18346 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18207 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18347 | (eval $ac_try) 2>&5 | 18208 | (eval $ac_try) 2>&5 |
| 18348 | ac_status=$? | 18209 | ac_status=$? |
| @@ -18414,8 +18275,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 18414 | cat conftest.err >&5 | 18275 | cat conftest.err >&5 |
| 18415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18276 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18416 | (exit $ac_status); } && | 18277 | (exit $ac_status); } && |
| 18417 | { ac_try='test -z "$ac_c_werror_flag" | 18278 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18418 | || test ! -s conftest.err' | ||
| 18419 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18279 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18420 | (eval $ac_try) 2>&5 | 18280 | (eval $ac_try) 2>&5 |
| 18421 | ac_status=$? | 18281 | ac_status=$? |
| @@ -18488,8 +18348,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18488 | cat conftest.err >&5 | 18348 | cat conftest.err >&5 |
| 18489 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18349 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18490 | (exit $ac_status); } && | 18350 | (exit $ac_status); } && |
| 18491 | { ac_try='test -z "$ac_c_werror_flag" | 18351 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18492 | || test ! -s conftest.err' | ||
| 18493 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18352 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18494 | (eval $ac_try) 2>&5 | 18353 | (eval $ac_try) 2>&5 |
| 18495 | ac_status=$? | 18354 | ac_status=$? |
| @@ -18639,8 +18498,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18639 | cat conftest.err >&5 | 18498 | cat conftest.err >&5 |
| 18640 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18499 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18641 | (exit $ac_status); } && | 18500 | (exit $ac_status); } && |
| 18642 | { ac_try='test -z "$ac_c_werror_flag" | 18501 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18643 | || test ! -s conftest.err' | ||
| 18644 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18502 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18645 | (eval $ac_try) 2>&5 | 18503 | (eval $ac_try) 2>&5 |
| 18646 | ac_status=$? | 18504 | ac_status=$? |
| @@ -18786,8 +18644,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18786 | cat conftest.err >&5 | 18644 | cat conftest.err >&5 |
| 18787 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18645 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18788 | (exit $ac_status); } && | 18646 | (exit $ac_status); } && |
| 18789 | { ac_try='test -z "$ac_c_werror_flag" | 18647 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18790 | || test ! -s conftest.err' | ||
| 18791 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18648 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18792 | (eval $ac_try) 2>&5 | 18649 | (eval $ac_try) 2>&5 |
| 18793 | ac_status=$? | 18650 | ac_status=$? |
| @@ -18933,8 +18790,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 18933 | cat conftest.err >&5 | 18790 | cat conftest.err >&5 |
| 18934 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18791 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 18935 | (exit $ac_status); } && | 18792 | (exit $ac_status); } && |
| 18936 | { ac_try='test -z "$ac_c_werror_flag" | 18793 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 18937 | || test ! -s conftest.err' | ||
| 18938 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18794 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 18939 | (eval $ac_try) 2>&5 | 18795 | (eval $ac_try) 2>&5 |
| 18940 | ac_status=$? | 18796 | ac_status=$? |
| @@ -19091,8 +18947,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19091 | cat conftest.err >&5 | 18947 | cat conftest.err >&5 |
| 19092 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 18948 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19093 | (exit $ac_status); } && | 18949 | (exit $ac_status); } && |
| 19094 | { ac_try='test -z "$ac_c_werror_flag" | 18950 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19095 | || test ! -s conftest.err' | ||
| 19096 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 18951 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19097 | (eval $ac_try) 2>&5 | 18952 | (eval $ac_try) 2>&5 |
| 19098 | ac_status=$? | 18953 | ac_status=$? |
| @@ -19238,8 +19093,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19238 | cat conftest.err >&5 | 19093 | cat conftest.err >&5 |
| 19239 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19094 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19240 | (exit $ac_status); } && | 19095 | (exit $ac_status); } && |
| 19241 | { ac_try='test -z "$ac_c_werror_flag" | 19096 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19242 | || test ! -s conftest.err' | ||
| 19243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19097 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19244 | (eval $ac_try) 2>&5 | 19098 | (eval $ac_try) 2>&5 |
| 19245 | ac_status=$? | 19099 | ac_status=$? |
| @@ -19385,8 +19239,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19385 | cat conftest.err >&5 | 19239 | cat conftest.err >&5 |
| 19386 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19240 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19387 | (exit $ac_status); } && | 19241 | (exit $ac_status); } && |
| 19388 | { ac_try='test -z "$ac_c_werror_flag" | 19242 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19389 | || test ! -s conftest.err' | ||
| 19390 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19243 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19391 | (eval $ac_try) 2>&5 | 19244 | (eval $ac_try) 2>&5 |
| 19392 | ac_status=$? | 19245 | ac_status=$? |
| @@ -19544,8 +19397,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19544 | cat conftest.err >&5 | 19397 | cat conftest.err >&5 |
| 19545 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19398 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19546 | (exit $ac_status); } && | 19399 | (exit $ac_status); } && |
| 19547 | { ac_try='test -z "$ac_c_werror_flag" | 19400 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19548 | || test ! -s conftest.err' | ||
| 19549 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19401 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19550 | (eval $ac_try) 2>&5 | 19402 | (eval $ac_try) 2>&5 |
| 19551 | ac_status=$? | 19403 | ac_status=$? |
| @@ -19703,8 +19555,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 19703 | cat conftest.err >&5 | 19555 | cat conftest.err >&5 |
| 19704 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19556 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19705 | (exit $ac_status); } && | 19557 | (exit $ac_status); } && |
| 19706 | { ac_try='test -z "$ac_c_werror_flag" | 19558 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19707 | || test ! -s conftest.err' | ||
| 19708 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19559 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19709 | (eval $ac_try) 2>&5 | 19560 | (eval $ac_try) 2>&5 |
| 19710 | ac_status=$? | 19561 | ac_status=$? |
| @@ -19893,8 +19744,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 19893 | cat conftest.err >&5 | 19744 | cat conftest.err >&5 |
| 19894 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19745 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19895 | (exit $ac_status); } && | 19746 | (exit $ac_status); } && |
| 19896 | { ac_try='test -z "$ac_c_werror_flag" | 19747 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19897 | || test ! -s conftest.err' | ||
| 19898 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19748 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19899 | (eval $ac_try) 2>&5 | 19749 | (eval $ac_try) 2>&5 |
| 19900 | ac_status=$? | 19750 | ac_status=$? |
| @@ -19967,8 +19817,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 19967 | cat conftest.err >&5 | 19817 | cat conftest.err >&5 |
| 19968 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19818 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 19969 | (exit $ac_status); } && | 19819 | (exit $ac_status); } && |
| 19970 | { ac_try='test -z "$ac_c_werror_flag" | 19820 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 19971 | || test ! -s conftest.err' | ||
| 19972 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19821 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 19973 | (eval $ac_try) 2>&5 | 19822 | (eval $ac_try) 2>&5 |
| 19974 | ac_status=$? | 19823 | ac_status=$? |
| @@ -20036,8 +19885,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20036 | cat conftest.err >&5 | 19885 | cat conftest.err >&5 |
| 20037 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19886 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20038 | (exit $ac_status); } && | 19887 | (exit $ac_status); } && |
| 20039 | { ac_try='test -z "$ac_c_werror_flag" | 19888 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20040 | || test ! -s conftest.err' | ||
| 20041 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19889 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20042 | (eval $ac_try) 2>&5 | 19890 | (eval $ac_try) 2>&5 |
| 20043 | ac_status=$? | 19891 | ac_status=$? |
| @@ -20083,8 +19931,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20083 | cat conftest.err >&5 | 19931 | cat conftest.err >&5 |
| 20084 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 19932 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20085 | (exit $ac_status); } && | 19933 | (exit $ac_status); } && |
| 20086 | { ac_try='test -z "$ac_c_werror_flag" | 19934 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20087 | || test ! -s conftest.err' | ||
| 20088 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 19935 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20089 | (eval $ac_try) 2>&5 | 19936 | (eval $ac_try) 2>&5 |
| 20090 | ac_status=$? | 19937 | ac_status=$? |
| @@ -20158,8 +20005,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 20158 | cat conftest.err >&5 | 20005 | cat conftest.err >&5 |
| 20159 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20006 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20160 | (exit $ac_status); } && | 20007 | (exit $ac_status); } && |
| 20161 | { ac_try='test -z "$ac_c_werror_flag" | 20008 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20162 | || test ! -s conftest.err' | ||
| 20163 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20009 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20164 | (eval $ac_try) 2>&5 | 20010 | (eval $ac_try) 2>&5 |
| 20165 | ac_status=$? | 20011 | ac_status=$? |
| @@ -20223,8 +20069,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20223 | cat conftest.err >&5 | 20069 | cat conftest.err >&5 |
| 20224 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20070 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20225 | (exit $ac_status); } && | 20071 | (exit $ac_status); } && |
| 20226 | { ac_try='test -z "$ac_c_werror_flag" | 20072 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20227 | || test ! -s conftest.err' | ||
| 20228 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20073 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20229 | (eval $ac_try) 2>&5 | 20074 | (eval $ac_try) 2>&5 |
| 20230 | ac_status=$? | 20075 | ac_status=$? |
| @@ -20362,8 +20207,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 20362 | cat conftest.err >&5 | 20207 | cat conftest.err >&5 |
| 20363 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20208 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20364 | (exit $ac_status); } && | 20209 | (exit $ac_status); } && |
| 20365 | { ac_try='test -z "$ac_c_werror_flag" | 20210 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20366 | || test ! -s conftest.err' | ||
| 20367 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20211 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20368 | (eval $ac_try) 2>&5 | 20212 | (eval $ac_try) 2>&5 |
| 20369 | ac_status=$? | 20213 | ac_status=$? |
| @@ -20424,8 +20268,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20424 | cat conftest.err >&5 | 20268 | cat conftest.err >&5 |
| 20425 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20269 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20426 | (exit $ac_status); } && | 20270 | (exit $ac_status); } && |
| 20427 | { ac_try='test -z "$ac_c_werror_flag" | 20271 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20428 | || test ! -s conftest.err' | ||
| 20429 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20272 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20430 | (eval $ac_try) 2>&5 | 20273 | (eval $ac_try) 2>&5 |
| 20431 | ac_status=$? | 20274 | ac_status=$? |
| @@ -20570,8 +20413,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20570 | cat conftest.err >&5 | 20413 | cat conftest.err >&5 |
| 20571 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20414 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20572 | (exit $ac_status); } && | 20415 | (exit $ac_status); } && |
| 20573 | { ac_try='test -z "$ac_c_werror_flag" | 20416 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20574 | || test ! -s conftest.err' | ||
| 20575 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20417 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20576 | (eval $ac_try) 2>&5 | 20418 | (eval $ac_try) 2>&5 |
| 20577 | ac_status=$? | 20419 | ac_status=$? |
| @@ -20727,8 +20569,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20727 | cat conftest.err >&5 | 20569 | cat conftest.err >&5 |
| 20728 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20570 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20729 | (exit $ac_status); } && | 20571 | (exit $ac_status); } && |
| 20730 | { ac_try='test -z "$ac_c_werror_flag" | 20572 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20731 | || test ! -s conftest.err' | ||
| 20732 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20573 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20733 | (eval $ac_try) 2>&5 | 20574 | (eval $ac_try) 2>&5 |
| 20734 | ac_status=$? | 20575 | ac_status=$? |
| @@ -20899,8 +20740,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20899 | cat conftest.err >&5 | 20740 | cat conftest.err >&5 |
| 20900 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20741 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20901 | (exit $ac_status); } && | 20742 | (exit $ac_status); } && |
| 20902 | { ac_try='test -z "$ac_c_werror_flag" | 20743 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20903 | || test ! -s conftest.err' | ||
| 20904 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20744 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20905 | (eval $ac_try) 2>&5 | 20745 | (eval $ac_try) 2>&5 |
| 20906 | ac_status=$? | 20746 | ac_status=$? |
| @@ -20968,8 +20808,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 20968 | cat conftest.err >&5 | 20808 | cat conftest.err >&5 |
| 20969 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20809 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 20970 | (exit $ac_status); } && | 20810 | (exit $ac_status); } && |
| 20971 | { ac_try='test -z "$ac_c_werror_flag" | 20811 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 20972 | || test ! -s conftest.err' | ||
| 20973 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20812 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 20974 | (eval $ac_try) 2>&5 | 20813 | (eval $ac_try) 2>&5 |
| 20975 | ac_status=$? | 20814 | ac_status=$? |
| @@ -21154,8 +20993,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 21154 | cat conftest.err >&5 | 20993 | cat conftest.err >&5 |
| 21155 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 20994 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21156 | (exit $ac_status); } && | 20995 | (exit $ac_status); } && |
| 21157 | { ac_try='test -z "$ac_c_werror_flag" | 20996 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21158 | || test ! -s conftest.err' | ||
| 21159 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 20997 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21160 | (eval $ac_try) 2>&5 | 20998 | (eval $ac_try) 2>&5 |
| 21161 | ac_status=$? | 20999 | ac_status=$? |
| @@ -21448,8 +21286,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_link\"") >&5 | |||
| 21448 | cat conftest.err >&5 | 21286 | cat conftest.err >&5 |
| 21449 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21287 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21450 | (exit $ac_status); } && | 21288 | (exit $ac_status); } && |
| 21451 | { ac_try='test -z "$ac_c_werror_flag" | 21289 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21452 | || test ! -s conftest.err' | ||
| 21453 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21290 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21454 | (eval $ac_try) 2>&5 | 21291 | (eval $ac_try) 2>&5 |
| 21455 | ac_status=$? | 21292 | ac_status=$? |
| @@ -21514,8 +21351,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 21514 | cat conftest.err >&5 | 21351 | cat conftest.err >&5 |
| 21515 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21352 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21516 | (exit $ac_status); } && | 21353 | (exit $ac_status); } && |
| 21517 | { ac_try='test -z "$ac_c_werror_flag" | 21354 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21518 | || test ! -s conftest.err' | ||
| 21519 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21355 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21520 | (eval $ac_try) 2>&5 | 21356 | (eval $ac_try) 2>&5 |
| 21521 | ac_status=$? | 21357 | ac_status=$? |
| @@ -21578,8 +21414,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 21578 | cat conftest.err >&5 | 21414 | cat conftest.err >&5 |
| 21579 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21415 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21580 | (exit $ac_status); } && | 21416 | (exit $ac_status); } && |
| 21581 | { ac_try='test -z "$ac_c_werror_flag" | 21417 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21582 | || test ! -s conftest.err' | ||
| 21583 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21418 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21584 | (eval $ac_try) 2>&5 | 21419 | (eval $ac_try) 2>&5 |
| 21585 | ac_status=$? | 21420 | ac_status=$? |
| @@ -21645,8 +21480,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 21645 | cat conftest.err >&5 | 21480 | cat conftest.err >&5 |
| 21646 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21481 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21647 | (exit $ac_status); } && | 21482 | (exit $ac_status); } && |
| 21648 | { ac_try='test -z "$ac_c_werror_flag" | 21483 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21649 | || test ! -s conftest.err' | ||
| 21650 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21484 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21651 | (eval $ac_try) 2>&5 | 21485 | (eval $ac_try) 2>&5 |
| 21652 | ac_status=$? | 21486 | ac_status=$? |
| @@ -21687,8 +21521,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 21687 | cat conftest.err >&5 | 21521 | cat conftest.err >&5 |
| 21688 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21522 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21689 | (exit $ac_status); } && | 21523 | (exit $ac_status); } && |
| 21690 | { ac_try='test -z "$ac_c_werror_flag" | 21524 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21691 | || test ! -s conftest.err' | ||
| 21692 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21525 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21693 | (eval $ac_try) 2>&5 | 21526 | (eval $ac_try) 2>&5 |
| 21694 | ac_status=$? | 21527 | ac_status=$? |
| @@ -21755,8 +21588,7 @@ if { (eval echo "$as_me:$LINENO: \"$ac_compile\"") >&5 | |||
| 21755 | cat conftest.err >&5 | 21588 | cat conftest.err >&5 |
| 21756 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 | 21589 | echo "$as_me:$LINENO: \$? = $ac_status" >&5 |
| 21757 | (exit $ac_status); } && | 21590 | (exit $ac_status); } && |
| 21758 | { ac_try='test -z "$ac_c_werror_flag" | 21591 | { ac_try='test -z "$ac_c_werror_flag" || test ! -s conftest.err' |
| 21759 | || test ! -s conftest.err' | ||
| 21760 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 | 21592 | { (eval echo "$as_me:$LINENO: \"$ac_try\"") >&5 |
| 21761 | (eval $ac_try) 2>&5 | 21593 | (eval $ac_try) 2>&5 |
| 21762 | ac_status=$? | 21594 | ac_status=$? |
| @@ -22885,11 +22717,6 @@ esac | |||
| 22885 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; | 22717 | *) ac_INSTALL=$ac_top_builddir$INSTALL ;; |
| 22886 | esac | 22718 | esac |
| 22887 | 22719 | ||
| 22888 | if test x"$ac_file" != x-; then | ||
| 22889 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | ||
| 22890 | echo "$as_me: creating $ac_file" >&6;} | ||
| 22891 | rm -f "$ac_file" | ||
| 22892 | fi | ||
| 22893 | # Let's still pretend it is `configure' which instantiates (i.e., don't | 22720 | # Let's still pretend it is `configure' which instantiates (i.e., don't |
| 22894 | # use $as_me), people would be surprised to read: | 22721 | # use $as_me), people would be surprised to read: |
| 22895 | # /* config.h. Generated by config.status. */ | 22722 | # /* config.h. Generated by config.status. */ |
| @@ -22928,6 +22755,12 @@ echo "$as_me: error: cannot find input file: $f" >&2;} | |||
| 22928 | fi;; | 22755 | fi;; |
| 22929 | esac | 22756 | esac |
| 22930 | done` || { (exit 1); exit 1; } | 22757 | done` || { (exit 1); exit 1; } |
| 22758 | |||
| 22759 | if test x"$ac_file" != x-; then | ||
| 22760 | { echo "$as_me:$LINENO: creating $ac_file" >&5 | ||
| 22761 | echo "$as_me: creating $ac_file" >&6;} | ||
| 22762 | rm -f "$ac_file" | ||
| 22763 | fi | ||
| 22931 | _ACEOF | 22764 | _ACEOF |
| 22932 | cat >>$CONFIG_STATUS <<_ACEOF | 22765 | cat >>$CONFIG_STATUS <<_ACEOF |
| 22933 | sed "$ac_vpsub | 22766 | sed "$ac_vpsub |
diff --git a/etc/ChangeLog b/etc/ChangeLog index 0fd5cede578..f0123a8b90d 100644 --- a/etc/ChangeLog +++ b/etc/ChangeLog | |||
| @@ -1,3 +1,16 @@ | |||
| 1 | 2004-12-21 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * DISTRIB: Don't say "freeware". | ||
| 4 | |||
| 5 | 2004-12-15 Nick Roberts <nickrob@snap.net.nz> | ||
| 6 | |||
| 7 | * DEBUG: Change printing example to break on a procedure name. | ||
| 8 | |||
| 9 | 2004-12-11 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 10 | |||
| 11 | * e/eterm.ti: Add rs1. | ||
| 12 | * e/eterm: Regenerate. | ||
| 13 | |||
| 1 | 2004-12-08 Alexandre VEYRENC <veyrenc@wanadoo.fr> (tiny change) | 14 | 2004-12-08 Alexandre VEYRENC <veyrenc@wanadoo.fr> (tiny change) |
| 2 | 15 | ||
| 3 | * fr-refcard.tex: Fix typos. | 16 | * fr-refcard.tex: Fix typos. |
| @@ -107,36 +107,32 @@ objects which you can examine in turn with the x... commands. | |||
| 107 | Even with a live process, these x... commands are useful for | 107 | Even with a live process, these x... commands are useful for |
| 108 | examining the fields in a buffer, window, process, frame or marker. | 108 | examining the fields in a buffer, window, process, frame or marker. |
| 109 | Here's an example using concepts explained in the node "Value History" | 109 | Here's an example using concepts explained in the node "Value History" |
| 110 | of the GDB manual to print the variable frame from this line in | 110 | of the GDB manual to print values associated with the variable |
| 111 | xmenu.c: | 111 | called frame. First, use these commands: |
| 112 | |||
| 113 | buf.frame_or_window = frame; | ||
| 114 | |||
| 115 | First, use these commands: | ||
| 116 | 112 | ||
| 117 | cd src | 113 | cd src |
| 118 | gdb emacs | 114 | gdb emacs |
| 119 | b xmenu.c:1296 | 115 | b set_frame_buffer_list |
| 120 | r -q | 116 | r -q |
| 121 | 117 | ||
| 122 | Then type C-x 5 2 to create a new frame, and it hits the breakpoint: | 118 | Then when Emacs it hits the breakpoint: |
| 123 | 119 | ||
| 124 | (gdb) p frame | 120 | (gdb) p frame |
| 125 | $1 = 1077872640 | 121 | $1 = 139854428 |
| 126 | (gdb) xtype | 122 | (gdb) xtype |
| 127 | Lisp_Vectorlike | 123 | Lisp_Vectorlike |
| 128 | PVEC_FRAME | 124 | PVEC_FRAME |
| 129 | (gdb) xframe | 125 | (gdb) xframe |
| 130 | $2 = (struct frame *) 0x3f0800 | 126 | $2 = (struct frame *) 0x8560258 |
| 131 | (gdb) p *$ | 127 | (gdb) p *$ |
| 132 | $3 = { | 128 | $3 = { |
| 133 | size = 536871989, | 129 | size = 1073742931, |
| 134 | next = 0x366240, | 130 | next = 0x85dfe58, |
| 135 | name = 809661752, | 131 | name = 140615219, |
| 136 | [...] | 132 | [...] |
| 137 | } | 133 | } |
| 138 | (gdb) p $3->name | 134 | (gdb) p $3->name |
| 139 | $4 = 809661752 | 135 | $4 = 140615219 |
| 140 | 136 | ||
| 141 | Now we can use `pr' to print the name of the frame: | 137 | Now we can use `pr' to print the name of the frame: |
| 142 | 138 | ||
diff --git a/etc/DISTRIB b/etc/DISTRIB index f1e8deb6ce1..bc0ea8cc60d 100644 --- a/etc/DISTRIB +++ b/etc/DISTRIB | |||
| @@ -83,7 +83,7 @@ product and divide it by five, that is a good amount. | |||
| 83 | If you like GNU Emacs, please express your satisfaction with a | 83 | If you like GNU Emacs, please express your satisfaction with a |
| 84 | donation: send me or the Foundation what you feel Emacs has been worth | 84 | donation: send me or the Foundation what you feel Emacs has been worth |
| 85 | to you. If you are glad that I developed GNU Emacs and distribute it | 85 | to you. If you are glad that I developed GNU Emacs and distribute it |
| 86 | as freeware, rather than following the obstructive and antisocial | 86 | as free software, rather than following the obstructive and antisocial |
| 87 | practices typical of software developers, reward me. If you would | 87 | practices typical of software developers, reward me. If you would |
| 88 | like the Foundation to develop more free software, contribute. | 88 | like the Foundation to develop more free software, contribute. |
| 89 | 89 | ||
| @@ -98,26 +98,44 @@ types any more. Add -DUSE_LISP_UNION_TYPE if you want union types. | |||
| 98 | 98 | ||
| 99 | * Changes in Emacs 21.4 | 99 | * Changes in Emacs 21.4 |
| 100 | 100 | ||
| 101 | ** line-move-ignore-invisible now defaults to t. | 101 | ** You can now follow links by clicking Mouse-1 on the link. |
| 102 | 102 | ||
| 103 | ** In Outline mode, hide-body no longer hides lines at the top | 103 | Traditionally, Emacs uses a Mouse-1 click to set point and a Mouse-2 |
| 104 | of the file that precede the first header line. | 104 | click to follow a link, whereas most other applications use a Mouse-1 |
| 105 | click for both purposes, depending on whether you click outside or | ||
| 106 | inside a link. With release 21.4, the behaviour of a Mouse-1 click | ||
| 107 | has been changed to match this context-sentitive dual behaviour. | ||
| 105 | 108 | ||
| 106 | +++ | 109 | Depending on the current mode, a Mouse-2 click in Emacs may do much |
| 107 | ** `set-auto-mode' now gives the interpreter magic line (if present) | 110 | more than just follow a link, so the new Mouse-1 behaviour is only |
| 108 | precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration | 111 | activated for modes which explicitly mark a clickable text as a "link" |
| 109 | will give the buffer XML or SGML mode, based on the new var | 112 | (see the new function `mouse-on-link-p' for details). The lisp |
| 110 | `magic-mode-alist'. | 113 | packages that are included in release 21.4 have been adapted to do |
| 114 | this, but external packages may not yet support this. However, there | ||
| 115 | is no risk in using such packages, as the worst thing that could | ||
| 116 | happen is that you get the original Mouse-1 behaviour when you click | ||
| 117 | on a link, which typically means that you set point where you click. | ||
| 111 | 118 | ||
| 112 | +++ | 119 | If you want to get the original Mouse-1 action also inside a link, you |
| 113 | ** New function `looking-back' checks whether a regular expression matches | 120 | just need to press the Mouse-1 button a little longer than a normal |
| 114 | the text before point. Specifying the LIMIT argument bounds how far | 121 | click (i.e. press and hold the Mouse-1 button for half a second before |
| 115 | back the match can start; this is a way to keep it from taking too long. | 122 | you release it). |
| 123 | |||
| 124 | Dragging the Mouse-1 inside a link still performs the original | ||
| 125 | drag-mouse-1 action, typically copy the text. | ||
| 126 | |||
| 127 | You can customize the new Mouse-1 behaviour via the new user option | ||
| 128 | `mouse-1-click-follows-link'. | ||
| 116 | 129 | ||
| 117 | +++ | 130 | +++ |
| 118 | ** New functions `make-progress-reporter', `progress-reporter-update', | 131 | ** When the undo information of the current command gets really large |
| 119 | `progress-reporter-force-update' and `progress-reporter-done' provide | 132 | (beyond the value of `undo-outer-limit'), Emacs asks you whether to |
| 120 | a simple and efficient way of printing progress messages to the user. | 133 | discard it or keep it. |
| 134 | |||
| 135 | ** line-move-ignore-invisible now defaults to t. | ||
| 136 | |||
| 137 | ** In Outline mode, hide-body no longer hides lines at the top | ||
| 138 | of the file that precede the first header line. | ||
| 121 | 139 | ||
| 122 | +++ | 140 | +++ |
| 123 | ** In Enriched mode, `set-left-margin' and `set-right-margin' are now | 141 | ** In Enriched mode, `set-left-margin' and `set-right-margin' are now |
| @@ -596,6 +614,27 @@ command is bound to M-o. A new command dired-mark-omitted, bound to M-O, | |||
| 596 | marks omitted files. The variable dired-omit-files-p is obsoleted, use the | 614 | marks omitted files. The variable dired-omit-files-p is obsoleted, use the |
| 597 | mode toggling function instead. | 615 | mode toggling function instead. |
| 598 | 616 | ||
| 617 | +++ | ||
| 618 | ** find-file-read-only visits multiple files in read-only mode, | ||
| 619 | when the file name contains wildcard characters. | ||
| 620 | |||
| 621 | +++ | ||
| 622 | ** find-alternate-file replaces the current file with multiple files, | ||
| 623 | when the file name contains wildcard characters. | ||
| 624 | |||
| 625 | ** FFAP | ||
| 626 | |||
| 627 | +++ | ||
| 628 | *** New ffap commands and keybindings: C-x C-r (`ffap-read-only'), | ||
| 629 | C-x C-v (`ffap-alternate-file'), C-x C-d (`ffap-list-directory'), | ||
| 630 | C-x 4 r (`ffap-read-only-other-window'), C-x 4 d (`ffap-dired-other-window'), | ||
| 631 | C-x 5 r (`ffap-read-only-other-frame'), C-x 5 d (`ffap-dired-other-frame'). | ||
| 632 | |||
| 633 | --- | ||
| 634 | *** FFAP accepts wildcards in a file name by default. C-x C-f passes | ||
| 635 | it to `find-file' with non-nil WILDCARDS argument, which visits | ||
| 636 | multiple files, and C-x d passes it to `dired'. | ||
| 637 | |||
| 599 | ** Info mode: | 638 | ** Info mode: |
| 600 | 639 | ||
| 601 | *** A numeric prefix argument of `info' selects an Info buffer | 640 | *** A numeric prefix argument of `info' selects an Info buffer |
| @@ -1064,6 +1103,12 @@ All regular expression replacement commands now allow `\?' in the | |||
| 1064 | replacement string to specify a position where the replacement string | 1103 | replacement string to specify a position where the replacement string |
| 1065 | can be edited for each replacement. | 1104 | can be edited for each replacement. |
| 1066 | 1105 | ||
| 1106 | ** query-replace uses isearch lazy highlighting when the new user option | ||
| 1107 | `query-replace-lazy-highlight' is non-nil. | ||
| 1108 | |||
| 1109 | ** The current match in query-replace is highlighted in new face | ||
| 1110 | `query-replace' which by default inherits from isearch face. | ||
| 1111 | |||
| 1067 | +++ | 1112 | +++ |
| 1068 | ** Emacs normally highlights mouse sensitive text whenever the mouse | 1113 | ** Emacs normally highlights mouse sensitive text whenever the mouse |
| 1069 | is over the text. By setting the new variable `mouse-highlight', you | 1114 | is over the text. By setting the new variable `mouse-highlight', you |
| @@ -1368,7 +1413,10 @@ you hit M-C-SPC (mark-sexp), M-@ (mark-word), M-h (mark-paragraph), or | |||
| 1368 | C-M-h (mark-defun) repeatedly, the marked region extends each time, so | 1413 | C-M-h (mark-defun) repeatedly, the marked region extends each time, so |
| 1369 | you can mark the next two sexps with M-C-SPC M-C-SPC, for example. | 1414 | you can mark the next two sexps with M-C-SPC M-C-SPC, for example. |
| 1370 | This feature also works for mark-end-of-sentence, if you bind that to | 1415 | This feature also works for mark-end-of-sentence, if you bind that to |
| 1371 | a key. | 1416 | a key. It also extends the region when the mark is active in Transient |
| 1417 | Mark mode, regardless of the last command. To start a new region with | ||
| 1418 | one of marking commands in Transient Mark mode, you can deactivate the | ||
| 1419 | active region with C-g, or set the new mark with C-SPC. | ||
| 1372 | 1420 | ||
| 1373 | +++ | 1421 | +++ |
| 1374 | ** Some commands do something special in Transient Mark mode when the | 1422 | ** Some commands do something special in Transient Mark mode when the |
| @@ -1393,6 +1441,10 @@ C-g. | |||
| 1393 | previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the | 1441 | previous mark, i.e. C-u C-SPC C-SPC C-SPC ... cycles through the |
| 1394 | mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. | 1442 | mark ring. Use C-u C-u C-SPC to set the mark immediately after a jump. |
| 1395 | 1443 | ||
| 1444 | ** Movement commands `beginning-of-buffer', `end-of-buffer', | ||
| 1445 | `beginning-of-defun', `end-of-defun' do not set the mark if the mark | ||
| 1446 | is already active in Transient Mark mode. | ||
| 1447 | |||
| 1396 | +++ | 1448 | +++ |
| 1397 | ** In the *Occur* buffer, `o' switches to it in another window, and | 1449 | ** In the *Occur* buffer, `o' switches to it in another window, and |
| 1398 | C-o displays the current line's occurrence in another window without | 1450 | C-o displays the current line's occurrence in another window without |
| @@ -2338,6 +2390,39 @@ configuration files. | |||
| 2338 | 2390 | ||
| 2339 | * Lisp Changes in Emacs 21.4 | 2391 | * Lisp Changes in Emacs 21.4 |
| 2340 | 2392 | ||
| 2393 | ** Lisp code can now test if a given buffer position is inside a | ||
| 2394 | clickable link with the new function `mouse-on-link-p'. This is the | ||
| 2395 | function used by the new `mouse-1-click-follows-link' functionality. | ||
| 2396 | |||
| 2397 | +++ | ||
| 2398 | ** (while-no-input BODY...) runs BODY, but only so long as no input | ||
| 2399 | arrives. If the user types or clicks anything, BODY stops as if a | ||
| 2400 | quit had occurred. while-no-input returns the value of BODY, if BODY | ||
| 2401 | finishes. It returns nil if BODY was aborted. | ||
| 2402 | |||
| 2403 | +++ | ||
| 2404 | ** `set-auto-mode' now gives the interpreter magic line (if present) | ||
| 2405 | precedence over the file name. Likewise an <?xml or <!DOCTYPE declaration | ||
| 2406 | will give the buffer XML or SGML mode, based on the new var | ||
| 2407 | `magic-mode-alist'. | ||
| 2408 | |||
| 2409 | +++ | ||
| 2410 | ** New function `looking-back' checks whether a regular expression matches | ||
| 2411 | the text before point. Specifying the LIMIT argument bounds how far | ||
| 2412 | back the match can start; this is a way to keep it from taking too long. | ||
| 2413 | |||
| 2414 | +++ | ||
| 2415 | ** New functions `make-progress-reporter', `progress-reporter-update', | ||
| 2416 | `progress-reporter-force-update' and `progress-reporter-done' provide | ||
| 2417 | a simple and efficient way for a command to present progress messages | ||
| 2418 | for the user. | ||
| 2419 | |||
| 2420 | --- | ||
| 2421 | ** To manipulate the File menu using easy-menu, you must specify the | ||
| 2422 | proper name "file". In previous Emacs versions, you had to specify | ||
| 2423 | "files", even though the menu item itself was changed to say "File" | ||
| 2424 | several versions ago. | ||
| 2425 | |||
| 2341 | +++ | 2426 | +++ |
| 2342 | ** read-from-minibuffer now accepts an additional argument KEEP-ALL | 2427 | ** read-from-minibuffer now accepts an additional argument KEEP-ALL |
| 2343 | saying to put all inputs in the history list, even empty ones. | 2428 | saying to put all inputs in the history list, even empty ones. |
| @@ -2581,8 +2666,10 @@ strings by giving that character a non-nil `cursor' text property. | |||
| 2581 | around potentially blocking or long-running code in timers | 2666 | around potentially blocking or long-running code in timers |
| 2582 | and post-command-hooks. | 2667 | and post-command-hooks. |
| 2583 | 2668 | ||
| 2584 | ** An unconditional face specification in defface (one where the DISPLAY part | 2669 | ** The first face specification element in a defface can specify |
| 2585 | is just t) applies to all cases and does not override subsequent entries. | 2670 | `default' instead of frame classification. Then its attributes act as |
| 2671 | defaults that apply to all the subsequent cases (and may be overridden | ||
| 2672 | by them). | ||
| 2586 | 2673 | ||
| 2587 | +++ | 2674 | +++ |
| 2588 | ** New face attribute `min-colors' can be used to tailor the face color | 2675 | ** New face attribute `min-colors' can be used to tailor the face color |
| @@ -6448,9 +6535,8 @@ function was declared obsolete. | |||
| 6448 | ** Function `plist-member' is renamed from `widget-plist-member' (which is | 6535 | ** Function `plist-member' is renamed from `widget-plist-member' (which is |
| 6449 | retained as an alias). | 6536 | retained as an alias). |
| 6450 | 6537 | ||
| 6451 | ** Easy-menu's :filter now works as in XEmacs. | 6538 | ** Easy-menu's :filter now takes the unconverted form of the menu and |
| 6452 | It takes the unconverted (i.e. XEmacs) form of the menu and the result | 6539 | the result is automatically converted to Emacs' form. |
| 6453 | is automatically converted to Emacs' form. | ||
| 6454 | 6540 | ||
| 6455 | ** The new function `window-list' has been defined | 6541 | ** The new function `window-list' has been defined |
| 6456 | 6542 | ||
| @@ -15,6 +15,9 @@ to the FSF. | |||
| 15 | ought to be possible to omit text which is invisible (due to a | 15 | ought to be possible to omit text which is invisible (due to a |
| 16 | text-property, overlay, or selective display) from the kill-ring. | 16 | text-property, overlay, or selective display) from the kill-ring. |
| 17 | 17 | ||
| 18 | ** Redefine define-generic-mode as a macro, so the compiler | ||
| 19 | sees the definitions it generates. | ||
| 20 | |||
| 18 | * Important features: | 21 | * Important features: |
| 19 | 22 | ||
| 20 | ** Provide user-friendly ways to list all available font families, | 23 | ** Provide user-friendly ways to list all available font families, |
diff --git a/etc/e/eterm b/etc/e/eterm index 2658701660b..0fcb95170ee 100644 --- a/etc/e/eterm +++ b/etc/e/eterm | |||
| Binary files differ | |||
diff --git a/etc/e/eterm.ti b/etc/e/eterm.ti index 36576b4db6a..2b600df0a12 100644 --- a/etc/e/eterm.ti +++ b/etc/e/eterm.ti | |||
| @@ -50,6 +50,7 @@ eterm, | |||
| 50 | rmir=\E[4l, | 50 | rmir=\E[4l, |
| 51 | rmso=\E[27m, | 51 | rmso=\E[27m, |
| 52 | rmul=\E[24m, | 52 | rmul=\E[24m, |
| 53 | rs1=\Ec, | ||
| 53 | sc=\E7, | 54 | sc=\E7, |
| 54 | setab=\E[%p1%{40}%+%dm, | 55 | setab=\E[%p1%{40}%+%dm, |
| 55 | setaf=\E[%p1%{30}%+%dm, | 56 | setaf=\E[%p1%{30}%+%dm, |
| @@ -59,3 +60,4 @@ eterm, | |||
| 59 | smso=\E[7m, | 60 | smso=\E[7m, |
| 60 | # smcup=\E[?47h, | 61 | # smcup=\E[?47h, |
| 61 | # rmcup=\E[?47l, | 62 | # rmcup=\E[?47l, |
| 63 | # rs2 may need to be added | ||
diff --git a/lib-src/ChangeLog b/lib-src/ChangeLog index 994102f5a87..d913fbaf2c9 100644 --- a/lib-src/ChangeLog +++ b/lib-src/ChangeLog | |||
| @@ -1,3 +1,8 @@ | |||
| 1 | 2004-12-15 Andreas Schwab <schwab@suse.de> | ||
| 2 | |||
| 3 | * etags.c (main): Fix typo in conversion of LONG_OPTIONS from | ||
| 4 | preprocessing to compile time constant. | ||
| 5 | |||
| 1 | 2004-11-17 Kim F. Storm <storm@cua.dk> | 6 | 2004-11-17 Kim F. Storm <storm@cua.dk> |
| 2 | 7 | ||
| 3 | * etags.c: Undo last change. | 8 | * etags.c: Undo last change. |
diff --git a/lib-src/etags.c b/lib-src/etags.c index a6004a048a9..a06d29bfd11 100644 --- a/lib-src/etags.c +++ b/lib-src/etags.c | |||
| @@ -1,5 +1,5 @@ | |||
| 1 | /* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*- | 1 | /* Tags file maker to go with GNU Emacs -*- coding: latin-1 -*- |
| 2 | Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002 | 2 | Copyright (C) 1984, 1987-1989, 1993-1995, 1998-2001, 2002, 2004 |
| 3 | Free Software Foundation, Inc. and Ken Arnold | 3 | Free Software Foundation, Inc. and Ken Arnold |
| 4 | 4 | ||
| 5 | This file is not considered part of GNU Emacs. | 5 | This file is not considered part of GNU Emacs. |
| @@ -1183,7 +1183,7 @@ main (argc, argv) | |||
| 1183 | #ifdef ETAGS_REGEXPS | 1183 | #ifdef ETAGS_REGEXPS |
| 1184 | optstring = "-r:Rc:"; | 1184 | optstring = "-r:Rc:"; |
| 1185 | #endif /* ETAGS_REGEXPS */ | 1185 | #endif /* ETAGS_REGEXPS */ |
| 1186 | if (LONG_OPTIONS) | 1186 | if (!LONG_OPTIONS) |
| 1187 | optstring += 1; | 1187 | optstring += 1; |
| 1188 | optstring = concat (optstring, | 1188 | optstring = concat (optstring, |
| 1189 | "Cf:Il:o:SVhH", | 1189 | "Cf:Il:o:SVhH", |
diff --git a/lisp/ChangeLog b/lisp/ChangeLog index 3d3994cd248..2795cbf26d4 100644 --- a/lisp/ChangeLog +++ b/lisp/ChangeLog | |||
| @@ -1,8 +1,441 @@ | |||
| 1 | 2004-12-22 Kenichi Handa <handa@m17n.org> | ||
| 2 | |||
| 3 | * international/quail.el (quail-start-translation): Fix prompt | ||
| 4 | string for the case if input-method-use-echo-area being non-nil. | ||
| 5 | (quail-start-conversion): Likewise. | ||
| 6 | (quail-show-guidance): Don't show guidance if | ||
| 7 | input-method-use-echo-area is non-nil. | ||
| 8 | |||
| 9 | 2004-12-21 Richard M. Stallman <rms@gnu.org> | ||
| 10 | |||
| 11 | * textmodes/ispell.el (ispell-help): Bind resize-mini-windows. | ||
| 12 | |||
| 13 | 2004-12-21 Markus Rost <rost@ias.edu> | ||
| 14 | |||
| 15 | * calendar/diary-lib.el (mark-diary-entries): Set | ||
| 16 | mark-diary-entries-in-calendar only after checking for diary-file. | ||
| 17 | |||
| 18 | 2004-12-21 Richard M. Stallman <rms@gnu.org> | ||
| 19 | |||
| 20 | * faces.el (escape-glyph): Use blue against light foreground. | ||
| 21 | |||
| 22 | * simple.el (undo-outer-limit-truncate): New function. | ||
| 23 | (undo-outer-limit-function): Use undo-outer-limit-truncate. | ||
| 24 | |||
| 25 | 2004-12-21 Eli Barzilay <eli@barzilay.org> | ||
| 26 | |||
| 27 | * calculator.el: (calculator-radix-grouping-mode) | ||
| 28 | (calculator-radix-grouping-digits) | ||
| 29 | (calculator-radix-grouping-separator): | ||
| 30 | New defcustoms for the new radix grouping mode functionality. | ||
| 31 | (calculator-mode-hook): Now used in electric mode too. | ||
| 32 | (calculator-mode-map): Some new keys. | ||
| 33 | (calculator-message): New function. Some new calls. | ||
| 34 | (calculator-string-to-number): New function, | ||
| 35 | (calculator-curnum-value): Use it. | ||
| 36 | (calculator-rotate-displayer, calculator-rotate-displayer-back) | ||
| 37 | (calculator-displayer-prev, calculator-displayer-next): | ||
| 38 | Change digit group size when in radix mode. | ||
| 39 | (calculator-number-to-string): Renamed from calculator-num-to-string. | ||
| 40 | Now deals with digit grouping in radix mode. | ||
| 41 | |||
| 42 | 2004-12-20 Glenn Morris <gmorris@ast.cam.ac.uk> | ||
| 43 | |||
| 44 | * calendar/calendar.el (view-other-diary-entries): Add autoload. | ||
| 45 | * calendar/diary-lib.el (view-other-diary-entries): Use | ||
| 46 | current-prefix-arg in interactive spec. | ||
| 47 | |||
| 48 | 2004-12-19 Jay Belanger <belanger@truman.edu> | ||
| 49 | |||
| 50 | * calc/calc-aent.el (calcAlg-blank-matching-open): | ||
| 51 | Temporarily adjust the syntax of both delimiters of half-open | ||
| 52 | intervals. | ||
| 53 | |||
| 54 | 2004-12-19 Kim F. Storm <storm@cua.dk> | ||
| 55 | |||
| 56 | * mouse.el (mouse-1-click-follows-link): Doc fix. | ||
| 57 | |||
| 58 | 2004-12-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 59 | |||
| 60 | * term/mac-win.el (encoding-vector, mac-font-encoder-list) | ||
| 61 | (ccl-encode-mac-centraleurroman-font): Use centraleurroman | ||
| 62 | instead of centraleuropean as the name | ||
| 63 | |||
| 64 | 2004-12-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 65 | |||
| 66 | Sync with Tramp 2.0.46. | ||
| 67 | |||
| 68 | * net/tramp.el (tramp-maybe-send-perl-script): Change order of | ||
| 69 | parameters wrt Tramp convention. | ||
| 70 | (tramp-handle-file-attributes-with-perl) | ||
| 71 | (tramp-handle-directory-files-and-attributes): Apply it. | ||
| 72 | (tramp-do-copy-or-rename-file-out-of-band): Check for existence of | ||
| 73 | `copy-program'. Reported by Zack Weinberg | ||
| 74 | <zack@codesourcery.com>. | ||
| 75 | (top): Set `edebug-form-spec' property directly rather than | ||
| 76 | calling `def-edebug-spec'. | ||
| 77 | |||
| 78 | * net/tramp-smb.el (tramp-smb-advice-PC-do-completion): Make the | ||
| 79 | advice less fragile. Surround temporary redefinition of | ||
| 80 | `substitute-in-file-name' with `unwind-protect'. Suggested by | ||
| 81 | Matt Hodges <MPHodges@member.fsf.org>. | ||
| 82 | |||
| 83 | 2004-12-17 Juri Linkov <juri@jurta.org> | ||
| 84 | |||
| 85 | * replace.el (occur-accumulate-lines, occur-engine): | ||
| 86 | Make forcing deferred font-lock fontification jit-specific. | ||
| 87 | |||
| 88 | 2004-12-17 Kim F. Storm <storm@cua.dk> | ||
| 89 | |||
| 90 | * mouse.el (mouse-1-click-follows-link): New defcustom. | ||
| 91 | (mouse-on-link-p): New function. | ||
| 92 | (mouse-drag-region-1): Implement mouse-1-click-follows-link | ||
| 93 | functionality. Map a mouse-1 click event into a mouse-2 (or | ||
| 94 | other) event when position is inside a link. | ||
| 95 | |||
| 96 | * tooltip.el (tooltip-show-help-function): Replace "mouse-2" | ||
| 97 | prefix in tooltip text with "mouse-1" when this is a link | ||
| 98 | recognized by mouse-1-click-follows-link functionality. | ||
| 99 | |||
| 100 | * help.el (describe-key): Report effective and original binding | ||
| 101 | for mouse-1 when clicked on a link. | ||
| 102 | (describe-mode): Add follow-link property to "minor-mode" button. | ||
| 103 | |||
| 104 | * help-fns.el (describe-variable): Add follow-link property to | ||
| 105 | "below" button. | ||
| 106 | |||
| 107 | * help-mode.el (help-xref): Add follow-link property. | ||
| 108 | |||
| 109 | * apropos.el (apropos-symbol, apropos-function, apropos-macro) | ||
| 110 | (apropos-command, apropos-variable, apropos-face, apropos-group) | ||
| 111 | (apropos-widget, apropos-plist): Add follow-link property. | ||
| 112 | |||
| 113 | * pcvs-defs.el (cvs-mode-map): Map follow-link to a function which | ||
| 114 | checks if position is in a filename, rather than some other | ||
| 115 | clickable item. Function looks for cvs-filename-face at position. | ||
| 116 | |||
| 117 | * wid-edit.el (widget-specify-field, widget-specify-button): | ||
| 118 | Map a :follow-link keyword into a follow-link property. | ||
| 119 | (link): Add :follow-link keyword, map to RET binding. | ||
| 120 | |||
| 121 | * dired.el (dired-mode-map): Map follow-link to mouse-face. | ||
| 122 | |||
| 123 | * progmodes/compile.el (compilation-minor-mode-map) | ||
| 124 | (compilation-button-map, compilation-mode-map): Likewise. | ||
| 125 | |||
| 126 | 2004-12-17 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 127 | |||
| 128 | * play/zone.el (zone): Init `line-spacing' from orig buffer. | ||
| 129 | (zone-replace-char): Take `count' and `del-count' | ||
| 130 | instead of `direction'. Update callers. When `del-count' is | ||
| 131 | non-nil, delete that many characters, otherwise `count' characters | ||
| 132 | backwards. Insert the newly-replaced string `count' times. | ||
| 133 | (zone-fret): Handle chars w/ width greater than one. | ||
| 134 | (zone-fall-through-ws): No longer take window width `ww'. | ||
| 135 | Update callers. Add handling for `char-width' greater than one. | ||
| 136 | (zone-pgm-drip): Update var holding window-end position every cycle. | ||
| 137 | |||
| 138 | 2004-12-17 Andre Spiegel <spiegel@gnu.org> | ||
| 139 | |||
| 140 | * vc.el (vc-default-update-changelog): Use insert-file-contents, | ||
| 141 | rather than insert-file. | ||
| 142 | |||
| 143 | 2004-12-16 Jay Belanger <belanger@truman.edu> | ||
| 144 | |||
| 145 | * calc/calc-comb.el (var-RandSeed): Don't initially bind it. | ||
| 146 | (math-init-random-base, math-random-digit): Check to see if | ||
| 147 | var-RandSeed is bound. | ||
| 148 | (math-random-last): Declare it. | ||
| 149 | (math-random-digit): Don't make math-random-last local. | ||
| 150 | |||
| 151 | 2004-12-16 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 152 | |||
| 153 | * play/zone.el (zone): Fix omission bug: Use a self-disabling | ||
| 154 | one-shot thunk for uniform (error, quit, normal) recovery. | ||
| 155 | Reported by John Paul Wallington. | ||
| 156 | (zone-pgm-random-life): Fix bug: | ||
| 157 | Recognize empty initial field by lack of "@" chars. | ||
| 158 | |||
| 159 | 2004-12-16 Juri Linkov <juri@jurta.org> | ||
| 160 | |||
| 161 | * help.el (function-called-at-point): | ||
| 162 | * help-fns.el (variable-at-point): As a last resort try striping | ||
| 163 | non-word prefixes and suffixes. | ||
| 164 | |||
| 165 | * descr-text.el (describe-property-list): Don't treat syntax-table | ||
| 166 | specially. Use describe-text-sexp which inserts [show] button | ||
| 167 | for large objects and handles printing errors. Sort properties | ||
| 168 | by names in alphabetical order instead of by value sizes. | ||
| 169 | Add `mouse-face' to list of properties for `describe-face' widget. | ||
| 170 | (describe-char): Mask out face-id from 19 bits of character. | ||
| 171 | Print face-id separately. | ||
| 172 | |||
| 173 | * replace.el (occur-accumulate-lines, occur-engine): | ||
| 174 | Fontify unfontified matching lines in the source buffer | ||
| 175 | before copying them. | ||
| 176 | (occur-engine): Don't put mouse-face on context lines. | ||
| 177 | (occur-next-error): Set point to line beginning/end | ||
| 178 | before searching for prev/next property to skip multiple | ||
| 179 | matches on a line (not supported by occur engine). | ||
| 180 | Remove redundant prefix-numeric-value. | ||
| 181 | |||
| 182 | 2004-12-15 Juri Linkov <juri@jurta.org> | ||
| 183 | |||
| 184 | * replace.el (match): New face. | ||
| 185 | (list-matching-lines-face): Change default from `bold' to `match'. | ||
| 186 | |||
| 187 | * progmodes/grep.el (grep-match-face): New defvar. | ||
| 188 | (grep-mode-font-lock-keywords): Use grep-match-face instead of | ||
| 189 | compilation-column-face to highlight grep matches. | ||
| 190 | |||
| 191 | * apropos.el (apropos-match-face): Change default from | ||
| 192 | `secondary-selection' to `match'. | ||
| 193 | |||
| 194 | * info-look.el (info-lookup-highlight-face): Change default from | ||
| 195 | `highlight' to `match'. | ||
| 196 | |||
| 197 | 2004-12-15 Daniel Pfeiffer <occitan@esperanto.org> | ||
| 198 | |||
| 199 | * progmodes/executable.el (executable-interpret): Eliminate | ||
| 200 | obsolete compile-internal, and switch to comint for interaction. | ||
| 201 | |||
| 202 | 2004-12-15 J.D. Smith <jdsmith@as.arizona.edu> | ||
| 203 | |||
| 204 | * progmodes/idlwave.el (idlwave-skip-multi-commands): Don't match | ||
| 205 | `&&' when skipping multiple statements on a line. | ||
| 206 | |||
| 207 | 2004-12-15 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 208 | |||
| 209 | * play/zone.el (zone): Set `truncate-lines'. | ||
| 210 | Also, init `tab-width' with value from original buffer. | ||
| 211 | (zone-shift-up): Rewrite for speed. | ||
| 212 | (zone-shift-down, zone-shift-left, zone-shift-right): Likewise. | ||
| 213 | (zone-pgm-jitter): Remove redundant entries from ops vector. | ||
| 214 | (zone-exploding-remove): Reduce iteration count. | ||
| 215 | (zone-cpos): Convert to defsubst. | ||
| 216 | (zone-replace-char): New defsubst. | ||
| 217 | (zone-park/sit-for): Likewise. | ||
| 218 | (zone-fret): Take window-start arg. | ||
| 219 | Update callers. Use `zone-park/sit-for'. | ||
| 220 | (zone-fill-out-screen): Rewrite. | ||
| 221 | (zone-fall-through-ws): Likewise. Update callers. | ||
| 222 | (zone-pgm-drip): Use `zone-replace-char'. | ||
| 223 | Move var inits before while-loop. Use `zone-park/sit-for'. | ||
| 224 | (zone-pgm-random-life): Handle empty initial field. | ||
| 225 | Use `zone-replace-char' and `zone-park/sit-for'. | ||
| 226 | |||
| 227 | 2004-12-15 Juri Linkov <juri@jurta.org> | ||
| 228 | |||
| 229 | * isearch.el (isearch-update): Test isearch-lazy-highlight | ||
| 230 | before calling isearch-lazy-highlight-new-loop. | ||
| 231 | (isearch-lazy-highlight-new-loop): | ||
| 232 | Don't test isearch-lazy-highlight. | ||
| 233 | |||
| 234 | * replace.el (perform-replace): Add isearch-case-fold-search. | ||
| 235 | Use delimited-flag for isearch-regexp. | ||
| 236 | Reset isearch-lazy-highlight-last-string to force lazy | ||
| 237 | highlighting when called from isearch mode. | ||
| 238 | (query-replace-highlight): Revert defcustom type to boolean. | ||
| 239 | (query-replace-lazy-highlight): New defcustom. | ||
| 240 | (query-replace): New face. | ||
| 241 | (perform-replace, replace-highlight, replace-dehighlight): | ||
| 242 | Test query-replace-lazy-highlight instead of special value | ||
| 243 | `isearch' of query-replace-highlight. | ||
| 244 | (replace-dehighlight): Don't call isearch-dehighlight. | ||
| 245 | (replace-highlight): Don't call isearch-highlight. | ||
| 246 | Use face `query-replace' unconditionally. | ||
| 247 | |||
| 248 | 2004-12-14 Kim F. Storm <storm@cua.dk> | ||
| 249 | |||
| 250 | * simple.el (inhibit-mark-movement): Remove defvar. | ||
| 251 | (beginning-of-buffer, end-of-buffer): Don't use it. | ||
| 252 | |||
| 253 | * emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): Don't | ||
| 254 | use inhibit-mark-movement. | ||
| 255 | |||
| 256 | * emulation/cua-base.el (cua--preserve-mark-commands): Remove. | ||
| 257 | (cua--undo-push-mark): Remove. | ||
| 258 | (cua--pre-command-handler, cua--post-command-handler): Don't | ||
| 259 | fiddle with inhibit-mark-movement. | ||
| 260 | |||
| 261 | 2004-12-14 Juri Linkov <juri@jurta.org> | ||
| 262 | |||
| 263 | * buff-menu.el (list-buffers-noselect): Collect internal info | ||
| 264 | for every buffer in BUFFER-LIST arg too. | ||
| 265 | (Buffer-menu-switch-other-window): Bind pop-up-windows to t. | ||
| 266 | (Buffer-menu-switch-other-window, Buffer-menu-2-window): | ||
| 267 | Bind same-window-buffer-names and same-window-regexps to nil. | ||
| 268 | |||
| 269 | 2004-12-13 Juri Linkov <juri@jurta.org> | ||
| 270 | |||
| 271 | * simple.el (next-error-buffer-p, next-error-find-buffer): | ||
| 272 | Doc fix. | ||
| 273 | |||
| 274 | * mail/supercite.el (sc-cite-frame-alist): Doc fix. | ||
| 275 | (sc-cite-region, sc-uncite-region, sc-recite-region): | ||
| 276 | Fix previous change to handle not alist as a symbol, but | ||
| 277 | a citation frame as a symbol that represents a variable name. | ||
| 278 | |||
| 279 | 2004-12-13 Richard M. Stallman <rms@gnu.org> | ||
| 280 | |||
| 281 | * filecache.el (file-cache-add-directory-using-find): | ||
| 282 | Only set up file-cache-find-command-posix-flag if we will use it. | ||
| 283 | |||
| 284 | * bindings.el (mode-line-buffer-identification-keymap): | ||
| 285 | Don't cancel the mode-line's usual down-mouse-1 binding. | ||
| 286 | |||
| 287 | * cus-edit.el (custom-face-selected): Handle `default' specs. | ||
| 288 | (custom-face-edit): Increase extra-offset. | ||
| 289 | (custom-display): Handle `default' specs. | ||
| 290 | |||
| 291 | * xml.el (xml-name-re, xml-entity-value-re): Add defvars. | ||
| 292 | |||
| 293 | * emacs-lisp/elint.el (elint-standard-variables) | ||
| 294 | (elint-unknown-builtin-args): Move definitions up. | ||
| 295 | |||
| 296 | * net/browse-url.el (browse-url-url-at-point): Add autoload. | ||
| 297 | |||
| 298 | * info.el (info-xref-visited): Use `default' instead of t. | ||
| 299 | (Info-try-follow-nearest-node): Don't explicitly load browse-url. | ||
| 300 | |||
| 301 | * faces.el (header-line, mode-line-inactive, tool-bar): | ||
| 302 | Use `default' instead of t for setting the defaults. | ||
| 303 | (face-spec-choose): Separate `t' from `default'. | ||
| 304 | |||
| 305 | * subr.el (while-no-input): New macro. | ||
| 306 | |||
| 307 | 2004-12-13 Frederik Fouvry <fouvry@CoLi.Uni-SB.DE> (tiny change) | ||
| 308 | |||
| 309 | * filecache.el (file-cache-add-directory-using-find): | ||
| 310 | Only test file-cache-find-command-posix-flag on some systems. | ||
| 311 | |||
| 312 | 2004-12-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 313 | |||
| 314 | * vc-svn.el (vc-svn-repository-hostname): Adjust to new format. | ||
| 315 | Reported by Ville Skytt,Ad(B <scop@xemacs.org>. | ||
| 316 | (vc-svn-annotate-current-time, vc-svn-annotate-time-of-rev) | ||
| 317 | (vc-svn-annotate-time, vc-svn-annotate-extract-revision-at-line) | ||
| 318 | (vc-svn-annotate-command, vc-svn-annotate-re): Support for svn annotate. | ||
| 319 | |||
| 320 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 321 | |||
| 322 | * files.el (find-file-other-window, find-file-other-frame): | ||
| 323 | Add the first buffer to the returned value to return the complete | ||
| 324 | list of all visited buffers. | ||
| 325 | (find-file-read-only, find-file-read-only-other-window) | ||
| 326 | (find-file-read-only-other-frame): Use nil for `mustmatch' arg of | ||
| 327 | `find-file-read-args'. Signal an error about non-existent file | ||
| 328 | only if file name doesn't contain wildcards. Toggle read-only in | ||
| 329 | all visited buffers. | ||
| 330 | (find-alternate-file, find-alternate-file-other-window): | ||
| 331 | Add optional arg `wildcards'. Doc fix. Set `wildcards' to t when | ||
| 332 | called interactively. Pass arg `wildcards' to other functions. | ||
| 333 | (find-file-noselect): Doc fix. | ||
| 334 | |||
| 335 | * ffap.el (ffap-dired-wildcards): Set default to "[*?][^/]*\\'". | ||
| 336 | Doc fix. | ||
| 337 | (ffap-directory-finder): New variable. | ||
| 338 | (ffap-string-at-point-mode-alist): Add * and ? to `file'. | ||
| 339 | (ffap-file-at-point): Add /* to immediately rejected names. | ||
| 340 | Return absolute file names matching ffap-dired-wildcards. | ||
| 341 | (ffap-read-file-or-url): Set default value for `completing-read' | ||
| 342 | to `buffer-file-name'. | ||
| 343 | (find-file-at-point): When filename matches ffap-dired-wildcards, | ||
| 344 | call ffap-file-finder with t arg `wildcards', instead of dired. | ||
| 345 | (ffap-other-window, ffap-other-frame): Return visited buffers. | ||
| 346 | (ffap-read-only, ffap-read-only-other-window) | ||
| 347 | (ffap-read-only-other-frame, ffap-alternate-file): New commands. | ||
| 348 | (dired-at-point): Call ffap-directory-finder instead of dired. | ||
| 349 | (ffap-dired-other-window, ffap-dired-other-frame) | ||
| 350 | (ffap-list-directory): New commands. | ||
| 351 | (ffap-bindings): New keybindings for new commands. | ||
| 352 | |||
| 353 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 354 | |||
| 355 | * simple.el (beginning-of-buffer, end-of-buffer): | ||
| 356 | * emacs-lisp/lisp.el (beginning-of-defun, end-of-defun): | ||
| 357 | Do not push mark when mark is active in transient-mark-mode. | ||
| 358 | |||
| 359 | * simple.el (mark-word): | ||
| 360 | * emacs-lisp/lisp.el (mark-sexp, mark-defun): | ||
| 361 | * textmodes/paragraphs.el (mark-paragraph): | ||
| 362 | Extend the region when mark is active in transient-mark-mode, | ||
| 363 | regardless of the last command. Doc fix. | ||
| 364 | |||
| 365 | * simple.el (mark-word): Preserve direction when repeating. | ||
| 366 | Make arg optional. Interactive "p" -> "P". | ||
| 367 | (transient-mark-mode, inhibit-mark-movement): Doc fix. | ||
| 368 | |||
| 369 | * emacs-lisp/lisp.el (mark-sexp): Reverse the condition for | ||
| 370 | preserving direction, to mark forward instead of backward when mark | ||
| 371 | is equal to point (e.g. when C-SPC C-M-SPC is typed in t-m-m). | ||
| 372 | |||
| 373 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 374 | |||
| 375 | * isearch.el (isearch-edit-string): Set 7th arg of | ||
| 376 | `read-from-minibuffer' to `t' to inherit the current input | ||
| 377 | method (whose name is indicated by [IM] in the minibuffer prompt) | ||
| 378 | from the current buffer to the minibuffer. | ||
| 379 | (isearch-lazy-highlight-update): Put body to `with-local-quit' | ||
| 380 | to allow C-g quitting for lazy highlighting looping inside the | ||
| 381 | search with nested repetition operators. Add overlay to the list | ||
| 382 | before setting its face and other properties to avoid the case of | ||
| 383 | code quitting after placing the new overlay but before it's | ||
| 384 | recorded on the list. Select the window where isearch was | ||
| 385 | activated, to highlight matches in the right window when isearch | ||
| 386 | switches the current window to the minibuffer. | ||
| 387 | |||
| 388 | * international/isearch-x.el | ||
| 389 | (isearch-process-search-multibyte-characters): | ||
| 390 | Use `isearch-message' as initial input for `read-string' instead | ||
| 391 | of adding it to the minibuffer prompt. After reading a string | ||
| 392 | remove the initial value of `isearch-message' from the string. | ||
| 393 | |||
| 394 | * replace.el (replace-match-maybe-edit): Doc fix. | ||
| 395 | (perform-replace): Don't call `replace-highlight' when automatic | ||
| 396 | replacement is requested in literal mode, since it is intended | ||
| 397 | only to highlight words during entering a new replacement string | ||
| 398 | for \? in non-literal mode. | ||
| 399 | |||
| 400 | * replace.el (query-replace-highlight): Add new value `isearch' | ||
| 401 | that allows query replacement to use isearch highlighting. | ||
| 402 | Change type from `boolean' to `choice'. Doc fix. | ||
| 403 | (replace-highlight, replace-dehighlight, perform-replace): | ||
| 404 | Use isearch highlighting if query-replace-highlight eq `isearch'. | ||
| 405 | |||
| 406 | 2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 407 | |||
| 408 | * emacs-lisp/checkdoc.el (checkdoc-continue, checkdoc-comments) | ||
| 409 | (checkdoc-message-text, checkdoc-defun): Fix format messages for `error'. | ||
| 410 | |||
| 411 | * textmodes/tex-mode.el (latex-backward-sexp-1): Handle the special | ||
| 412 | case of \end{verbatim}. | ||
| 413 | |||
| 414 | 2004-12-11 Dan Nicolaescu <dann@ics.uci.edu> | ||
| 415 | |||
| 416 | * term.el (term-termcap-format): Synchronyze with terminfo. | ||
| 417 | (term-emulate-terminal): Handle reset. | ||
| 418 | (term-reset-terminal): New function. | ||
| 419 | |||
| 420 | 2004-12-11 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 421 | |||
| 422 | * play/zone.el (zone-programs): Add `zone-pgm-random-life'. | ||
| 423 | (zone-fill-out-screen): New func. | ||
| 424 | (zone-pgm-drip): Use `zone-fill-out-screen'. | ||
| 425 | Also, no longer go to point-min on every cycle. | ||
| 426 | (zone-pgm-paragraph-spaz): Allow spazzing for texinfo-mode. | ||
| 427 | (zone-pgm-random-life-wait): New user var. | ||
| 428 | (zone-pgm-random-life): New func. | ||
| 429 | |||
| 430 | 2004-12-10 Thien-Thi Nguyen <ttn@gnu.org> | ||
| 431 | |||
| 432 | * files.el (auto-mode-alist): Map .com to DCL mode. | ||
| 433 | |||
| 1 | 2004-12-09 Richard M. Stallman <rms@gnu.org> | 434 | 2004-12-09 Richard M. Stallman <rms@gnu.org> |
| 2 | 435 | ||
| 3 | * isearch.el (isearch-mode-map): Treat S-SPC like SPC. | 436 | * isearch.el (isearch-mode-map): Treat S-SPC like SPC. |
| 4 | 437 | ||
| 5 | 2004-12-10 Nick Roberts <nickrob@snap.net.nz> | 438 | 2004-12-09 Nick Roberts <nickrob@snap.net.nz> |
| 6 | 439 | ||
| 7 | * xt-mouse.el (xterm-mouse-event): Correct cursor position in a | 440 | * xt-mouse.el (xterm-mouse-event): Correct cursor position in a |
| 8 | buffer with a display margin. | 441 | buffer with a display margin. |
| @@ -41,10 +474,9 @@ | |||
| 41 | * edmacro.el: `edit-kbd-macro' is now bound to `C-x C-k e'. | 474 | * edmacro.el: `edit-kbd-macro' is now bound to `C-x C-k e'. |
| 42 | (edmacro-finish-edit): Further update for keyboard macros that are | 475 | (edmacro-finish-edit): Further update for keyboard macros that are |
| 43 | lambda forms. | 476 | lambda forms. |
| 44 | (edmacro-sanitize-for-string): Correctly remove Meta modifier | 477 | (edmacro-sanitize-for-string): Correctly remove Meta modifier. |
| 45 | (as suggested by Kim Storm). | ||
| 46 | 478 | ||
| 47 | 2004-12-06 Stefan Monnier <monnier@iro.umontreal.ca> | 479 | 2004-12-07 Stefan Monnier <monnier@iro.umontreal.ca> |
| 48 | 480 | ||
| 49 | * font-lock.el (font-lock-unfontify-region): Save buffer state. | 481 | * font-lock.el (font-lock-unfontify-region): Save buffer state. |
| 50 | (font-lock-default-unfontify-region): Don't save buffer state any more. | 482 | (font-lock-default-unfontify-region): Don't save buffer state any more. |
| @@ -7889,7 +8321,115 @@ | |||
| 7889 | (compilation-forget-errors): Don't localize already local | 8321 | (compilation-forget-errors): Don't localize already local |
| 7890 | compilation-locs and remove FIXME about refontifying. | 8322 | compilation-locs and remove FIXME about refontifying. |
| 7891 | 8323 | ||
| 7892 | 2004-04-14 | 8324 | 2004-04-14 Kim F. Storm <storm@cua.dk> |
| 8325 | |||
| 8326 | * startup.el (emacs-quick-startup): New defvar (set by -Q). | ||
| 8327 | (command-line): New option -Q. Like -q --no-site-file, but | ||
| 8328 | in addition it also disables menu-bar, tool-bar, scroll-bars, | ||
| 8329 | tool-tips, and the blinking cursor. | ||
| 8330 | (command-line-1): Skip startup screen if -Q. | ||
| 8331 | (fancy-splash-head): Use ":align-to center" prop to center splash image. | ||
| 8332 | |||
| 8333 | * emulation/cua-base.el (cua-read-only-cursor-color) | ||
| 8334 | (cua-overwrite-cursor-color, cua-global-mark-cursor-color): Doc fix. | ||
| 8335 | |||
| 8336 | 2004-04-13 Dave Love <fx@gnu.org> | ||
| 8337 | |||
| 8338 | * progmodes/python.el: Doc fixes. Changes for compiler warnings. | ||
| 8339 | (syntax): Don't require. | ||
| 8340 | (python) <defgroup>: Add :version. | ||
| 8341 | (python-quote-syntax): Re-written. | ||
| 8342 | (inferior-python-mode): Move stuff here from run-python and add | ||
| 8343 | some more. | ||
| 8344 | (python-preoutput-continuation, python-preoutput-result) | ||
| 8345 | (python-dotty-syntax-table): New. | ||
| 8346 | (python-describe-symbol): Use them. | ||
| 8347 | (run-python): Move stuff to inferior-python-mode. Modify code | ||
| 8348 | loaded into Python. | ||
| 8349 | (python-send-region): Use python-proc, python-send-string. | ||
| 8350 | (python-send-string): Send newlines too. Callers changed. | ||
| 8351 | (python-load-file): Re-written. | ||
| 8352 | (python-eldoc-function): New. | ||
| 8353 | (info-look): Don't require. | ||
| 8354 | (python-after-info-look): New. A modified version of former | ||
| 8355 | top-level code for use with eval-after-load. | ||
| 8356 | (python-maybe-jython, python-guess-indent): Use widened buffer. | ||
| 8357 | (python-fill-paragraph): Re-written. | ||
| 8358 | (python-mode): Fix outline-regexp. Set outline-heading-end-regexp, | ||
| 8359 | eldoc-print-current-symbol-info-function. Add to eldoc-mode-hook. | ||
| 8360 | |||
| 8361 | 2004-04-13 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8362 | |||
| 8363 | * progmodes/python.el (run-python): Use compilation-shell-minor-mode. | ||
| 8364 | Set compilation-error-regexp-alist earlier. | ||
| 8365 | |||
| 8366 | * progmodes/compile.el (compilation-minor-mode-map) | ||
| 8367 | (compilation-shell-minor-mode-map, compile-mouse-goto-error) | ||
| 8368 | (compile-goto-error): Re-merge the mouse and non-mouse commands. | ||
| 8369 | |||
| 8370 | 2004-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8371 | |||
| 8372 | * progmodes/compile.el (compile-goto-error): Select the buffer/window | ||
| 8373 | corresponding to the event. | ||
| 8374 | |||
| 8375 | 2004-04-12 Joe Buehler <jbuehler@hekiman.com> | ||
| 8376 | |||
| 8377 | * loadup.el: Add cygwin to system-type list, for unexec() support. | ||
| 8378 | |||
| 8379 | 2004-04-12 John Paul Wallington <jpw@gnu.org> | ||
| 8380 | |||
| 8381 | * ibuffer.el (ibuffer-delete-window-on-quit): Remove. | ||
| 8382 | (ibuffer-restore-window-config-on-quit): New variable to replace | ||
| 8383 | `ibuffer-delete-window-on-quit'. Update all references. | ||
| 8384 | (ibuffer-prev-window-config): New variable. | ||
| 8385 | (ibuffer-quit): Restore previous window configuration instead of | ||
| 8386 | deleting window. | ||
| 8387 | (ibuffer): Save window configuration before showing Ibuffer buffer. | ||
| 8388 | |||
| 8389 | * help.el (describe-mode): Doc fix. | ||
| 8390 | |||
| 8391 | 2004-04-12 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 8392 | |||
| 8393 | * progmodes/compile.el (compilation-mode-font-lock-keywords): Fix test | ||
| 8394 | not to treat nil as a function. | ||
| 8395 | |||
| 8396 | * vc-arch.el (vc-arch-root): Be a bit more careful. | ||
| 8397 | (vc-arch-register): Save the buffer if we modified it. | ||
| 8398 | (vc-arch-delete-rej-if-obsolete): Save excursion. | ||
| 8399 | (vc-arch-find-file-hook): Use the simpler after-save-hook. | ||
| 8400 | (vc-arch-responsible-p, vc-arch-init-version): New functions. | ||
| 8401 | |||
| 8402 | * net/ldap.el (ldap-search): Use list*. | ||
| 8403 | |||
| 8404 | 2004-04-12 Juri Linkov <juri@jurta.org> | ||
| 8405 | |||
| 8406 | * info.el (Info-follow-reference): Allow multiline reference name. | ||
| 8407 | |||
| 8408 | 2004-04-11 Dave Love <fx@gnu.org> | ||
| 8409 | |||
| 8410 | * emacs-lisp/bytecomp.el (byte-compile-cond): Fix last change. | ||
| 8411 | |||
| 8412 | * progmodes/python.el: New file. | ||
| 8413 | |||
| 8414 | 2004-04-11 Andre Spiegel <spiegel@gnu.org> | ||
| 8415 | |||
| 8416 | * vc-hooks.el (vc-arg-list): Function removed. | ||
| 8417 | (vc-default-workfile-unchanged-p): Use condition-case to check for | ||
| 8418 | backward compatibility. | ||
| 8419 | |||
| 8420 | * vc.el (vc-print-log): Use condition-case to check for backward | ||
| 8421 | compatibility. | ||
| 8422 | |||
| 8423 | 2004-04-11 Juri Linkov <juri@jurta.org> | ||
| 8424 | |||
| 8425 | * dired.el (dired-faces): New defgroup. | ||
| 8426 | (dired-header, dired-mark, dired-marked, dired-flagged) | ||
| 8427 | (dired-warning, dired-directory, dired-symlink, dired-ignored): | ||
| 8428 | New faces. | ||
| 8429 | (dired-header-face, dired-mark-face, dired-marked-face) | ||
| 8430 | (dired-flagged-face, dired-warning-face, dired-directory-face) | ||
| 8431 | (dired-symlink-face, dired-ignored-face): New face variables. | ||
| 8432 | (dired-font-lock-keywords): Use them instead of font-lock faces. | ||
| 7893 | Split the rule for dired marks into 3 separate rules: for marks, | 8433 | Split the rule for dired marks into 3 separate rules: for marks, |
| 7894 | marked file names and flagged file names. | 8434 | marked file names and flagged file names. |
| 7895 | 8435 | ||
diff --git a/lisp/apropos.el b/lisp/apropos.el index 8bfaa3ad592..1befefe8814 100644 --- a/lisp/apropos.el +++ b/lisp/apropos.el | |||
| @@ -96,7 +96,7 @@ turns off mouse highlighting." | |||
| 96 | :group 'apropos | 96 | :group 'apropos |
| 97 | :type 'face) | 97 | :type 'face) |
| 98 | 98 | ||
| 99 | (defcustom apropos-match-face 'secondary-selection | 99 | (defcustom apropos-match-face 'match |
| 100 | "*Face for matching text in Apropos documentation/value, or nil for none. | 100 | "*Face for matching text in Apropos documentation/value, or nil for none. |
| 101 | This applies when you look for matches in the documentation or variable value | 101 | This applies when you look for matches in the documentation or variable value |
| 102 | for the regexp; the part that matches gets displayed in this font." | 102 | for the regexp; the part that matches gets displayed in this font." |
| @@ -163,6 +163,7 @@ term, and the rest of the words are alternative terms.") | |||
| 163 | (define-button-type 'apropos-symbol | 163 | (define-button-type 'apropos-symbol |
| 164 | 'face apropos-symbol-face | 164 | 'face apropos-symbol-face |
| 165 | 'help-echo "mouse-2, RET: Display more help on this symbol" | 165 | 'help-echo "mouse-2, RET: Display more help on this symbol" |
| 166 | 'follow-link t | ||
| 166 | 'action #'apropos-symbol-button-display-help | 167 | 'action #'apropos-symbol-button-display-help |
| 167 | 'skip t) | 168 | 'skip t) |
| 168 | 169 | ||
| @@ -174,19 +175,24 @@ term, and the rest of the words are alternative terms.") | |||
| 174 | 175 | ||
| 175 | (define-button-type 'apropos-function | 176 | (define-button-type 'apropos-function |
| 176 | 'apropos-label "Function" | 177 | 'apropos-label "Function" |
| 178 | 'help-echo "mouse-2, RET: Display more help on this function" | ||
| 179 | 'follow-link t | ||
| 177 | 'action (lambda (button) | 180 | 'action (lambda (button) |
| 178 | (describe-function (button-get button 'apropos-symbol))) | 181 | (describe-function (button-get button 'apropos-symbol)))) |
| 179 | 'help-echo "mouse-2, RET: Display more help on this function") | 182 | |
| 180 | (define-button-type 'apropos-macro | 183 | (define-button-type 'apropos-macro |
| 181 | 'apropos-label "Macro" | 184 | 'apropos-label "Macro" |
| 185 | 'help-echo "mouse-2, RET: Display more help on this macro" | ||
| 186 | 'follow-link t | ||
| 182 | 'action (lambda (button) | 187 | 'action (lambda (button) |
| 183 | (describe-function (button-get button 'apropos-symbol))) | 188 | (describe-function (button-get button 'apropos-symbol)))) |
| 184 | 'help-echo "mouse-2, RET: Display more help on this macro") | 189 | |
| 185 | (define-button-type 'apropos-command | 190 | (define-button-type 'apropos-command |
| 186 | 'apropos-label "Command" | 191 | 'apropos-label "Command" |
| 192 | 'help-echo "mouse-2, RET: Display more help on this command" | ||
| 193 | 'follow-link t | ||
| 187 | 'action (lambda (button) | 194 | 'action (lambda (button) |
| 188 | (describe-function (button-get button 'apropos-symbol))) | 195 | (describe-function (button-get button 'apropos-symbol)))) |
| 189 | 'help-echo "mouse-2, RET: Display more help on this command") | ||
| 190 | 196 | ||
| 191 | ;; We used to use `customize-variable-other-window' instead for a | 197 | ;; We used to use `customize-variable-other-window' instead for a |
| 192 | ;; customizable variable, but that is slow. It is better to show an | 198 | ;; customizable variable, but that is slow. It is better to show an |
| @@ -196,18 +202,21 @@ term, and the rest of the words are alternative terms.") | |||
| 196 | (define-button-type 'apropos-variable | 202 | (define-button-type 'apropos-variable |
| 197 | 'apropos-label "Variable" | 203 | 'apropos-label "Variable" |
| 198 | 'help-echo "mouse-2, RET: Display more help on this variable" | 204 | 'help-echo "mouse-2, RET: Display more help on this variable" |
| 205 | 'follow-link t | ||
| 199 | 'action (lambda (button) | 206 | 'action (lambda (button) |
| 200 | (describe-variable (button-get button 'apropos-symbol)))) | 207 | (describe-variable (button-get button 'apropos-symbol)))) |
| 201 | 208 | ||
| 202 | (define-button-type 'apropos-face | 209 | (define-button-type 'apropos-face |
| 203 | 'apropos-label "Face" | 210 | 'apropos-label "Face" |
| 204 | 'help-echo "mouse-2, RET: Display more help on this face" | 211 | 'help-echo "mouse-2, RET: Display more help on this face" |
| 212 | 'follow-link t | ||
| 205 | 'action (lambda (button) | 213 | 'action (lambda (button) |
| 206 | (describe-face (button-get button 'apropos-symbol)))) | 214 | (describe-face (button-get button 'apropos-symbol)))) |
| 207 | 215 | ||
| 208 | (define-button-type 'apropos-group | 216 | (define-button-type 'apropos-group |
| 209 | 'apropos-label "Group" | 217 | 'apropos-label "Group" |
| 210 | 'help-echo "mouse-2, RET: Display more help on this group" | 218 | 'help-echo "mouse-2, RET: Display more help on this group" |
| 219 | 'follow-link t | ||
| 211 | 'action (lambda (button) | 220 | 'action (lambda (button) |
| 212 | (customize-group-other-window | 221 | (customize-group-other-window |
| 213 | (button-get button 'apropos-symbol)))) | 222 | (button-get button 'apropos-symbol)))) |
| @@ -215,12 +224,14 @@ term, and the rest of the words are alternative terms.") | |||
| 215 | (define-button-type 'apropos-widget | 224 | (define-button-type 'apropos-widget |
| 216 | 'apropos-label "Widget" | 225 | 'apropos-label "Widget" |
| 217 | 'help-echo "mouse-2, RET: Display more help on this widget" | 226 | 'help-echo "mouse-2, RET: Display more help on this widget" |
| 227 | 'follow-link t | ||
| 218 | 'action (lambda (button) | 228 | 'action (lambda (button) |
| 219 | (widget-browse-other-window (button-get button 'apropos-symbol)))) | 229 | (widget-browse-other-window (button-get button 'apropos-symbol)))) |
| 220 | 230 | ||
| 221 | (define-button-type 'apropos-plist | 231 | (define-button-type 'apropos-plist |
| 222 | 'apropos-label "Plist" | 232 | 'apropos-label "Plist" |
| 223 | 'help-echo "mouse-2, RET: Display more help on this plist" | 233 | 'help-echo "mouse-2, RET: Display more help on this plist" |
| 234 | 'follow-link t | ||
| 224 | 'action (lambda (button) | 235 | 'action (lambda (button) |
| 225 | (apropos-describe-plist (button-get button 'apropos-symbol)))) | 236 | (apropos-describe-plist (button-get button 'apropos-symbol)))) |
| 226 | 237 | ||
diff --git a/lisp/bindings.el b/lisp/bindings.el index a85c0948f65..fb5f1125d95 100644 --- a/lisp/bindings.el +++ b/lisp/bindings.el | |||
| @@ -448,7 +448,6 @@ Menu of mode operations in the mode line.") | |||
| 448 | (let ((map (make-sparse-keymap))) | 448 | (let ((map (make-sparse-keymap))) |
| 449 | ;; Bind down- events so that the global keymap won't ``shine | 449 | ;; Bind down- events so that the global keymap won't ``shine |
| 450 | ;; through''. | 450 | ;; through''. |
| 451 | (define-key map [mode-line down-mouse-1] 'ignore) | ||
| 452 | (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer) | 451 | (define-key map [mode-line mouse-1] 'mode-line-unbury-buffer) |
| 453 | (define-key map [header-line down-mouse-1] 'ignore) | 452 | (define-key map [header-line down-mouse-1] 'ignore) |
| 454 | (define-key map [header-line mouse-1] 'mode-line-unbury-buffer) | 453 | (define-key map [header-line mouse-1] 'mode-line-unbury-buffer) |
diff --git a/lisp/buff-menu.el b/lisp/buff-menu.el index 990ab32c9a4..1c3fa704041 100644 --- a/lisp/buff-menu.el +++ b/lisp/buff-menu.el | |||
| @@ -484,14 +484,19 @@ in the selected frame." | |||
| 484 | "Make the other window select this line's buffer. | 484 | "Make the other window select this line's buffer. |
| 485 | The current window remains selected." | 485 | The current window remains selected." |
| 486 | (interactive) | 486 | (interactive) |
| 487 | (display-buffer (Buffer-menu-buffer t))) | 487 | (let ((pop-up-windows t) |
| 488 | same-window-buffer-names | ||
| 489 | same-window-regexps) | ||
| 490 | (display-buffer (Buffer-menu-buffer t)))) | ||
| 488 | 491 | ||
| 489 | (defun Buffer-menu-2-window () | 492 | (defun Buffer-menu-2-window () |
| 490 | "Select this line's buffer, with previous buffer in second window." | 493 | "Select this line's buffer, with previous buffer in second window." |
| 491 | (interactive) | 494 | (interactive) |
| 492 | (let ((buff (Buffer-menu-buffer t)) | 495 | (let ((buff (Buffer-menu-buffer t)) |
| 493 | (menu (current-buffer)) | 496 | (menu (current-buffer)) |
| 494 | (pop-up-windows t)) | 497 | (pop-up-windows t) |
| 498 | same-window-buffer-names | ||
| 499 | same-window-regexps) | ||
| 495 | (delete-other-windows) | 500 | (delete-other-windows) |
| 496 | (switch-to-buffer (other-buffer)) | 501 | (switch-to-buffer (other-buffer)) |
| 497 | (pop-to-buffer buff) | 502 | (pop-to-buffer buff) |
| @@ -671,8 +676,7 @@ For more information, see the function `buffer-menu'." | |||
| 671 | ;; line with the beginning of the text (rather than with the left | 676 | ;; line with the beginning of the text (rather than with the left |
| 672 | ;; scrollbar or the left fringe). –-Stef | 677 | ;; scrollbar or the left fringe). –-Stef |
| 673 | (setq header (concat (propertize " " 'display '(space :align-to 0)) | 678 | (setq header (concat (propertize " " 'display '(space :align-to 0)) |
| 674 | header)) | 679 | header))) |
| 675 | ) | ||
| 676 | (with-current-buffer (get-buffer-create "*Buffer List*") | 680 | (with-current-buffer (get-buffer-create "*Buffer List*") |
| 677 | (setq buffer-read-only nil) | 681 | (setq buffer-read-only nil) |
| 678 | (erase-buffer) | 682 | (erase-buffer) |
| @@ -684,47 +688,45 @@ For more information, see the function `buffer-menu'." | |||
| 684 | (mapcar (lambda (c) | 688 | (mapcar (lambda (c) |
| 685 | (if (memq c '(?\n ?\ )) c underline)) | 689 | (if (memq c '(?\n ?\ )) c underline)) |
| 686 | header))))) | 690 | header))))) |
| 687 | (if buffer-list | 691 | ;; Collect info for every buffer we're interested in. |
| 688 | (setq list buffer-list) | 692 | (dolist (buffer (or buffer-list (buffer-list))) |
| 689 | ;; Collect info for every buffer we're interested in. | 693 | (with-current-buffer buffer |
| 690 | (dolist (buffer (buffer-list)) | 694 | (let ((name (buffer-name)) |
| 691 | (with-current-buffer buffer | 695 | (file buffer-file-name)) |
| 692 | (let ((name (buffer-name)) | 696 | (unless (and (not buffer-list) |
| 693 | (file buffer-file-name)) | 697 | (or |
| 694 | (cond | 698 | ;; Don't mention internal buffers. |
| 695 | ;; Don't mention internal buffers. | 699 | (and (string= (substring name 0 1) " ") (null file)) |
| 696 | ((and (string= (substring name 0 1) " ") (null file))) | 700 | ;; Maybe don't mention buffers without files. |
| 697 | ;; Maybe don't mention buffers without files. | 701 | (and files-only (not file)) |
| 698 | ((and files-only (not file))) | 702 | (string= name "*Buffer List*"))) |
| 699 | ((string= name "*Buffer List*")) | 703 | ;; Otherwise output info. |
| 700 | ;; Otherwise output info. | 704 | (let ((mode (concat (format-mode-line mode-name nil nil buffer) |
| 701 | (t | 705 | (if mode-line-process |
| 702 | (let ((mode (concat (format-mode-line mode-name nil nil buffer) | 706 | (format-mode-line mode-line-process |
| 703 | (if mode-line-process | 707 | nil nil buffer)))) |
| 704 | (format-mode-line mode-line-process | 708 | (bits (string |
| 705 | nil nil buffer)))) | 709 | (if (eq buffer old-buffer) ?. ?\ ) |
| 706 | (bits (string | 710 | ;; Handle readonly status. The output buffer |
| 707 | (if (eq buffer old-buffer) ?. ?\ ) | 711 | ;; is special cased to appear readonly; it is |
| 708 | ;; Handle readonly status. The output buffer | 712 | ;; actually made so at a later date. |
| 709 | ;; is special cased to appear readonly; it is | 713 | (if (or (eq buffer standard-output) |
| 710 | ;; actually made so at a later date. | 714 | buffer-read-only) |
| 711 | (if (or (eq buffer standard-output) | 715 | ?% ?\ ) |
| 712 | buffer-read-only) | 716 | ;; Identify modified buffers. |
| 713 | ?% ?\ ) | 717 | (if (buffer-modified-p) ?* ?\ ) |
| 714 | ;; Identify modified buffers. | 718 | ;; Space separator. |
| 715 | (if (buffer-modified-p) ?* ?\ ) | 719 | ?\ ))) |
| 716 | ;; Space separator. | 720 | (unless file |
| 717 | ?\ ))) | 721 | ;; No visited file. Check local value of |
| 718 | (unless file | 722 | ;; list-buffers-directory. |
| 719 | ;; No visited file. Check local value of | 723 | (when (and (boundp 'list-buffers-directory) |
| 720 | ;; list-buffers-directory. | 724 | list-buffers-directory) |
| 721 | (when (and (boundp 'list-buffers-directory) | 725 | (setq file list-buffers-directory))) |
| 722 | list-buffers-directory) | 726 | (push (list buffer bits name (buffer-size) mode file) |
| 723 | (setq file list-buffers-directory))) | 727 | list)))))) |
| 724 | (push (list buffer bits name (buffer-size) mode file) | 728 | ;; Preserve the original buffer-list ordering, just in case. |
| 725 | list))))))) | 729 | (setq list (nreverse list)) |
| 726 | ;; Preserve the original buffer-list ordering, just in case. | ||
| 727 | (setq list (nreverse list))) | ||
| 728 | ;; Place the buffers's info in the output buffer, sorted if necessary. | 730 | ;; Place the buffers's info in the output buffer, sorted if necessary. |
| 729 | (dolist (buffer | 731 | (dolist (buffer |
| 730 | (if Buffer-menu-sort-column | 732 | (if Buffer-menu-sort-column |
diff --git a/lisp/calc/calc-aent.el b/lisp/calc/calc-aent.el index c062a822e89..2210435036c 100644 --- a/lisp/calc/calc-aent.el +++ b/lisp/calc/calc-aent.el | |||
| @@ -410,32 +410,40 @@ T means abort and give an error message.") | |||
| 410 | (exit-minibuffer)))) | 410 | (exit-minibuffer)))) |
| 411 | 411 | ||
| 412 | (defun calcAlg-blink-matching-open () | 412 | (defun calcAlg-blink-matching-open () |
| 413 | (let ((oldpos (point)) | 413 | (let ((rightpt (point)) |
| 414 | (blinkpos nil)) | 414 | (leftpt nil) |
| 415 | (rightchar (preceding-char)) | ||
| 416 | leftchar | ||
| 417 | rightsyntax | ||
| 418 | leftsyntax) | ||
| 415 | (save-excursion | 419 | (save-excursion |
| 416 | (condition-case () | 420 | (condition-case () |
| 417 | (setq blinkpos (scan-sexps oldpos -1)) | 421 | (setq leftpt (scan-sexps rightpt -1) |
| 418 | (error nil))) | 422 | leftchar (char-after leftpt)) |
| 419 | (if (and blinkpos | 423 | (error nil))) |
| 420 | (> oldpos (1+ (point-min))) | 424 | (if (and leftpt |
| 421 | (or (and (= (char-after (1- oldpos)) ?\)) | 425 | (or (and (= rightchar ?\)) |
| 422 | (= (char-after blinkpos) ?\[)) | 426 | (= leftchar ?\[)) |
| 423 | (and (= (char-after (1- oldpos)) ?\]) | 427 | (and (= rightchar ?\]) |
| 424 | (= (char-after blinkpos) ?\())) | 428 | (= leftchar ?\())) |
| 425 | (save-excursion | 429 | (save-excursion |
| 426 | (goto-char blinkpos) | 430 | (goto-char leftpt) |
| 427 | (looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)"))) | 431 | (looking-at ".+\\(\\.\\.\\|\\\\dots\\|\\\\ldots\\)"))) |
| 428 | (let ((saved (aref (syntax-table) (char-after blinkpos)))) | 432 | (let ((leftsaved (aref (syntax-table) leftchar)) |
| 429 | (unwind-protect | 433 | (rightsaved (aref (syntax-table) rightchar))) |
| 430 | (progn | 434 | (unwind-protect |
| 431 | (aset (syntax-table) (char-after blinkpos) | 435 | (progn |
| 432 | (+ (logand saved 255) | 436 | (cond ((= leftchar ?\[) |
| 433 | (lsh (char-after (1- oldpos)) 8))) | 437 | (aset (syntax-table) leftchar (cons 4 ?\))) |
| 434 | (blink-matching-open)) | 438 | (aset (syntax-table) rightchar (cons 5 ?\[))) |
| 435 | (aset (syntax-table) (char-after blinkpos) saved))) | 439 | (t |
| 440 | (aset (syntax-table) leftchar (cons 4 ?\])) | ||
| 441 | (aset (syntax-table) rightchar (cons 5 ?\()))) | ||
| 442 | (blink-matching-open)) | ||
| 443 | (aset (syntax-table) leftchar leftsaved) | ||
| 444 | (aset (syntax-table) rightchar rightsaved))) | ||
| 436 | (blink-matching-open)))) | 445 | (blink-matching-open)))) |
| 437 | 446 | ||
| 438 | |||
| 439 | (defun calc-alg-digit-entry () | 447 | (defun calc-alg-digit-entry () |
| 440 | (calc-alg-entry | 448 | (calc-alg-entry |
| 441 | (cond ((eq last-command-char ?e) | 449 | (cond ((eq last-command-char ?e) |
diff --git a/lisp/calc/calc-comb.el b/lisp/calc/calc-comb.el index 24e3e5f182e..adb8fcecce6 100644 --- a/lisp/calc/calc-comb.el +++ b/lisp/calc/calc-comb.el | |||
| @@ -540,12 +540,12 @@ | |||
| 540 | ;;; Produce a random 10-bit integer, with (random) if no seed provided, | 540 | ;;; Produce a random 10-bit integer, with (random) if no seed provided, |
| 541 | ;;; or else with Numerical Recipes algorithm ran3 / Knuth 3.2.2-A. | 541 | ;;; or else with Numerical Recipes algorithm ran3 / Knuth 3.2.2-A. |
| 542 | 542 | ||
| 543 | (defvar var-RandSeed nil) | 543 | (defvar var-RandSeed) |
| 544 | (defvar math-random-cache nil) | 544 | (defvar math-random-cache nil) |
| 545 | (defvar math-gaussian-cache nil) | 545 | (defvar math-gaussian-cache nil) |
| 546 | 546 | ||
| 547 | (defun math-init-random-base () | 547 | (defun math-init-random-base () |
| 548 | (if var-RandSeed | 548 | (if (and (boundp 'var-RandSeed) var-RandSeed) |
| 549 | (if (eq (car-safe var-RandSeed) 'vec) | 549 | (if (eq (car-safe var-RandSeed) 'vec) |
| 550 | nil | 550 | nil |
| 551 | (if (Math-integerp var-RandSeed) | 551 | (if (Math-integerp var-RandSeed) |
| @@ -599,9 +599,10 @@ | |||
| 599 | ;;; Produce a random digit in the range 0..999. | 599 | ;;; Produce a random digit in the range 0..999. |
| 600 | ;;; Avoid various pitfalls that may lurk in the built-in (random) function! | 600 | ;;; Avoid various pitfalls that may lurk in the built-in (random) function! |
| 601 | ;;; Shuffling algorithm from Numerical Recipes, section 7.1. | 601 | ;;; Shuffling algorithm from Numerical Recipes, section 7.1. |
| 602 | (defvar math-random-last) | ||
| 602 | (defun math-random-digit () | 603 | (defun math-random-digit () |
| 603 | (let (i math-random-last) | 604 | (let (i) |
| 604 | (or (eq var-RandSeed math-last-RandSeed) | 605 | (or (and (boundp 'var-RandSeed) (eq var-RandSeed math-last-RandSeed)) |
| 605 | (math-init-random-base)) | 606 | (math-init-random-base)) |
| 606 | (or math-random-cache | 607 | (or math-random-cache |
| 607 | (progn | 608 | (progn |
diff --git a/lisp/calculator.el b/lisp/calculator.el index a9410ae961c..76ff4053c7f 100644 --- a/lisp/calculator.el +++ b/lisp/calculator.el | |||
| @@ -4,6 +4,7 @@ | |||
| 4 | 4 | ||
| 5 | ;; Author: Eli Barzilay <eli@barzilay.org> | 5 | ;; Author: Eli Barzilay <eli@barzilay.org> |
| 6 | ;; Keywords: tools, convenience | 6 | ;; Keywords: tools, convenience |
| 7 | ;; Time-stamp: <2002-07-13 01:14:35 eli> | ||
| 7 | 8 | ||
| 8 | ;; This file is part of GNU Emacs. | 9 | ;; This file is part of GNU Emacs. |
| 9 | 10 | ||
| @@ -100,6 +101,20 @@ at runtime." | |||
| 100 | :type 'integer | 101 | :type 'integer |
| 101 | :group 'calculator) | 102 | :group 'calculator) |
| 102 | 103 | ||
| 104 | (defcustom calculator-radix-grouping-mode t | ||
| 105 | "*Use digit grouping in radix output mode. | ||
| 106 | If this is set, chunks of `calculator-radix-grouping-digits' characters | ||
| 107 | will be separated by `calculator-radix-grouping-separator' when in radix | ||
| 108 | output mode is active (determined by `calculator-output-radix').") | ||
| 109 | |||
| 110 | (defcustom calculator-radix-grouping-digits 4 | ||
| 111 | "*The number of digits used for grouping display in radix modes. | ||
| 112 | See `calculator-radix-grouping-mode'.") | ||
| 113 | |||
| 114 | (defcustom calculator-radix-grouping-separator "'" | ||
| 115 | "*The separator used in radix grouping display. | ||
| 116 | See `calculator-radix-grouping-mode'.") | ||
| 117 | |||
| 103 | (defcustom calculator-remove-zeros t | 118 | (defcustom calculator-remove-zeros t |
| 104 | "*Non-nil value means delete all redundant zero decimal digits. | 119 | "*Non-nil value means delete all redundant zero decimal digits. |
| 105 | If this value is not t, and not nil, redundant zeros are removed except | 120 | If this value is not t, and not nil, redundant zeros are removed except |
| @@ -163,7 +178,11 @@ Otherwise show as a negative number." | |||
| 163 | :group 'calculator) | 178 | :group 'calculator) |
| 164 | 179 | ||
| 165 | (defcustom calculator-mode-hook nil | 180 | (defcustom calculator-mode-hook nil |
| 166 | "*List of hook functions for `calculator-mode' to run." | 181 | "*List of hook functions for `calculator-mode' to run. |
| 182 | Note: if `calculator-electric-mode' is on, then this hook will get | ||
| 183 | activated in the minibuffer - in that case it should not do much more | ||
| 184 | than local key settings and other effects that will change things | ||
| 185 | outside the scope of calculator related code." | ||
| 167 | :type 'hook | 186 | :type 'hook |
| 168 | :group 'calculator) | 187 | :group 'calculator) |
| 169 | 188 | ||
| @@ -387,7 +406,7 @@ Used for repeating operations in calculator-repR/L.") | |||
| 387 | "oD" "oH" "oX" "oO" "oB") | 406 | "oD" "oH" "oX" "oO" "oB") |
| 388 | (calculator-rotate-displayer "'") | 407 | (calculator-rotate-displayer "'") |
| 389 | (calculator-rotate-displayer-back "\"") | 408 | (calculator-rotate-displayer-back "\"") |
| 390 | (calculator-displayer-pref "{") | 409 | (calculator-displayer-prev "{") |
| 391 | (calculator-displayer-next "}") | 410 | (calculator-displayer-next "}") |
| 392 | (calculator-saved-up [up] [?\C-p]) | 411 | (calculator-saved-up [up] [?\C-p]) |
| 393 | (calculator-saved-down [down] [?\C-n]) | 412 | (calculator-saved-down [down] [?\C-n]) |
| @@ -399,10 +418,10 @@ Used for repeating operations in calculator-repR/L.") | |||
| 399 | (calculator-save-and-quit [(control return)] | 418 | (calculator-save-and-quit [(control return)] |
| 400 | [(control kp-enter)]) | 419 | [(control kp-enter)]) |
| 401 | (calculator-paste [insert] [(shift insert)] | 420 | (calculator-paste [insert] [(shift insert)] |
| 402 | [mouse-2]) | 421 | [paste] [mouse-2] [?\C-y]) |
| 403 | (calculator-clear [delete] [?\C-?] [?\C-d]) | 422 | (calculator-clear [delete] [?\C-?] [?\C-d]) |
| 404 | (calculator-help [?h] [??] [f1] [help]) | 423 | (calculator-help [?h] [??] [f1] [help]) |
| 405 | (calculator-copy [(control insert)]) | 424 | (calculator-copy [(control insert)] [copy]) |
| 406 | (calculator-backspace [backspace]) | 425 | (calculator-backspace [backspace]) |
| 407 | ))) | 426 | ))) |
| 408 | (while p | 427 | (while p |
| @@ -536,7 +555,7 @@ Used for repeating operations in calculator-repR/L.") | |||
| 536 | ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors) | 555 | ,@(mapcar (lambda (x) (nth 1 x)) radix-selectors) |
| 537 | "---" | 556 | "---" |
| 538 | ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors))) | 557 | ,@(mapcar (lambda (x) (nth 2 x)) radix-selectors))) |
| 539 | ("Decimal Dislpay" | 558 | ("Decimal Display" |
| 540 | ,@(mapcar (lambda (d) | 559 | ,@(mapcar (lambda (d) |
| 541 | (vector (cadr d) | 560 | (vector (cadr d) |
| 542 | ;; Note: inserts actual object here | 561 | ;; Note: inserts actual object here |
| @@ -611,10 +630,11 @@ The prompt indicates the current modes: | |||
| 611 | * \"=?\": (? is B/O/H) the display radix (when input is decimal); | 630 | * \"=?\": (? is B/O/H) the display radix (when input is decimal); |
| 612 | * \"??\": (? is D/B/O/H) 1st char for input radix, 2nd for display. | 631 | * \"??\": (? is D/B/O/H) 1st char for input radix, 2nd for display. |
| 613 | 632 | ||
| 614 | Also, the quote character can be used to switch display modes for | 633 | Also, the quote key can be used to switch display modes for decimal |
| 615 | decimal numbers (double-quote rotates back), and the two brace | 634 | numbers (double-quote rotates back), and the two brace characters |
| 616 | characters (\"{\" and \"}\" change display parameters that these | 635 | \(\"{\" and \"}\" change display parameters that these displayers use (if |
| 617 | displayers use (if they handle such). | 636 | they handle such). If output is using any radix mode, then these keys |
| 637 | toggle digit grouping mode and the chunk size. | ||
| 618 | 638 | ||
| 619 | Values can be saved for future reference in either a list of saved | 639 | Values can be saved for future reference in either a list of saved |
| 620 | values, or in registers. | 640 | values, or in registers. |
| @@ -683,6 +703,7 @@ See the documentation for `calculator-mode' for more information." | |||
| 683 | (setq calculator-saved-global-map (current-global-map)) | 703 | (setq calculator-saved-global-map (current-global-map)) |
| 684 | (use-local-map nil) | 704 | (use-local-map nil) |
| 685 | (use-global-map calculator-mode-map) | 705 | (use-global-map calculator-mode-map) |
| 706 | (run-hooks 'calculator-mode-hook) | ||
| 686 | (unwind-protect | 707 | (unwind-protect |
| 687 | (catch 'calculator-done | 708 | (catch 'calculator-done |
| 688 | (Electric-command-loop | 709 | (Electric-command-loop |
| @@ -717,6 +738,12 @@ See the documentation for `calculator-mode' for more information." | |||
| 717 | (if (and calculator-restart-other-mode calculator-electric-mode) | 738 | (if (and calculator-restart-other-mode calculator-electric-mode) |
| 718 | (calculator))) | 739 | (calculator))) |
| 719 | 740 | ||
| 741 | (defun calculator-message (string &rest arguments) | ||
| 742 | "Same as `message', but special handle of electric mode." | ||
| 743 | (apply 'message string arguments) | ||
| 744 | (if calculator-electric-mode | ||
| 745 | (progn (sit-for 1) (message nil)))) | ||
| 746 | |||
| 720 | ;;;--------------------------------------------------------------------- | 747 | ;;;--------------------------------------------------------------------- |
| 721 | ;;; Operators | 748 | ;;; Operators |
| 722 | 749 | ||
| @@ -818,82 +845,116 @@ The string is set not to exceed the screen width." | |||
| 818 | (concat calculator-prompt | 845 | (concat calculator-prompt |
| 819 | (substring prompt (+ trim (length calculator-prompt))))))) | 846 | (substring prompt (+ trim (length calculator-prompt))))))) |
| 820 | 847 | ||
| 821 | (defun calculator-curnum-value () | 848 | (defun calculator-string-to-number (str) |
| 822 | "Get the numeric value of the displayed number string as a float." | 849 | "Convert the given STR to a number, according to the value of |
| 850 | `calculator-input-radix'." | ||
| 823 | (if calculator-input-radix | 851 | (if calculator-input-radix |
| 824 | (let ((radix | 852 | (let ((radix |
| 825 | (cdr (assq calculator-input-radix | 853 | (cdr (assq calculator-input-radix |
| 826 | '((bin . 2) (oct . 8) (hex . 16))))) | 854 | '((bin . 2) (oct . 8) (hex . 16))))) |
| 827 | (i -1) (value 0)) | 855 | (i -1) (value 0) (new-value 0)) |
| 828 | ;; assume valid input (upcased & characters in range) | 856 | ;; assume mostly valid input (e.g., characters in range) |
| 829 | (while (< (setq i (1+ i)) (length calculator-curnum)) | 857 | (while (< (setq i (1+ i)) (length str)) |
| 830 | (setq value | 858 | (setq new-value |
| 831 | (+ (let ((ch (aref calculator-curnum i))) | 859 | (let* ((ch (upcase (aref str i))) |
| 832 | (- ch (if (<= ch ?9) ?0 (- ?A 10)))) | 860 | (n (cond ((< ch ?0) nil) |
| 833 | (* radix value)))) | 861 | ((<= ch ?9) (- ch ?0)) |
| 862 | ((< ch ?A) nil) | ||
| 863 | ((<= ch ?Z) (- ch (- ?A 10))) | ||
| 864 | (t nil)))) | ||
| 865 | (if (and n (<= 0 n) (< n radix)) | ||
| 866 | (+ n (* radix value)) | ||
| 867 | (progn | ||
| 868 | (calculator-message | ||
| 869 | "Warning: Ignoring bad input character `%c'." ch) | ||
| 870 | (sit-for 1) | ||
| 871 | value)))) | ||
| 872 | (if (if (< new-value 0) (> value 0) (< value 0)) | ||
| 873 | (calculator-message "Warning: Overflow in input.")) | ||
| 874 | (setq value new-value)) | ||
| 834 | value) | 875 | value) |
| 835 | (car | 876 | (car (read-from-string |
| 836 | (read-from-string | 877 | (cond ((equal "." str) "0.0") |
| 837 | (cond | 878 | ((string-match "[eE][+-]?$" str) (concat str "0")) |
| 838 | ((equal "." calculator-curnum) | 879 | ((string-match "\\.[0-9]\\|[eE]" str) str) |
| 839 | "0.0") | 880 | ((string-match "\\." str) |
| 840 | ((string-match "[eE][+-]?$" calculator-curnum) | 881 | ;; do this because Emacs reads "23." as an integer |
| 841 | (concat calculator-curnum "0")) | 882 | (concat str "0")) |
| 842 | ((string-match "\\.[0-9]\\|[eE]" calculator-curnum) | 883 | ((stringp str) (concat str ".0")) |
| 843 | calculator-curnum) | 884 | (t "0.0")))))) |
| 844 | ((string-match "\\." calculator-curnum) | 885 | |
| 845 | ;; do this because Emacs reads "23." as an integer | 886 | (defun calculator-curnum-value () |
| 846 | (concat calculator-curnum "0")) | 887 | "Get the numeric value of the displayed number string as a float." |
| 847 | ((stringp calculator-curnum) | 888 | (calculator-string-to-number calculator-curnum)) |
| 848 | (concat calculator-curnum ".0")) | ||
| 849 | (t "0.0")))))) | ||
| 850 | 889 | ||
| 851 | (defun calculator-rotate-displayer (&optional new-disp) | 890 | (defun calculator-rotate-displayer (&optional new-disp) |
| 852 | "Switch to the next displayer on the `calculator-displayers' list. | 891 | "Switch to the next displayer on the `calculator-displayers' list. |
| 853 | Can be called with an optional argument NEW-DISP to force rotation to | 892 | Can be called with an optional argument NEW-DISP to force rotation to |
| 854 | that argument." | 893 | that argument. |
| 894 | If radix output mode is active, toggle digit grouping." | ||
| 855 | (interactive) | 895 | (interactive) |
| 856 | (setq calculator-displayers | 896 | (cond |
| 857 | (if (and new-disp (memq new-disp calculator-displayers)) | 897 | (calculator-output-radix |
| 858 | (let ((tmp nil)) | 898 | (setq calculator-radix-grouping-mode |
| 859 | (while (not (eq (car calculator-displayers) new-disp)) | 899 | (not calculator-radix-grouping-mode)) |
| 860 | (setq tmp (cons (car calculator-displayers) tmp)) | 900 | (calculator-message |
| 861 | (setq calculator-displayers (cdr calculator-displayers))) | 901 | "Digit grouping mode %s." |
| 862 | (setq calculator-displayers | 902 | (if calculator-radix-grouping-mode "ON" "OFF"))) |
| 863 | (nconc calculator-displayers (nreverse tmp)))) | 903 | (t |
| 864 | (nconc (cdr calculator-displayers) | 904 | (setq calculator-displayers |
| 865 | (list (car calculator-displayers))))) | 905 | (if (and new-disp (memq new-disp calculator-displayers)) |
| 866 | (message "Using %s." (cadr (car calculator-displayers))) | 906 | (let ((tmp nil)) |
| 867 | (if calculator-electric-mode | 907 | (while (not (eq (car calculator-displayers) new-disp)) |
| 868 | (progn (sit-for 1) (message nil))) | 908 | (setq tmp (cons (car calculator-displayers) tmp)) |
| 909 | (setq calculator-displayers | ||
| 910 | (cdr calculator-displayers))) | ||
| 911 | (setq calculator-displayers | ||
| 912 | (nconc calculator-displayers (nreverse tmp)))) | ||
| 913 | (nconc (cdr calculator-displayers) | ||
| 914 | (list (car calculator-displayers))))) | ||
| 915 | (calculator-message | ||
| 916 | "Using %s." (cadr (car calculator-displayers))))) | ||
| 869 | (calculator-enter)) | 917 | (calculator-enter)) |
| 870 | 918 | ||
| 871 | (defun calculator-rotate-displayer-back () | 919 | (defun calculator-rotate-displayer-back () |
| 872 | "Like `calculator-rotate-displayer', but rotates modes back." | 920 | "Like `calculator-rotate-displayer', but rotates modes back. |
| 921 | If radix output mode is active, toggle digit grouping." | ||
| 873 | (interactive) | 922 | (interactive) |
| 874 | (calculator-rotate-displayer (car (last calculator-displayers)))) | 923 | (calculator-rotate-displayer (car (last calculator-displayers)))) |
| 875 | 924 | ||
| 876 | (defun calculator-displayer-prev () | 925 | (defun calculator-displayer-prev () |
| 877 | "Send the current displayer function a 'left argument. | 926 | "Send the current displayer function a 'left argument. |
| 878 | This is used to modify display arguments (if the current displayer | 927 | This is used to modify display arguments (if the current displayer |
| 879 | function supports this)." | 928 | function supports this). |
| 929 | If radix output mode is active, increase the grouping size." | ||
| 880 | (interactive) | 930 | (interactive) |
| 881 | (and (car calculator-displayers) | 931 | (if calculator-output-radix |
| 882 | (let ((disp (caar calculator-displayers))) | 932 | (progn (setq calculator-radix-grouping-digits |
| 883 | (cond ((symbolp disp) (funcall disp 'left)) | 933 | (1+ calculator-radix-grouping-digits)) |
| 884 | ((and (consp disp) (eq 'std (car disp))) | 934 | (calculator-enter)) |
| 885 | (calculator-standard-displayer 'left (cadr disp))))))) | 935 | (and (car calculator-displayers) |
| 936 | (let ((disp (caar calculator-displayers))) | ||
| 937 | (cond | ||
| 938 | ((symbolp disp) (funcall disp 'left)) | ||
| 939 | ((and (consp disp) (eq 'std (car disp))) | ||
| 940 | (calculator-standard-displayer 'left (cadr disp)))))))) | ||
| 886 | 941 | ||
| 887 | (defun calculator-displayer-next () | 942 | (defun calculator-displayer-next () |
| 888 | "Send the current displayer function a 'right argument. | 943 | "Send the current displayer function a 'right argument. |
| 889 | This is used to modify display arguments (if the current displayer | 944 | This is used to modify display arguments (if the current displayer |
| 890 | function supports this)." | 945 | function supports this). |
| 946 | If radix output mode is active, decrease the grouping size." | ||
| 891 | (interactive) | 947 | (interactive) |
| 892 | (and (car calculator-displayers) | 948 | (if calculator-output-radix |
| 893 | (let ((disp (caar calculator-displayers))) | 949 | (progn (setq calculator-radix-grouping-digits |
| 894 | (cond ((symbolp disp) (funcall disp 'right)) | 950 | (max 2 (1- calculator-radix-grouping-digits))) |
| 895 | ((and (consp disp) (eq 'std (car disp))) | 951 | (calculator-enter)) |
| 896 | (calculator-standard-displayer 'right (cadr disp))))))) | 952 | (and (car calculator-displayers) |
| 953 | (let ((disp (caar calculator-displayers))) | ||
| 954 | (cond | ||
| 955 | ((symbolp disp) (funcall disp 'right)) | ||
| 956 | ((and (consp disp) (eq 'std (car disp))) | ||
| 957 | (calculator-standard-displayer 'right (cadr disp)))))))) | ||
| 897 | 958 | ||
| 898 | (defun calculator-remove-zeros (numstr) | 959 | (defun calculator-remove-zeros (numstr) |
| 899 | "Get a number string NUMSTR and remove unnecessary zeroes. | 960 | "Get a number string NUMSTR and remove unnecessary zeroes. |
| @@ -995,7 +1056,7 @@ the 'left or 'right when one of the standard modes is used." | |||
| 995 | (calculator-remove-zeros str)) | 1056 | (calculator-remove-zeros str)) |
| 996 | "e" (number-to-string exp)))))) | 1057 | "e" (number-to-string exp)))))) |
| 997 | 1058 | ||
| 998 | (defun calculator-num-to-string (num) | 1059 | (defun calculator-number-to-string (num) |
| 999 | "Convert NUM to a displayable string." | 1060 | "Convert NUM to a displayable string." |
| 1000 | (cond | 1061 | (cond |
| 1001 | ((and (numberp num) calculator-output-radix) | 1062 | ((and (numberp num) calculator-output-radix) |
| @@ -1015,6 +1076,14 @@ the 'left or 'right when one of the standard modes is used." | |||
| 1015 | (?6 . "110") (?7 . "111"))))))) | 1076 | (?6 . "110") (?7 . "111"))))))) |
| 1016 | (string-match "^0*\\(.+\\)" s) | 1077 | (string-match "^0*\\(.+\\)" s) |
| 1017 | (setq str (match-string 1 s)))) | 1078 | (setq str (match-string 1 s)))) |
| 1079 | (if calculator-radix-grouping-mode | ||
| 1080 | (let ((d (/ (length str) calculator-radix-grouping-digits)) | ||
| 1081 | (r (% (length str) calculator-radix-grouping-digits))) | ||
| 1082 | (while (>= (setq d (1- d)) (if (zerop r) 1 0)) | ||
| 1083 | (let ((i (+ r (* d calculator-radix-grouping-digits)))) | ||
| 1084 | (setq str (concat (substring str 0 i) | ||
| 1085 | calculator-radix-grouping-separator | ||
| 1086 | (substring str i))))))) | ||
| 1018 | (upcase | 1087 | (upcase |
| 1019 | (if (and (not calculator-2s-complement) (< num 0)) | 1088 | (if (and (not calculator-2s-complement) (< num 0)) |
| 1020 | (concat "-" str) | 1089 | (concat "-" str) |
| @@ -1051,7 +1120,7 @@ If optional argument FORCE is non-nil, don't use the cached string." | |||
| 1051 | ;; customizable display for a single value | 1120 | ;; customizable display for a single value |
| 1052 | (caar calculator-displayers) | 1121 | (caar calculator-displayers) |
| 1053 | calculator-displayer))) | 1122 | calculator-displayer))) |
| 1054 | (mapconcat 'calculator-num-to-string | 1123 | (mapconcat 'calculator-number-to-string |
| 1055 | (reverse calculator-stack) | 1124 | (reverse calculator-stack) |
| 1056 | " ")) | 1125 | " ")) |
| 1057 | " " | 1126 | " " |
| @@ -1319,9 +1388,8 @@ Optional string argument KEYS will force using it as the keys entered." | |||
| 1319 | (if (not (and op (= -1 (calculator-op-arity op)))) | 1388 | (if (not (and op (= -1 (calculator-op-arity op)))) |
| 1320 | ;;(error "Binary operator without a first operand") | 1389 | ;;(error "Binary operator without a first operand") |
| 1321 | (progn | 1390 | (progn |
| 1322 | (message "Binary operator without a first operand") | 1391 | (calculator-message |
| 1323 | (if calculator-electric-mode | 1392 | "Binary operator without a first operand") |
| 1324 | (progn (sit-for 1) (message nil))) | ||
| 1325 | (throw 'op-error nil))))) | 1393 | (throw 'op-error nil))))) |
| 1326 | (calculator-reduce-stack | 1394 | (calculator-reduce-stack |
| 1327 | (cond ((eq (nth 1 op) '\() 10) | 1395 | (cond ((eq (nth 1 op) '\() 10) |
| @@ -1334,9 +1402,7 @@ Optional string argument KEYS will force using it as the keys entered." | |||
| 1334 | (not (numberp (car calculator-stack))))) | 1402 | (not (numberp (car calculator-stack))))) |
| 1335 | ;;(error "Unterminated expression") | 1403 | ;;(error "Unterminated expression") |
| 1336 | (progn | 1404 | (progn |
| 1337 | (message "Unterminated expression") | 1405 | (calculator-message "Unterminated expression") |
| 1338 | (if calculator-electric-mode | ||
| 1339 | (progn (sit-for 1) (message nil))) | ||
| 1340 | (throw 'op-error nil))) | 1406 | (throw 'op-error nil))) |
| 1341 | (setq calculator-stack (cons op calculator-stack)) | 1407 | (setq calculator-stack (cons op calculator-stack)) |
| 1342 | (calculator-reduce-stack (calculator-op-prec op)) | 1408 | (calculator-reduce-stack (calculator-op-prec op)) |
| @@ -1540,7 +1606,7 @@ Optional string argument KEYS will force using it as the keys entered." | |||
| 1540 | (setcdr as val) | 1606 | (setcdr as val) |
| 1541 | (setq calculator-registers | 1607 | (setq calculator-registers |
| 1542 | (cons (cons reg val) calculator-registers))) | 1608 | (cons (cons reg val) calculator-registers))) |
| 1543 | (message (format "[%c] := %S" reg val)))) | 1609 | (calculator-message "[%c] := %S" reg val))) |
| 1544 | 1610 | ||
| 1545 | (defun calculator-put-value (val) | 1611 | (defun calculator-put-value (val) |
| 1546 | "Paste VAL as if entered. | 1612 | "Paste VAL as if entered. |
| @@ -1552,24 +1618,26 @@ Used by `calculator-paste' and `get-register'." | |||
| 1552 | (progn | 1618 | (progn |
| 1553 | (calculator-clear-fragile) | 1619 | (calculator-clear-fragile) |
| 1554 | (setq calculator-curnum (let ((calculator-displayer "%S")) | 1620 | (setq calculator-curnum (let ((calculator-displayer "%S")) |
| 1555 | (calculator-num-to-string val))) | 1621 | (calculator-number-to-string val))) |
| 1556 | (calculator-update-display)))) | 1622 | (calculator-update-display)))) |
| 1557 | 1623 | ||
| 1558 | (defun calculator-paste () | 1624 | (defun calculator-paste () |
| 1559 | "Paste a value from the `kill-ring'." | 1625 | "Paste a value from the `kill-ring'." |
| 1560 | (interactive) | 1626 | (interactive) |
| 1561 | (calculator-put-value | 1627 | (calculator-put-value |
| 1562 | (let ((str (current-kill 0))) | 1628 | (let ((str (replace-regexp-in-string |
| 1563 | (and calculator-paste-decimals | 1629 | "^ *\\(.+[^ ]\\) *$" "\\1" (current-kill 0)))) |
| 1630 | (and (not calculator-input-radix) | ||
| 1631 | calculator-paste-decimals | ||
| 1564 | (string-match "\\([0-9]+\\)\\(\\.[0-9]+\\)?\\(e[0-9]+\\)?" | 1632 | (string-match "\\([0-9]+\\)\\(\\.[0-9]+\\)?\\(e[0-9]+\\)?" |
| 1565 | str) | 1633 | str) |
| 1566 | (or (match-string 1 str) | 1634 | (or (match-string 1 str) |
| 1567 | (match-string 2 str) | 1635 | (match-string 2 str) |
| 1568 | (match-string 3 str)) | 1636 | (match-string 3 str)) |
| 1569 | (setq str (concat (match-string 1 str) | 1637 | (setq str (concat (or (match-string 1 str) "0") |
| 1570 | (or (match-string 2 str) ".0") | 1638 | (or (match-string 2 str) ".0") |
| 1571 | (match-string 3 str)))) | 1639 | (or (match-string 3 str) "")))) |
| 1572 | (condition-case nil (car (read-from-string str)) | 1640 | (condition-case nil (calculator-string-to-number str) |
| 1573 | (error nil))))) | 1641 | (error nil))))) |
| 1574 | 1642 | ||
| 1575 | (defun calculator-get-register (reg) | 1643 | (defun calculator-get-register (reg) |
| @@ -1678,7 +1746,7 @@ To use this, apply a binary operator (evaluate it), then call this." | |||
| 1678 | (while (> x 0) | 1746 | (while (> x 0) |
| 1679 | (setq r (* r (truncate x))) | 1747 | (setq r (* r (truncate x))) |
| 1680 | (setq x (1- x))) | 1748 | (setq x (1- x))) |
| 1681 | r)) | 1749 | (+ 0.0 r))) |
| 1682 | 1750 | ||
| 1683 | (defun calculator-truncate (n) | 1751 | (defun calculator-truncate (n) |
| 1684 | "Truncate N, return 0 in case of overflow." | 1752 | "Truncate N, return 0 in case of overflow." |
diff --git a/lisp/calendar/calendar.el b/lisp/calendar/calendar.el index aa0b3005fad..88d6aee513f 100644 --- a/lisp/calendar/calendar.el +++ b/lisp/calendar/calendar.el | |||
| @@ -1660,6 +1660,13 @@ the date indicated by the cursor position in the displayed three-month | |||
| 1660 | calendar." | 1660 | calendar." |
| 1661 | t) | 1661 | t) |
| 1662 | 1662 | ||
| 1663 | (autoload 'view-other-diary-entries "diary-lib" | ||
| 1664 | "Prepare and display buffer of diary entries from an alternative diary file. | ||
| 1665 | Searches for entries that match ARG days, starting with the date indicated | ||
| 1666 | by the cursor position in the displayed three-month calendar. | ||
| 1667 | D-FILE specifies the file to use as the diary file." | ||
| 1668 | t) | ||
| 1669 | |||
| 1663 | (autoload 'calendar-sunrise-sunset "solar" | 1670 | (autoload 'calendar-sunrise-sunset "solar" |
| 1664 | "Local time of sunrise and sunset for date under cursor." | 1671 | "Local time of sunrise and sunset for date under cursor." |
| 1665 | t) | 1672 | t) |
diff --git a/lisp/calendar/diary-lib.el b/lisp/calendar/diary-lib.el index 679c4b991b6..511f82f8f2f 100644 --- a/lisp/calendar/diary-lib.el +++ b/lisp/calendar/diary-lib.el | |||
| @@ -80,7 +80,7 @@ Searches for entries that match ARG days, starting with the date indicated | |||
| 80 | by the cursor position in the displayed three-month calendar. | 80 | by the cursor position in the displayed three-month calendar. |
| 81 | D-FILE specifies the file to use as the diary file." | 81 | D-FILE specifies the file to use as the diary file." |
| 82 | (interactive | 82 | (interactive |
| 83 | (list (if arg (prefix-numeric-value arg) 1) | 83 | (list (prefix-numeric-value current-prefix-arg) |
| 84 | (read-file-name "Enter diary file name: " default-directory nil t))) | 84 | (read-file-name "Enter diary file name: " default-directory nil t))) |
| 85 | (let ((diary-file d-file)) | 85 | (let ((diary-file d-file)) |
| 86 | (view-diary-entries arg))) | 86 | (view-diary-entries arg))) |
| @@ -841,11 +841,11 @@ Each entry in the diary file visible in the calendar window is marked. | |||
| 841 | After the entries are marked, the hooks `nongregorian-diary-marking-hook' and | 841 | After the entries are marked, the hooks `nongregorian-diary-marking-hook' and |
| 842 | `mark-diary-entries-hook' are run." | 842 | `mark-diary-entries-hook' are run." |
| 843 | (interactive) | 843 | (interactive) |
| 844 | (setq mark-diary-entries-in-calendar t) | ||
| 845 | (let ((marking-diary-entries t) | 844 | (let ((marking-diary-entries t) |
| 846 | file-glob-attrs marks) | 845 | file-glob-attrs marks) |
| 847 | (save-excursion | 846 | (save-excursion |
| 848 | (set-buffer (find-file-noselect (diary-check-diary-file) t)) | 847 | (set-buffer (find-file-noselect (diary-check-diary-file) t)) |
| 848 | (setq mark-diary-entries-in-calendar t) | ||
| 849 | (message "Marking diary entries...") | 849 | (message "Marking diary entries...") |
| 850 | (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) | 850 | (setq file-glob-attrs (nth 1 (diary-pull-attrs nil '()))) |
| 851 | (let ((d diary-date-forms) | 851 | (let ((d diary-date-forms) |
diff --git a/lisp/cus-edit.el b/lisp/cus-edit.el index 046c1bebcf7..5f3ffc6f8bf 100644 --- a/lisp/cus-edit.el +++ b/lisp/cus-edit.el | |||
| @@ -1561,9 +1561,9 @@ item in another window.\n\n")) | |||
| 1561 | :group 'custom-magic-faces) | 1561 | :group 'custom-magic-faces) |
| 1562 | 1562 | ||
| 1563 | (defface custom-set-face '((((class color)) | 1563 | (defface custom-set-face '((((class color)) |
| 1564 | (:foreground "blue" :background "white")) | 1564 | (:foreground "blue" :background "white")) |
| 1565 | (t | 1565 | (t |
| 1566 | (:slant italic))) | 1566 | (:slant italic))) |
| 1567 | "Face used when the customize item has been set." | 1567 | "Face used when the customize item has been set." |
| 1568 | :group 'custom-magic-faces) | 1568 | :group 'custom-magic-faces) |
| 1569 | 1569 | ||
| @@ -1578,31 +1578,32 @@ item in another window.\n\n")) | |||
| 1578 | "Face used when the customize item has been saved." | 1578 | "Face used when the customize item has been saved." |
| 1579 | :group 'custom-magic-faces) | 1579 | :group 'custom-magic-faces) |
| 1580 | 1580 | ||
| 1581 | (defconst custom-magic-alist '((nil "#" underline "\ | 1581 | (defconst custom-magic-alist |
| 1582 | '((nil "#" underline "\ | ||
| 1582 | uninitialized, you should not see this.") | 1583 | uninitialized, you should not see this.") |
| 1583 | (unknown "?" italic "\ | 1584 | (unknown "?" italic "\ |
| 1584 | unknown, you should not see this.") | 1585 | unknown, you should not see this.") |
| 1585 | (hidden "-" default "\ | 1586 | (hidden "-" default "\ |
| 1586 | hidden, invoke \"Show\" in the previous line to show." "\ | 1587 | hidden, invoke \"Show\" in the previous line to show." "\ |
| 1587 | group now hidden, invoke \"Show\", above, to show contents.") | 1588 | group now hidden, invoke \"Show\", above, to show contents.") |
| 1588 | (invalid "x" custom-invalid-face "\ | 1589 | (invalid "x" custom-invalid-face "\ |
| 1589 | the value displayed for this %c is invalid and cannot be set.") | 1590 | the value displayed for this %c is invalid and cannot be set.") |
| 1590 | (modified "*" custom-modified-face "\ | 1591 | (modified "*" custom-modified-face "\ |
| 1591 | you have edited the value as text, but you have not set the %c." "\ | 1592 | you have edited the value as text, but you have not set the %c." "\ |
| 1592 | you have edited something in this group, but not set it.") | 1593 | you have edited something in this group, but not set it.") |
| 1593 | (set "+" custom-set-face "\ | 1594 | (set "+" custom-set-face "\ |
| 1594 | you have set this %c, but not saved it for future sessions." "\ | 1595 | you have set this %c, but not saved it for future sessions." "\ |
| 1595 | something in this group has been set, but not saved.") | 1596 | something in this group has been set, but not saved.") |
| 1596 | (changed ":" custom-changed-face "\ | 1597 | (changed ":" custom-changed-face "\ |
| 1597 | this %c has been changed outside the customize buffer." "\ | 1598 | this %c has been changed outside the customize buffer." "\ |
| 1598 | something in this group has been changed outside customize.") | 1599 | something in this group has been changed outside customize.") |
| 1599 | (saved "!" custom-saved-face "\ | 1600 | (saved "!" custom-saved-face "\ |
| 1600 | this %c has been set and saved." "\ | 1601 | this %c has been set and saved." "\ |
| 1601 | something in this group has been set and saved.") | 1602 | something in this group has been set and saved.") |
| 1602 | (rogue "@" custom-rogue-face "\ | 1603 | (rogue "@" custom-rogue-face "\ |
| 1603 | this %c has not been changed with customize." "\ | 1604 | this %c has not been changed with customize." "\ |
| 1604 | something in this group is not prepared for customization.") | 1605 | something in this group is not prepared for customization.") |
| 1605 | (standard " " nil "\ | 1606 | (standard " " nil "\ |
| 1606 | this %c is unchanged from its standard setting." "\ | 1607 | this %c is unchanged from its standard setting." "\ |
| 1607 | visible group members are all at standard settings.")) | 1608 | visible group members are all at standard settings.")) |
| 1608 | "Alist of customize option states. | 1609 | "Alist of customize option states. |
| @@ -2576,7 +2577,7 @@ to switch between two values." | |||
| 2576 | "Edit face attributes." | 2577 | "Edit face attributes." |
| 2577 | :format "%t: %v" | 2578 | :format "%t: %v" |
| 2578 | :tag "Attributes" | 2579 | :tag "Attributes" |
| 2579 | :extra-offset 12 | 2580 | :extra-offset 13 |
| 2580 | :button-args '(:help-echo "Control whether this attribute has any effect.") | 2581 | :button-args '(:help-echo "Control whether this attribute has any effect.") |
| 2581 | :value-to-internal 'custom-face-edit-fix-value | 2582 | :value-to-internal 'custom-face-edit-fix-value |
| 2582 | :match (lambda (widget value) | 2583 | :match (lambda (widget value) |
| @@ -2689,6 +2690,7 @@ Also change :reverse-video to :inverse-video." | |||
| 2689 | :value t | 2690 | :value t |
| 2690 | :help-echo "Specify frames where the face attributes should be used." | 2691 | :help-echo "Specify frames where the face attributes should be used." |
| 2691 | :args '((const :tag "all" t) | 2692 | :args '((const :tag "all" t) |
| 2693 | (const :tag "defaults" default) | ||
| 2692 | (checklist | 2694 | (checklist |
| 2693 | :offset 0 | 2695 | :offset 0 |
| 2694 | :extra-offset 9 | 2696 | :extra-offset 9 |
| @@ -2817,13 +2819,29 @@ Only match frames that support the specified face attributes.") | |||
| 2817 | 2819 | ||
| 2818 | (define-widget 'custom-face-selected 'group | 2820 | (define-widget 'custom-face-selected 'group |
| 2819 | "Edit the attributes of the selected display in a face specification." | 2821 | "Edit the attributes of the selected display in a face specification." |
| 2820 | :args '((repeat :format "" | 2822 | :args '((choice :inline t |
| 2821 | :inline t | 2823 | (group :tag "With Defaults" :inline t |
| 2822 | (group custom-display-unselected sexp)) | 2824 | (group (const :tag "" default) |
| 2823 | (group (sexp :format "") custom-face-edit) | 2825 | (custom-face-edit :tag " Default\n Attributes")) |
| 2824 | (repeat :format "" | 2826 | (repeat :format "" |
| 2825 | :inline t | 2827 | :inline t |
| 2826 | sexp))) | 2828 | (group custom-display-unselected sexp)) |
| 2829 | (group (sexp :format "") | ||
| 2830 | (custom-face-edit :tag " Overriding\n Attributes")) | ||
| 2831 | (repeat :format "" | ||
| 2832 | :inline t | ||
| 2833 | sexp)) | ||
| 2834 | (group :tag "No Defaults" :inline t | ||
| 2835 | (repeat :format "" | ||
| 2836 | :inline t | ||
| 2837 | (group custom-display-unselected sexp)) | ||
| 2838 | (group (sexp :format "") | ||
| 2839 | (custom-face-edit :tag "\n Attributes")) | ||
| 2840 | (repeat :format "" | ||
| 2841 | :inline t | ||
| 2842 | sexp))))) | ||
| 2843 | |||
| 2844 | |||
| 2827 | 2845 | ||
| 2828 | (defconst custom-face-selected (widget-convert 'custom-face-selected) | 2846 | (defconst custom-face-selected (widget-convert 'custom-face-selected) |
| 2829 | "Converted version of the `custom-face-selected' widget.") | 2847 | "Converted version of the `custom-face-selected' widget.") |
diff --git a/lisp/descr-text.el b/lisp/descr-text.el index 49b9b12154a..726d3e6e5d8 100644 --- a/lisp/descr-text.el +++ b/lisp/descr-text.el | |||
| @@ -104,24 +104,11 @@ The `category', `face' and `font-lock-face' properties are made | |||
| 104 | into widget buttons that call `describe-text-category' or | 104 | into widget buttons that call `describe-text-category' or |
| 105 | `describe-face' when pushed." | 105 | `describe-face' when pushed." |
| 106 | ;; Sort the properties by the size of their value. | 106 | ;; Sort the properties by the size of their value. |
| 107 | (dolist (elt (sort (let ((ret nil) | 107 | (dolist (elt (sort (let (ret) |
| 108 | (key nil) | ||
| 109 | (val nil) | ||
| 110 | (len nil)) | ||
| 111 | (while properties | 108 | (while properties |
| 112 | (setq key (pop properties) | 109 | (push (list (pop properties) (pop properties)) ret)) |
| 113 | val (pop properties) | ||
| 114 | len 0) | ||
| 115 | (unless (or (memq key '(category face font-lock-face | ||
| 116 | syntax-table)) | ||
| 117 | (widgetp val)) | ||
| 118 | (setq val (pp-to-string val) | ||
| 119 | len (length val))) | ||
| 120 | (push (list key val len) ret)) | ||
| 121 | ret) | 110 | ret) |
| 122 | (lambda (a b) | 111 | (lambda (a b) (string< (nth 0 a) (nth 0 b))))) |
| 123 | (< (nth 2 a) | ||
| 124 | (nth 2 b))))) | ||
| 125 | (let ((key (nth 0 elt)) | 112 | (let ((key (nth 0 elt)) |
| 126 | (value (nth 1 elt))) | 113 | (value (nth 1 elt))) |
| 127 | (widget-insert (propertize (format " %-20s " key) | 114 | (widget-insert (propertize (format " %-20s " key) |
| @@ -131,23 +118,15 @@ into widget buttons that call `describe-text-category' or | |||
| 131 | :notify `(lambda (&rest ignore) | 118 | :notify `(lambda (&rest ignore) |
| 132 | (describe-text-category ',value)) | 119 | (describe-text-category ',value)) |
| 133 | (format "%S" value))) | 120 | (format "%S" value))) |
| 134 | ((memq key '(face font-lock-face)) | 121 | ((memq key '(face font-lock-face mouse-face)) |
| 135 | (widget-create 'link | 122 | (widget-create 'link |
| 136 | :notify `(lambda (&rest ignore) | 123 | :notify `(lambda (&rest ignore) |
| 137 | (describe-face ',value)) | 124 | (describe-face ',value)) |
| 138 | (format "%S" value))) | 125 | (format "%S" value))) |
| 139 | ((eq key 'syntax-table) | ||
| 140 | (widget-create 'push-button | ||
| 141 | :tag "show" | ||
| 142 | :action (lambda (widget &optional event) | ||
| 143 | (with-output-to-temp-buffer | ||
| 144 | "*Pp Eval Output*" | ||
| 145 | (pp (widget-get widget :value)))) | ||
| 146 | value)) | ||
| 147 | ((widgetp value) | 126 | ((widgetp value) |
| 148 | (describe-text-widget value)) | 127 | (describe-text-widget value)) |
| 149 | (t | 128 | (t |
| 150 | (widget-insert value)))) | 129 | (describe-text-sexp value)))) |
| 151 | (widget-insert "\n"))) | 130 | (widget-insert "\n"))) |
| 152 | 131 | ||
| 153 | ;;; Describe-Text Commands. | 132 | ;;; Describe-Text Commands. |
| @@ -552,10 +531,17 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 552 | (dotimes (i (length disp-vector)) | 531 | (dotimes (i (length disp-vector)) |
| 553 | (setq char (aref disp-vector i)) | 532 | (setq char (aref disp-vector i)) |
| 554 | (aset disp-vector i | 533 | (aset disp-vector i |
| 555 | (cons char (describe-char-display pos char)))) | 534 | (cons char (describe-char-display |
| 535 | pos (logand char #x7ffff))))) | ||
| 556 | (format "by display table entry [%s] (see below)" | 536 | (format "by display table entry [%s] (see below)" |
| 557 | (mapconcat #'(lambda (x) (format "?%c" (car x))) | 537 | (mapconcat |
| 558 | disp-vector " "))) | 538 | #'(lambda (x) |
| 539 | (if (> (car x) #x7ffff) | ||
| 540 | (format "?%c<face-id=%s>" | ||
| 541 | (logand (car x) #x7ffff) | ||
| 542 | (lsh (car x) -19)) | ||
| 543 | (format "?%c" (car x)))) | ||
| 544 | disp-vector " "))) | ||
| 559 | (composition | 545 | (composition |
| 560 | (let ((from (car composition)) | 546 | (let ((from (car composition)) |
| 561 | (to (nth 1 composition)) | 547 | (to (nth 1 composition)) |
| @@ -627,7 +613,7 @@ as well as widgets, buttons, overlays, and text properties." | |||
| 627 | (progn | 613 | (progn |
| 628 | (insert "these fonts (glyph codes):\n") | 614 | (insert "these fonts (glyph codes):\n") |
| 629 | (dotimes (i (length disp-vector)) | 615 | (dotimes (i (length disp-vector)) |
| 630 | (insert (car (aref disp-vector i)) ?: | 616 | (insert (logand (car (aref disp-vector i)) #x7ffff) ?: |
| 631 | (propertize " " 'display '(space :align-to 5)) | 617 | (propertize " " 'display '(space :align-to 5)) |
| 632 | (if (cdr (aref disp-vector i)) | 618 | (if (cdr (aref disp-vector i)) |
| 633 | (format "%s (0x%02X)" (cadr (aref disp-vector i)) | 619 | (format "%s (0x%02X)" (cadr (aref disp-vector i)) |
diff --git a/lisp/dired.el b/lisp/dired.el index 19ea0768e2b..037bf282eda 100644 --- a/lisp/dired.el +++ b/lisp/dired.el | |||
| @@ -1104,6 +1104,7 @@ Do so according to the former subdir alist OLD-SUBDIR-ALIST." | |||
| 1104 | (let ((map (make-keymap))) | 1104 | (let ((map (make-keymap))) |
| 1105 | (suppress-keymap map) | 1105 | (suppress-keymap map) |
| 1106 | (define-key map [mouse-2] 'dired-mouse-find-file-other-window) | 1106 | (define-key map [mouse-2] 'dired-mouse-find-file-other-window) |
| 1107 | (define-key map [follow-link] 'mouse-face) | ||
| 1107 | ;; Commands to mark or flag certain categories of files | 1108 | ;; Commands to mark or flag certain categories of files |
| 1108 | (define-key map "#" 'dired-flag-auto-save-files) | 1109 | (define-key map "#" 'dired-flag-auto-save-files) |
| 1109 | (define-key map "." 'dired-clean-directory) | 1110 | (define-key map "." 'dired-clean-directory) |
diff --git a/lisp/emacs-lisp/bytecomp.el b/lisp/emacs-lisp/bytecomp.el index 2048bd6212f..a11831f944e 100644 --- a/lisp/emacs-lisp/bytecomp.el +++ b/lisp/emacs-lisp/bytecomp.el | |||
| @@ -2178,7 +2178,7 @@ list that represents a doc string reference. | |||
| 2178 | (let ((old-load-list current-load-list) | 2178 | (let ((old-load-list current-load-list) |
| 2179 | (args (mapcar 'eval (cdr form)))) | 2179 | (args (mapcar 'eval (cdr form)))) |
| 2180 | (apply 'require args) | 2180 | (apply 'require args) |
| 2181 | ;; Detech (require 'cl) in a way that works even if cl is already loaded. | 2181 | ;; Detect (require 'cl) in a way that works even if cl is already loaded. |
| 2182 | (if (member (car args) '("cl" cl)) | 2182 | (if (member (car args) '("cl" cl)) |
| 2183 | (setq byte-compile-warnings | 2183 | (setq byte-compile-warnings |
| 2184 | (remq 'cl-functions byte-compile-warnings)))) | 2184 | (remq 'cl-functions byte-compile-warnings)))) |
diff --git a/lisp/emacs-lisp/checkdoc.el b/lisp/emacs-lisp/checkdoc.el index cc2be890657..7b022e9f118 100644 --- a/lisp/emacs-lisp/checkdoc.el +++ b/lisp/emacs-lisp/checkdoc.el | |||
| @@ -919,7 +919,7 @@ is the starting location. If this is nil, `point-min' is used instead." | |||
| 919 | (progn | 919 | (progn |
| 920 | (goto-char wrong) | 920 | (goto-char wrong) |
| 921 | (if (not take-notes) | 921 | (if (not take-notes) |
| 922 | (error (checkdoc-error-text msg))))) | 922 | (error "%s" (checkdoc-error-text msg))))) |
| 923 | (checkdoc-show-diagnostics) | 923 | (checkdoc-show-diagnostics) |
| 924 | (if (interactive-p) | 924 | (if (interactive-p) |
| 925 | (message "No style warnings.")))) | 925 | (message "No style warnings.")))) |
| @@ -952,7 +952,7 @@ if there is one." | |||
| 952 | (e (checkdoc-file-comments-engine)) | 952 | (e (checkdoc-file-comments-engine)) |
| 953 | (checkdoc-generate-compile-warnings-flag | 953 | (checkdoc-generate-compile-warnings-flag |
| 954 | (or take-notes checkdoc-generate-compile-warnings-flag))) | 954 | (or take-notes checkdoc-generate-compile-warnings-flag))) |
| 955 | (if e (error (checkdoc-error-text e))) | 955 | (if e (error "%s" (checkdoc-error-text e))) |
| 956 | (checkdoc-show-diagnostics) | 956 | (checkdoc-show-diagnostics) |
| 957 | e)) | 957 | e)) |
| 958 | 958 | ||
| @@ -990,7 +990,7 @@ Optional argument TAKE-NOTES causes all errors to be logged." | |||
| 990 | (if (not (interactive-p)) | 990 | (if (not (interactive-p)) |
| 991 | e | 991 | e |
| 992 | (if e | 992 | (if e |
| 993 | (error (checkdoc-error-text e)) | 993 | (error "%s" (checkdoc-error-text e)) |
| 994 | (checkdoc-show-diagnostics))) | 994 | (checkdoc-show-diagnostics))) |
| 995 | (goto-char p)) | 995 | (goto-char p)) |
| 996 | (if (interactive-p) (message "Checking interactive message text...done."))) | 996 | (if (interactive-p) (message "Checking interactive message text...done."))) |
| @@ -1033,15 +1033,15 @@ space at the end of each line." | |||
| 1033 | (msg (checkdoc-this-string-valid))) | 1033 | (msg (checkdoc-this-string-valid))) |
| 1034 | (if msg (if no-error | 1034 | (if msg (if no-error |
| 1035 | (message (checkdoc-error-text msg)) | 1035 | (message (checkdoc-error-text msg)) |
| 1036 | (error (checkdoc-error-text msg))) | 1036 | (error "%s" (checkdoc-error-text msg))) |
| 1037 | (setq msg (checkdoc-message-text-search beg end)) | 1037 | (setq msg (checkdoc-message-text-search beg end)) |
| 1038 | (if msg (if no-error | 1038 | (if msg (if no-error |
| 1039 | (message (checkdoc-error-text msg)) | 1039 | (message (checkdoc-error-text msg)) |
| 1040 | (error (checkdoc-error-text msg))) | 1040 | (error "%s" (checkdoc-error-text msg))) |
| 1041 | (setq msg (checkdoc-rogue-space-check-engine beg end)) | 1041 | (setq msg (checkdoc-rogue-space-check-engine beg end)) |
| 1042 | (if msg (if no-error | 1042 | (if msg (if no-error |
| 1043 | (message (checkdoc-error-text msg)) | 1043 | (message (checkdoc-error-text msg)) |
| 1044 | (error (checkdoc-error-text msg)))))) | 1044 | (error "%s" (checkdoc-error-text msg)))))) |
| 1045 | (if (interactive-p) (message "Checkdoc: done.")))))) | 1045 | (if (interactive-p) (message "Checkdoc: done.")))))) |
| 1046 | 1046 | ||
| 1047 | ;;; Ispell interface for forcing a spell check | 1047 | ;;; Ispell interface for forcing a spell check |
diff --git a/lisp/emacs-lisp/elint.el b/lisp/emacs-lisp/elint.el index bf9c1d39f95..9454bfc9da3 100644 --- a/lisp/emacs-lisp/elint.el +++ b/lisp/emacs-lisp/elint.el | |||
| @@ -50,6 +50,85 @@ | |||
| 50 | "*The buffer to insert lint messages in.") | 50 | "*The buffer to insert lint messages in.") |
| 51 | 51 | ||
| 52 | ;;; | 52 | ;;; |
| 53 | ;;; Data | ||
| 54 | ;;; | ||
| 55 | |||
| 56 | (defconst elint-standard-variables | ||
| 57 | '(abbrev-mode auto-fill-function buffer-auto-save-file-name | ||
| 58 | buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format | ||
| 59 | buffer-file-name buffer-file-number buffer-file-truename | ||
| 60 | buffer-file-type buffer-invisibility-spec buffer-offer-save | ||
| 61 | buffer-read-only buffer-saved-size buffer-undo-list | ||
| 62 | cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column | ||
| 63 | default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column | ||
| 64 | header-line-format indicate-buffer-boundaries indicate-empty-lines | ||
| 65 | left-fringe-width | ||
| 66 | left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode | ||
| 67 | mark-active mark-ring mode-line-buffer-identification | ||
| 68 | mode-line-format mode-line-modified mode-line-process mode-name | ||
| 69 | overwrite-mode | ||
| 70 | point-before-scroll right-fringe-width right-margin-width | ||
| 71 | scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display | ||
| 72 | selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar) | ||
| 73 | "Standard buffer local vars.") | ||
| 74 | |||
| 75 | (defconst elint-unknown-builtin-args | ||
| 76 | '((while test &rest forms) | ||
| 77 | (insert-before-markers-and-inherit &rest text) | ||
| 78 | (catch tag &rest body) | ||
| 79 | (and &rest args) | ||
| 80 | (funcall func &rest args) | ||
| 81 | (insert &rest args) | ||
| 82 | (vconcat &rest args) | ||
| 83 | (run-hook-with-args hook &rest args) | ||
| 84 | (message-or-box string &rest args) | ||
| 85 | (save-window-excursion &rest body) | ||
| 86 | (append &rest args) | ||
| 87 | (logior &rest args) | ||
| 88 | (progn &rest body) | ||
| 89 | (insert-and-inherit &rest args) | ||
| 90 | (message-box string &rest args) | ||
| 91 | (prog2 x y &rest body) | ||
| 92 | (prog1 first &rest body) | ||
| 93 | (insert-before-markers &rest args) | ||
| 94 | (call-process-region start end program &optional delete | ||
| 95 | destination display &rest args) | ||
| 96 | (concat &rest args) | ||
| 97 | (vector &rest args) | ||
| 98 | (run-hook-with-args-until-success hook &rest args) | ||
| 99 | (track-mouse &rest body) | ||
| 100 | (unwind-protect bodyform &rest unwindforms) | ||
| 101 | (save-restriction &rest body) | ||
| 102 | (quote arg) | ||
| 103 | (make-byte-code &rest args) | ||
| 104 | (or &rest args) | ||
| 105 | (cond &rest clauses) | ||
| 106 | (start-process name buffer program &rest args) | ||
| 107 | (run-hook-with-args-until-failure hook &rest args) | ||
| 108 | (if cond then &rest else) | ||
| 109 | (apply function &rest args) | ||
| 110 | (format string &rest args) | ||
| 111 | (encode-time second minute hour day month year zone &rest args) | ||
| 112 | (min &rest args) | ||
| 113 | (logand &rest args) | ||
| 114 | (logxor &rest args) | ||
| 115 | (max &rest args) | ||
| 116 | (list &rest args) | ||
| 117 | (message string &rest args) | ||
| 118 | (defvar symbol init doc) | ||
| 119 | (call-process program &optional infile destination display &rest args) | ||
| 120 | (with-output-to-temp-buffer bufname &rest body) | ||
| 121 | (nconc &rest args) | ||
| 122 | (save-excursion &rest body) | ||
| 123 | (run-hooks &rest hooks) | ||
| 124 | (/ x y &rest zs) | ||
| 125 | (- x &rest y) | ||
| 126 | (+ &rest args) | ||
| 127 | (* &rest args) | ||
| 128 | (interactive &optional args)) | ||
| 129 | "Those built-ins for which we can't find arguments.") | ||
| 130 | |||
| 131 | ;;; | ||
| 53 | ;;; ADT: top-form | 132 | ;;; ADT: top-form |
| 54 | ;;; | 133 | ;;; |
| 55 | 134 | ||
| @@ -724,85 +803,6 @@ If no documentation could be found args will be `unknown'." | |||
| 724 | (if list list | 803 | (if list list |
| 725 | (elint-find-builtins)))) | 804 | (elint-find-builtins)))) |
| 726 | 805 | ||
| 727 | ;;; | ||
| 728 | ;;; Data | ||
| 729 | ;;; | ||
| 730 | |||
| 731 | (defconst elint-standard-variables | ||
| 732 | '(abbrev-mode auto-fill-function buffer-auto-save-file-name | ||
| 733 | buffer-backed-up buffer-display-count buffer-display-table buffer-display-time buffer-file-coding-system buffer-file-format | ||
| 734 | buffer-file-name buffer-file-number buffer-file-truename | ||
| 735 | buffer-file-type buffer-invisibility-spec buffer-offer-save | ||
| 736 | buffer-read-only buffer-saved-size buffer-undo-list | ||
| 737 | cache-long-line-scans case-fold-search ctl-arrow cursor-type comment-column | ||
| 738 | default-directory defun-prompt-regexp desktop-save-buffer enable-multibyte-characters fill-column fringes-outside-margins goal-column | ||
| 739 | header-line-format indicate-buffer-boundaries indicate-empty-lines | ||
| 740 | left-fringe-width | ||
| 741 | left-margin left-margin-width line-spacing local-abbrev-table local-write-file-hooks major-mode | ||
| 742 | mark-active mark-ring mode-line-buffer-identification | ||
| 743 | mode-line-format mode-line-modified mode-line-process mode-name | ||
| 744 | overwrite-mode | ||
| 745 | point-before-scroll right-fringe-width right-margin-width | ||
| 746 | scroll-bar-width scroll-down-aggressively scroll-up-aggressively selective-display | ||
| 747 | selective-display-ellipses tab-width truncate-lines vc-mode vertical-scroll-bar) | ||
| 748 | "Standard buffer local vars.") | ||
| 749 | |||
| 750 | (defconst elint-unknown-builtin-args | ||
| 751 | '((while test &rest forms) | ||
| 752 | (insert-before-markers-and-inherit &rest text) | ||
| 753 | (catch tag &rest body) | ||
| 754 | (and &rest args) | ||
| 755 | (funcall func &rest args) | ||
| 756 | (insert &rest args) | ||
| 757 | (vconcat &rest args) | ||
| 758 | (run-hook-with-args hook &rest args) | ||
| 759 | (message-or-box string &rest args) | ||
| 760 | (save-window-excursion &rest body) | ||
| 761 | (append &rest args) | ||
| 762 | (logior &rest args) | ||
| 763 | (progn &rest body) | ||
| 764 | (insert-and-inherit &rest args) | ||
| 765 | (message-box string &rest args) | ||
| 766 | (prog2 x y &rest body) | ||
| 767 | (prog1 first &rest body) | ||
| 768 | (insert-before-markers &rest args) | ||
| 769 | (call-process-region start end program &optional delete | ||
| 770 | destination display &rest args) | ||
| 771 | (concat &rest args) | ||
| 772 | (vector &rest args) | ||
| 773 | (run-hook-with-args-until-success hook &rest args) | ||
| 774 | (track-mouse &rest body) | ||
| 775 | (unwind-protect bodyform &rest unwindforms) | ||
| 776 | (save-restriction &rest body) | ||
| 777 | (quote arg) | ||
| 778 | (make-byte-code &rest args) | ||
| 779 | (or &rest args) | ||
| 780 | (cond &rest clauses) | ||
| 781 | (start-process name buffer program &rest args) | ||
| 782 | (run-hook-with-args-until-failure hook &rest args) | ||
| 783 | (if cond then &rest else) | ||
| 784 | (apply function &rest args) | ||
| 785 | (format string &rest args) | ||
| 786 | (encode-time second minute hour day month year zone &rest args) | ||
| 787 | (min &rest args) | ||
| 788 | (logand &rest args) | ||
| 789 | (logxor &rest args) | ||
| 790 | (max &rest args) | ||
| 791 | (list &rest args) | ||
| 792 | (message string &rest args) | ||
| 793 | (defvar symbol init doc) | ||
| 794 | (call-process program &optional infile destination display &rest args) | ||
| 795 | (with-output-to-temp-buffer bufname &rest body) | ||
| 796 | (nconc &rest args) | ||
| 797 | (save-excursion &rest body) | ||
| 798 | (run-hooks &rest hooks) | ||
| 799 | (/ x y &rest zs) | ||
| 800 | (- x &rest y) | ||
| 801 | (+ &rest args) | ||
| 802 | (* &rest args) | ||
| 803 | (interactive &optional args)) | ||
| 804 | "Those built-ins for which we can't find arguments.") | ||
| 805 | |||
| 806 | (provide 'elint) | 806 | (provide 'elint) |
| 807 | 807 | ||
| 808 | ;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f | 808 | ;;; arch-tag: b2f061e2-af84-4ddc-8e39-f5e969ac228f |
diff --git a/lisp/emacs-lisp/lisp.el b/lisp/emacs-lisp/lisp.el index 87b3fcff96c..82882d6c2b7 100644 --- a/lisp/emacs-lisp/lisp.el +++ b/lisp/emacs-lisp/lisp.el | |||
| @@ -73,17 +73,18 @@ move forward across N balanced expressions." | |||
| 73 | "Set mark ARG sexps from point. | 73 | "Set mark ARG sexps from point. |
| 74 | The place mark goes is the same place \\[forward-sexp] would | 74 | The place mark goes is the same place \\[forward-sexp] would |
| 75 | move to with the same argument. | 75 | move to with the same argument. |
| 76 | If this command is repeated, it marks the next ARG sexps after the ones | 76 | If this command is repeated or mark is active in Transient Mark mode, |
| 77 | already marked." | 77 | it marks the next ARG sexps after the ones already marked." |
| 78 | (interactive "P") | 78 | (interactive "P") |
| 79 | (cond ((and (eq last-command this-command) (mark t)) | 79 | (cond ((or (and (eq last-command this-command) (mark t)) |
| 80 | (and transient-mark-mode mark-active)) | ||
| 80 | (setq arg (if arg (prefix-numeric-value arg) | 81 | (setq arg (if arg (prefix-numeric-value arg) |
| 81 | (if (> (mark) (point)) 1 -1))) | 82 | (if (< (mark) (point)) -1 1))) |
| 82 | (set-mark | 83 | (set-mark |
| 83 | (save-excursion | 84 | (save-excursion |
| 84 | (goto-char (mark)) | 85 | (goto-char (mark)) |
| 85 | (forward-sexp arg) | 86 | (forward-sexp arg) |
| 86 | (point)))) | 87 | (point)))) |
| 87 | (t | 88 | (t |
| 88 | (push-mark | 89 | (push-mark |
| 89 | (save-excursion | 90 | (save-excursion |
| @@ -191,9 +192,10 @@ open-parenthesis, and point ends up at the beginning of the line. | |||
| 191 | If variable `beginning-of-defun-function' is non-nil, its value | 192 | If variable `beginning-of-defun-function' is non-nil, its value |
| 192 | is called as a function to find the defun's beginning." | 193 | is called as a function to find the defun's beginning." |
| 193 | (interactive "p") | 194 | (interactive "p") |
| 194 | (and (eq this-command 'beginning-of-defun) | 195 | (or (not (eq this-command 'beginning-of-defun)) |
| 195 | (or inhibit-mark-movement (eq last-command 'beginning-of-defun) | 196 | (eq last-command 'beginning-of-defun) |
| 196 | (push-mark))) | 197 | (and transient-mark-mode mark-active) |
| 198 | (push-mark)) | ||
| 197 | (and (beginning-of-defun-raw arg) | 199 | (and (beginning-of-defun-raw arg) |
| 198 | (progn (beginning-of-line) t))) | 200 | (progn (beginning-of-line) t))) |
| 199 | 201 | ||
| @@ -242,9 +244,10 @@ matches the open-parenthesis that starts a defun; see function | |||
| 242 | If variable `end-of-defun-function' is non-nil, its value | 244 | If variable `end-of-defun-function' is non-nil, its value |
| 243 | is called as a function to find the defun's end." | 245 | is called as a function to find the defun's end." |
| 244 | (interactive "p") | 246 | (interactive "p") |
| 245 | (and (eq this-command 'end-of-defun) | 247 | (or (not (eq this-command 'end-of-defun)) |
| 246 | (or inhibit-mark-movement (eq last-command 'end-of-defun) | 248 | (eq last-command 'end-of-defun) |
| 247 | (push-mark))) | 249 | (and transient-mark-mode mark-active) |
| 250 | (push-mark)) | ||
| 248 | (if (or (null arg) (= arg 0)) (setq arg 1)) | 251 | (if (or (null arg) (= arg 0)) (setq arg 1)) |
| 249 | (if end-of-defun-function | 252 | (if end-of-defun-function |
| 250 | (if (> arg 0) | 253 | (if (> arg 0) |
| @@ -289,10 +292,11 @@ is called as a function to find the defun's end." | |||
| 289 | (defun mark-defun () | 292 | (defun mark-defun () |
| 290 | "Put mark at end of this defun, point at beginning. | 293 | "Put mark at end of this defun, point at beginning. |
| 291 | The defun marked is the one that contains point or follows point. | 294 | The defun marked is the one that contains point or follows point. |
| 292 | If this command is repeated, marks more defuns after the ones | 295 | If this command is repeated or mark is active in Transient Mark mode, |
| 293 | already marked." | 296 | it marks more defuns after the ones already marked." |
| 294 | (interactive) | 297 | (interactive) |
| 295 | (cond ((and (eq last-command this-command) (mark t)) | 298 | (cond ((or (and (eq last-command this-command) (mark t)) |
| 299 | (and transient-mark-mode mark-active)) | ||
| 296 | (set-mark | 300 | (set-mark |
| 297 | (save-excursion | 301 | (save-excursion |
| 298 | (goto-char (mark)) | 302 | (goto-char (mark)) |
diff --git a/lisp/emulation/cua-base.el b/lisp/emulation/cua-base.el index 523a07d26de..24adae30040 100644 --- a/lisp/emulation/cua-base.el +++ b/lisp/emulation/cua-base.el | |||
| @@ -1003,14 +1003,6 @@ Extra commands should be added to `cua-movement-commands'") | |||
| 1003 | (defvar cua-movement-commands nil | 1003 | (defvar cua-movement-commands nil |
| 1004 | "User may add additional movement commands to this list.") | 1004 | "User may add additional movement commands to this list.") |
| 1005 | 1005 | ||
| 1006 | (defvar cua--preserve-mark-commands | ||
| 1007 | '(end-of-buffer beginning-of-buffer) | ||
| 1008 | "List of movement commands that move the mark. | ||
| 1009 | CUA will preserve the previous mark position if a mark is already | ||
| 1010 | active before one of these commands is executed.") | ||
| 1011 | |||
| 1012 | (defvar cua--undo-push-mark nil) | ||
| 1013 | |||
| 1014 | ;;; Scrolling commands which does not signal errors at top/bottom | 1006 | ;;; Scrolling commands which does not signal errors at top/bottom |
| 1015 | ;;; of buffer at first key-press (instead moves to top/bottom | 1007 | ;;; of buffer at first key-press (instead moves to top/bottom |
| 1016 | ;;; of buffer). | 1008 | ;;; of buffer). |
| @@ -1100,11 +1092,7 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1100 | (aref (if window-system | 1092 | (aref (if window-system |
| 1101 | (this-single-command-raw-keys) | 1093 | (this-single-command-raw-keys) |
| 1102 | (this-single-command-keys)) 0))) | 1094 | (this-single-command-keys)) 0))) |
| 1103 | (if mark-active | 1095 | (unless mark-active |
| 1104 | (if (and (memq this-command cua--preserve-mark-commands) | ||
| 1105 | (not inhibit-mark-movement)) | ||
| 1106 | (setq cua--undo-push-mark t | ||
| 1107 | inhibit-mark-movement t)) | ||
| 1108 | (push-mark-command nil t)) | 1096 | (push-mark-command nil t)) |
| 1109 | (setq cua--last-region-shifted t) | 1097 | (setq cua--last-region-shifted t) |
| 1110 | (setq cua--explicit-region-start nil)) | 1098 | (setq cua--explicit-region-start nil)) |
| @@ -1151,9 +1139,6 @@ If ARG is the atom `-', scroll upward by nearly full screen." | |||
| 1151 | (defun cua--post-command-handler () | 1139 | (defun cua--post-command-handler () |
| 1152 | (condition-case nil | 1140 | (condition-case nil |
| 1153 | (progn | 1141 | (progn |
| 1154 | (when cua--undo-push-mark | ||
| 1155 | (setq cua--undo-push-mark nil | ||
| 1156 | inhibit-mark-movement nil)) | ||
| 1157 | (when cua--global-mark-active | 1142 | (when cua--global-mark-active |
| 1158 | (cua--global-mark-post-command)) | 1143 | (cua--global-mark-post-command)) |
| 1159 | (when (fboundp 'cua--rectangle-post-command) | 1144 | (when (fboundp 'cua--rectangle-post-command) |
diff --git a/lisp/faces.el b/lisp/faces.el index 7be6f7f55c5..a9189d5f8f6 100644 --- a/lisp/faces.el +++ b/lisp/faces.el | |||
| @@ -1334,21 +1334,29 @@ If SPEC is nil, return nil." | |||
| 1334 | (unless frame | 1334 | (unless frame |
| 1335 | (setq frame (selected-frame))) | 1335 | (setq frame (selected-frame))) |
| 1336 | (let ((tail spec) | 1336 | (let ((tail spec) |
| 1337 | result all) | 1337 | result defaults) |
| 1338 | (while tail | 1338 | (while tail |
| 1339 | (let* ((entry (pop tail)) | 1339 | (let* ((entry (pop tail)) |
| 1340 | (display (car entry)) | 1340 | (display (car entry)) |
| 1341 | (attrs (cdr entry))) | 1341 | (attrs (cdr entry)) |
| 1342 | (when (face-spec-set-match-display display frame) | 1342 | thisval) |
| 1343 | (setq result (if (null (cdr attrs)) ;; was (listp (car attrs)) | 1343 | ;; Get the attributes as actually specified by this alternative. |
| 1344 | ;; Old-style entry, the attribute list is the | 1344 | (setq thisval |
| 1345 | ;; first element. | 1345 | (if (null (cdr attrs)) ;; was (listp (car attrs)) |
| 1346 | (car attrs) | 1346 | ;; Old-style entry, the attribute list is the |
| 1347 | attrs)) | 1347 | ;; first element. |
| 1348 | (if (eq display t) | 1348 | (car attrs) |
| 1349 | (setq all result result nil) | 1349 | attrs)) |
| 1350 | |||
| 1351 | ;; If the condition is `default', that sets the default | ||
| 1352 | ;; for following conditions. | ||
| 1353 | (if (eq display 'default) | ||
| 1354 | (setq defaults thisval) | ||
| 1355 | ;; Otherwise, if it matches, use it. | ||
| 1356 | (when (face-spec-set-match-display display frame) | ||
| 1357 | (setq result thisval) | ||
| 1350 | (setq tail nil))))) | 1358 | (setq tail nil))))) |
| 1351 | (if all (append result all) result))) | 1359 | (if defaults (append result defaults) result))) |
| 1352 | 1360 | ||
| 1353 | 1361 | ||
| 1354 | (defun face-spec-reset-face (face &optional frame) | 1362 | (defun face-spec-reset-face (face &optional frame) |
| @@ -1816,7 +1824,7 @@ created." | |||
| 1816 | :group 'basic-faces) | 1824 | :group 'basic-faces) |
| 1817 | 1825 | ||
| 1818 | (defface mode-line-inactive | 1826 | (defface mode-line-inactive |
| 1819 | '((t | 1827 | '((default |
| 1820 | :inherit mode-line) | 1828 | :inherit mode-line) |
| 1821 | (((type x w32 mac) (background light) (class color)) | 1829 | (((type x w32 mac) (background light) (class color)) |
| 1822 | :weight light | 1830 | :weight light |
| @@ -1836,7 +1844,7 @@ created." | |||
| 1836 | (put 'modeline-inactive 'face-alias 'mode-line-inactive) | 1844 | (put 'modeline-inactive 'face-alias 'mode-line-inactive) |
| 1837 | 1845 | ||
| 1838 | (defface header-line | 1846 | (defface header-line |
| 1839 | '((t | 1847 | '((default |
| 1840 | :inherit mode-line) | 1848 | :inherit mode-line) |
| 1841 | (((type tty)) | 1849 | (((type tty)) |
| 1842 | ;; This used to be `:inverse-video t', but that doesn't look very | 1850 | ;; This used to be `:inverse-video t', but that doesn't look very |
| @@ -1872,7 +1880,7 @@ created." | |||
| 1872 | 1880 | ||
| 1873 | 1881 | ||
| 1874 | (defface tool-bar | 1882 | (defface tool-bar |
| 1875 | '((t | 1883 | '((default |
| 1876 | :box (:line-width 1 :style released-button) | 1884 | :box (:line-width 1 :style released-button) |
| 1877 | :foreground "black") | 1885 | :foreground "black") |
| 1878 | (((type x w32 mac) (class color)) | 1886 | (((type x w32 mac) (class color)) |
| @@ -2053,8 +2061,8 @@ Note: Other faces cannot inherit from the cursor face." | |||
| 2053 | 2061 | ||
| 2054 | (defface escape-glyph '((((background dark)) :foreground "cyan") | 2062 | (defface escape-glyph '((((background dark)) :foreground "cyan") |
| 2055 | (((type pc)) :foreground "magenta") | 2063 | (((type pc)) :foreground "magenta") |
| 2056 | (t :foreground "dark blue")) | 2064 | (t :foreground "blue")) |
| 2057 | "Face for displaying \\ and ^ in multichar glyphs." | 2065 | "Face for characters displayed as ^-sequences or \-sequences." |
| 2058 | :group 'basic-faces) | 2066 | :group 'basic-faces) |
| 2059 | 2067 | ||
| 2060 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 2068 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
diff --git a/lisp/ffap.el b/lisp/ffap.el index dc78bd355be..ab9d223256f 100644 --- a/lisp/ffap.el +++ b/lisp/ffap.el | |||
| @@ -42,10 +42,21 @@ | |||
| 42 | ;; | 42 | ;; |
| 43 | ;; ffap-bindings makes the following global key bindings: | 43 | ;; ffap-bindings makes the following global key bindings: |
| 44 | ;; | 44 | ;; |
| 45 | ;; C-x C-f find-file-at-point (abbreviated as ffap) | 45 | ;; C-x C-f find-file-at-point (abbreviated as ffap) |
| 46 | ;; C-x d dired-at-point | 46 | ;; C-x C-r ffap-read-only |
| 47 | ;; C-x 4 f ffap-other-window | 47 | ;; C-x C-v ffap-alternate-file |
| 48 | ;; C-x 5 f ffap-other-frame | 48 | ;; |
| 49 | ;; C-x d dired-at-point | ||
| 50 | ;; C-x C-d ffap-list-directory | ||
| 51 | ;; | ||
| 52 | ;; C-x 4 f ffap-other-window | ||
| 53 | ;; C-x 4 r ffap-read-only-other-window | ||
| 54 | ;; C-x 4 d ffap-dired-other-window | ||
| 55 | ;; | ||
| 56 | ;; C-x 5 f ffap-other-frame | ||
| 57 | ;; C-x 5 r ffap-read-only-other-frame | ||
| 58 | ;; C-x 5 d ffap-dired-other-frame | ||
| 59 | ;; | ||
| 49 | ;; S-mouse-3 ffap-at-mouse | 60 | ;; S-mouse-3 ffap-at-mouse |
| 50 | ;; C-S-mouse-3 ffap-menu | 61 | ;; C-S-mouse-3 ffap-menu |
| 51 | ;; | 62 | ;; |
| @@ -202,13 +213,17 @@ Sensible values are nil, \"news\", or \"mailto\"." | |||
| 202 | ;; through this section for features that you like, put an appropriate | 213 | ;; through this section for features that you like, put an appropriate |
| 203 | ;; enabler in your .emacs file. | 214 | ;; enabler in your .emacs file. |
| 204 | 215 | ||
| 205 | (defcustom ffap-dired-wildcards nil | 216 | (defcustom ffap-dired-wildcards "[*?][^/]*\\'" |
| 206 | ;; Suggestion from RHOGEE, 07 Jul 1994. Disabled, dired is still | ||
| 207 | ;; available by "C-x C-d <pattern>", and valid filenames may | ||
| 208 | ;; sometimes contain wildcard characters. | ||
| 209 | "*A regexp matching filename wildcard characters, or nil. | 217 | "*A regexp matching filename wildcard characters, or nil. |
| 218 | |||
| 210 | If `find-file-at-point' gets a filename matching this pattern, | 219 | If `find-file-at-point' gets a filename matching this pattern, |
| 211 | it passes it on to `dired' instead of `find-file'." | 220 | it passes it on to `find-file' with non-nil WILDCARDS argument, |
| 221 | which expands wildcards and visits multiple files. To visit | ||
| 222 | a file whose name contains wildcard characters you can suppress | ||
| 223 | wildcard expansion by setting `find-file-wildcards'. | ||
| 224 | |||
| 225 | If `dired-at-point' gets a filename matching this pattern, | ||
| 226 | it passes it on to `dired'." | ||
| 212 | :type '(choice (const :tag "Disable" nil) | 227 | :type '(choice (const :tag "Disable" nil) |
| 213 | (const :tag "Enable" "[*?][^/]*\\'") | 228 | (const :tag "Enable" "[*?][^/]*\\'") |
| 214 | ;; regexp -- probably not useful | 229 | ;; regexp -- probably not useful |
| @@ -236,6 +251,12 @@ ffap most of the time." | |||
| 236 | :group 'ffap) | 251 | :group 'ffap) |
| 237 | (put 'ffap-file-finder 'risky-local-variable t) | 252 | (put 'ffap-file-finder 'risky-local-variable t) |
| 238 | 253 | ||
| 254 | (defcustom ffap-directory-finder 'dired | ||
| 255 | "*The command called by `dired-at-point' to find a directory." | ||
| 256 | :type 'function | ||
| 257 | :group 'ffap) | ||
| 258 | (put 'ffap-directory-finder 'risky-local-variable t) | ||
| 259 | |||
| 239 | (defcustom ffap-url-fetcher | 260 | (defcustom ffap-url-fetcher |
| 240 | (if (fboundp 'browse-url) | 261 | (if (fboundp 'browse-url) |
| 241 | 'browse-url ; rely on browse-url-browser-function | 262 | 'browse-url ; rely on browse-url-browser-function |
| @@ -939,7 +960,7 @@ If t, `ffap-tex-init' will initialize this when needed.") | |||
| 939 | ;; Slightly controversial decisions: | 960 | ;; Slightly controversial decisions: |
| 940 | ;; * strip trailing "@" and ":" | 961 | ;; * strip trailing "@" and ":" |
| 941 | ;; * no commas (good for latex) | 962 | ;; * no commas (good for latex) |
| 942 | (file "--:$+<>@-Z_a-z~" "<@" "@>;.,!?:") | 963 | (file "--:$+<>@-Z_a-z~*?" "<@" "@>;.,!:") |
| 943 | ;; An url, or maybe a email/news message-id: | 964 | ;; An url, or maybe a email/news message-id: |
| 944 | (url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?") | 965 | (url "--:=&?$+@-Z_a-z~#,%;" "^A-Za-z0-9" ":;.,!?") |
| 945 | ;; Find a string that does *not* contain a colon: | 966 | ;; Find a string that does *not* contain a colon: |
| @@ -1120,8 +1141,8 @@ which may actually result in an url rather than a filename." | |||
| 1120 | (default-directory default-directory)) | 1141 | (default-directory default-directory)) |
| 1121 | (unwind-protect | 1142 | (unwind-protect |
| 1122 | (cond | 1143 | (cond |
| 1123 | ;; Immediate rejects (/ and // are too common in C++): | 1144 | ;; Immediate rejects (/ and // and /* are too common in C/C++): |
| 1124 | ((member name '("" "/" "//" ".")) nil) | 1145 | ((member name '("" "/" "//" "/*" ".")) nil) |
| 1125 | ;; Immediately test local filenames. If default-directory is | 1146 | ;; Immediately test local filenames. If default-directory is |
| 1126 | ;; remote, you probably already have a connection. | 1147 | ;; remote, you probably already have a connection. |
| 1127 | ((and (not abs) (ffap-file-exists-string name))) | 1148 | ((and (not abs) (ffap-file-exists-string name))) |
| @@ -1187,6 +1208,12 @@ which may actually result in an url rather than a filename." | |||
| 1187 | remote-dir (substring name (match-end 1))))) | 1208 | remote-dir (substring name (match-end 1))))) |
| 1188 | (ffap-file-exists-string | 1209 | (ffap-file-exists-string |
| 1189 | (ffap-replace-file-component remote-dir name)))))) | 1210 | (ffap-replace-file-component remote-dir name)))))) |
| 1211 | ((and ffap-dired-wildcards | ||
| 1212 | (string-match ffap-dired-wildcards name) | ||
| 1213 | abs | ||
| 1214 | (ffap-file-exists-string (file-name-directory | ||
| 1215 | (directory-file-name name))) | ||
| 1216 | name)) | ||
| 1190 | ;; Try all parent directories by deleting the trailing directory | 1217 | ;; Try all parent directories by deleting the trailing directory |
| 1191 | ;; name until existing directory is found or name stops changing | 1218 | ;; name until existing directory is found or name stops changing |
| 1192 | ((let ((dir name)) | 1219 | ((let ((dir name)) |
| @@ -1227,7 +1254,9 @@ which may actually result in an url rather than a filename." | |||
| 1227 | dir | 1254 | dir |
| 1228 | nil | 1255 | nil |
| 1229 | (if dir (cons guess (length dir)) guess) | 1256 | (if dir (cons guess (length dir)) guess) |
| 1230 | (list 'file-name-history)))) | 1257 | (list 'file-name-history) |
| 1258 | (and buffer-file-name | ||
| 1259 | (abbreviate-file-name buffer-file-name))))) | ||
| 1231 | ;; Do file substitution like (interactive "F"), suggested by MCOOK. | 1260 | ;; Do file substitution like (interactive "F"), suggested by MCOOK. |
| 1232 | (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess))) | 1261 | (or (ffap-url-p guess) (setq guess (substitute-in-file-name guess))) |
| 1233 | ;; Should not do it on url's, where $ is a common (VMS?) character. | 1262 | ;; Should not do it on url's, where $ is a common (VMS?) character. |
| @@ -1357,10 +1386,12 @@ See <ftp://ftp.mathcs.emory.edu/pub/mic/emacs/> for latest version." | |||
| 1357 | ((ffap-url-p filename) | 1386 | ((ffap-url-p filename) |
| 1358 | (let (current-prefix-arg) ; w3 2.3.25 bug, reported by KPC | 1387 | (let (current-prefix-arg) ; w3 2.3.25 bug, reported by KPC |
| 1359 | (funcall ffap-url-fetcher filename))) | 1388 | (funcall ffap-url-fetcher filename))) |
| 1360 | ;; This junk more properly belongs in a modified ffap-file-finder: | ||
| 1361 | ((and ffap-dired-wildcards | 1389 | ((and ffap-dired-wildcards |
| 1362 | (string-match ffap-dired-wildcards filename)) | 1390 | (string-match ffap-dired-wildcards filename) |
| 1363 | (dired filename)) | 1391 | find-file-wildcards |
| 1392 | ;; Check if it's find-file that supports wildcards arg | ||
| 1393 | (memq ffap-file-finder '(find-file find-alternate-file))) | ||
| 1394 | (funcall ffap-file-finder (expand-file-name filename) t)) | ||
| 1364 | ((or (not ffap-newfile-prompt) | 1395 | ((or (not ffap-newfile-prompt) |
| 1365 | (file-exists-p filename) | 1396 | (file-exists-p filename) |
| 1366 | (y-or-n-p "File does not exist, create buffer? ")) | 1397 | (y-or-n-p "File does not exist, create buffer? ")) |
| @@ -1556,9 +1587,7 @@ Return value: | |||
| 1556 | ))) | 1587 | ))) |
| 1557 | 1588 | ||
| 1558 | 1589 | ||
| 1559 | ;;; ffap-other-* commands: | 1590 | ;;; ffap-other-*, ffap-read-only-*, ffap-alternate-* commands: |
| 1560 | ;; | ||
| 1561 | ;; Requested by KPC. | ||
| 1562 | 1591 | ||
| 1563 | ;; There could be a real `ffap-noselect' function, but we would need | 1592 | ;; There could be a real `ffap-noselect' function, but we would need |
| 1564 | ;; at least two new user variables, and there is no w3-fetch-noselect. | 1593 | ;; at least two new user variables, and there is no w3-fetch-noselect. |
| @@ -1568,23 +1597,70 @@ Return value: | |||
| 1568 | "Like `ffap', but put buffer in another window. | 1597 | "Like `ffap', but put buffer in another window. |
| 1569 | Only intended for interactive use." | 1598 | Only intended for interactive use." |
| 1570 | (interactive) | 1599 | (interactive) |
| 1571 | (switch-to-buffer-other-window | 1600 | (let (value) |
| 1572 | (save-window-excursion (call-interactively 'ffap) (current-buffer)))) | 1601 | (switch-to-buffer-other-window |
| 1602 | (save-window-excursion | ||
| 1603 | (setq value (call-interactively 'ffap)) | ||
| 1604 | (unless (or (bufferp value) (bufferp (car-safe value))) | ||
| 1605 | (setq value (current-buffer))) | ||
| 1606 | (current-buffer))) | ||
| 1607 | value)) | ||
| 1573 | 1608 | ||
| 1574 | (defun ffap-other-frame nil | 1609 | (defun ffap-other-frame nil |
| 1575 | "Like `ffap', but put buffer in another frame. | 1610 | "Like `ffap', but put buffer in another frame. |
| 1576 | Only intended for interactive use." | 1611 | Only intended for interactive use." |
| 1577 | (interactive) | 1612 | (interactive) |
| 1578 | ;; Extra code works around dedicated windows (noted by JENS, 7/96): | 1613 | ;; Extra code works around dedicated windows (noted by JENS, 7/96): |
| 1579 | (let* ((win (selected-window)) (wdp (window-dedicated-p win))) | 1614 | (let* ((win (selected-window)) |
| 1615 | (wdp (window-dedicated-p win)) | ||
| 1616 | value) | ||
| 1580 | (unwind-protect | 1617 | (unwind-protect |
| 1581 | (progn | 1618 | (progn |
| 1582 | (set-window-dedicated-p win nil) | 1619 | (set-window-dedicated-p win nil) |
| 1583 | (switch-to-buffer-other-frame | 1620 | (switch-to-buffer-other-frame |
| 1584 | (save-window-excursion | 1621 | (save-window-excursion |
| 1585 | (call-interactively 'ffap) | 1622 | (setq value (call-interactively 'ffap)) |
| 1623 | (unless (or (bufferp value) (bufferp (car-safe value))) | ||
| 1624 | (setq value (current-buffer))) | ||
| 1586 | (current-buffer)))) | 1625 | (current-buffer)))) |
| 1587 | (set-window-dedicated-p win wdp)))) | 1626 | (set-window-dedicated-p win wdp)) |
| 1627 | value)) | ||
| 1628 | |||
| 1629 | (defun ffap-read-only () | ||
| 1630 | "Like `ffap', but mark buffer as read-only. | ||
| 1631 | Only intended for interactive use." | ||
| 1632 | (interactive) | ||
| 1633 | (let ((value (call-interactively 'ffap))) | ||
| 1634 | (unless (or (bufferp value) (bufferp (car-safe value))) | ||
| 1635 | (setq value (current-buffer))) | ||
| 1636 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1637 | (if (listp value) value (list value))) | ||
| 1638 | value)) | ||
| 1639 | |||
| 1640 | (defun ffap-read-only-other-window () | ||
| 1641 | "Like `ffap', but put buffer in another window and mark as read-only. | ||
| 1642 | Only intended for interactive use." | ||
| 1643 | (interactive) | ||
| 1644 | (let ((value (ffap-other-window))) | ||
| 1645 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1646 | (if (listp value) value (list value))) | ||
| 1647 | value)) | ||
| 1648 | |||
| 1649 | (defun ffap-read-only-other-frame () | ||
| 1650 | "Like `ffap', but put buffer in another frame and mark as read-only. | ||
| 1651 | Only intended for interactive use." | ||
| 1652 | (interactive) | ||
| 1653 | (let ((value (ffap-other-frame))) | ||
| 1654 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1655 | (if (listp value) value (list value))) | ||
| 1656 | value)) | ||
| 1657 | |||
| 1658 | (defun ffap-alternate-file () | ||
| 1659 | "Like `ffap' and `find-alternate-file'. | ||
| 1660 | Only intended for interactive use." | ||
| 1661 | (interactive) | ||
| 1662 | (let ((ffap-file-finder 'find-alternate-file)) | ||
| 1663 | (call-interactively 'ffap))) | ||
| 1588 | 1664 | ||
| 1589 | 1665 | ||
| 1590 | ;;; Bug Reporter: | 1666 | ;;; Bug Reporter: |
| @@ -1665,24 +1741,26 @@ ffap most of the time." | |||
| 1665 | (not current-prefix-arg) | 1741 | (not current-prefix-arg) |
| 1666 | current-prefix-arg)) | 1742 | current-prefix-arg)) |
| 1667 | (let (current-prefix-arg) ; already interpreted | 1743 | (let (current-prefix-arg) ; already interpreted |
| 1668 | (call-interactively 'dired)) | 1744 | (call-interactively ffap-directory-finder)) |
| 1669 | (or filename (setq filename (dired-at-point-prompter))) | 1745 | (or filename (setq filename (dired-at-point-prompter))) |
| 1670 | (cond | 1746 | (cond |
| 1671 | ((ffap-url-p filename) | 1747 | ((ffap-url-p filename) |
| 1672 | (funcall ffap-url-fetcher filename)) | 1748 | (funcall ffap-url-fetcher filename)) |
| 1673 | ((and ffap-dired-wildcards | 1749 | ((and ffap-dired-wildcards |
| 1674 | (string-match ffap-dired-wildcards filename)) | 1750 | (string-match ffap-dired-wildcards filename)) |
| 1675 | (dired filename)) | 1751 | (funcall ffap-directory-finder filename)) |
| 1676 | ((file-exists-p filename) | 1752 | ((file-exists-p filename) |
| 1677 | (if (file-directory-p filename) | 1753 | (if (file-directory-p filename) |
| 1678 | (dired (expand-file-name filename)) | 1754 | (funcall ffap-directory-finder |
| 1679 | (dired (concat (expand-file-name filename) "*")))) | 1755 | (expand-file-name filename)) |
| 1756 | (funcall ffap-directory-finder | ||
| 1757 | (concat (expand-file-name filename) "*")))) | ||
| 1680 | ((and (file-writable-p | 1758 | ((and (file-writable-p |
| 1681 | (or (file-name-directory (directory-file-name filename)) | 1759 | (or (file-name-directory (directory-file-name filename)) |
| 1682 | filename)) | 1760 | filename)) |
| 1683 | (y-or-n-p "Directory does not exist, create it? ")) | 1761 | (y-or-n-p "Directory does not exist, create it? ")) |
| 1684 | (make-directory filename) | 1762 | (make-directory filename) |
| 1685 | (dired filename)) | 1763 | (funcall ffap-directory-finder filename)) |
| 1686 | ((error "No such file or directory `%s'" filename))))) | 1764 | ((error "No such file or directory `%s'" filename))))) |
| 1687 | 1765 | ||
| 1688 | (defun dired-at-point-prompter (&optional guess) | 1766 | (defun dired-at-point-prompter (&optional guess) |
| @@ -1712,16 +1790,66 @@ ffap most of the time." | |||
| 1712 | (and guess (ffap-highlight)))) | 1790 | (and guess (ffap-highlight)))) |
| 1713 | (ffap-highlight t))) | 1791 | (ffap-highlight t))) |
| 1714 | 1792 | ||
| 1793 | ;;; ffap-dired-other-*, ffap-list-directory commands: | ||
| 1794 | |||
| 1795 | (defun ffap-dired-other-window () | ||
| 1796 | "Like `dired-at-point', but put buffer in another window. | ||
| 1797 | Only intended for interactive use." | ||
| 1798 | (interactive) | ||
| 1799 | (let (value) | ||
| 1800 | (switch-to-buffer-other-window | ||
| 1801 | (save-window-excursion | ||
| 1802 | (setq value (call-interactively 'dired-at-point)) | ||
| 1803 | (current-buffer))) | ||
| 1804 | value)) | ||
| 1805 | |||
| 1806 | (defun ffap-dired-other-frame () | ||
| 1807 | "Like `dired-at-point', but put buffer in another frame. | ||
| 1808 | Only intended for interactive use." | ||
| 1809 | (interactive) | ||
| 1810 | ;; Extra code works around dedicated windows (noted by JENS, 7/96): | ||
| 1811 | (let* ((win (selected-window)) | ||
| 1812 | (wdp (window-dedicated-p win)) | ||
| 1813 | value) | ||
| 1814 | (unwind-protect | ||
| 1815 | (progn | ||
| 1816 | (set-window-dedicated-p win nil) | ||
| 1817 | (switch-to-buffer-other-frame | ||
| 1818 | (save-window-excursion | ||
| 1819 | (setq value (call-interactively 'dired-at-point)) | ||
| 1820 | (current-buffer)))) | ||
| 1821 | (set-window-dedicated-p win wdp)) | ||
| 1822 | value)) | ||
| 1823 | |||
| 1824 | (defun ffap-list-directory () | ||
| 1825 | "Like `dired-at-point' and `list-directory'. | ||
| 1826 | Only intended for interactive use." | ||
| 1827 | (interactive) | ||
| 1828 | (let ((ffap-directory-finder 'list-directory)) | ||
| 1829 | (call-interactively 'dired-at-point))) | ||
| 1830 | |||
| 1831 | |||
| 1715 | ;;; Offer default global bindings (`ffap-bindings'): | 1832 | ;;; Offer default global bindings (`ffap-bindings'): |
| 1716 | 1833 | ||
| 1717 | (defvar ffap-bindings | 1834 | (defvar ffap-bindings |
| 1718 | '( | 1835 | '( |
| 1719 | (global-set-key [S-mouse-3] 'ffap-at-mouse) | 1836 | (global-set-key [S-mouse-3] 'ffap-at-mouse) |
| 1720 | (global-set-key [C-S-mouse-3] 'ffap-menu) | 1837 | (global-set-key [C-S-mouse-3] 'ffap-menu) |
| 1838 | |||
| 1721 | (global-set-key "\C-x\C-f" 'find-file-at-point) | 1839 | (global-set-key "\C-x\C-f" 'find-file-at-point) |
| 1840 | (global-set-key "\C-x\C-r" 'ffap-read-only) | ||
| 1841 | (global-set-key "\C-x\C-v" 'ffap-alternate-file) | ||
| 1842 | |||
| 1722 | (global-set-key "\C-x4f" 'ffap-other-window) | 1843 | (global-set-key "\C-x4f" 'ffap-other-window) |
| 1723 | (global-set-key "\C-x5f" 'ffap-other-frame) | 1844 | (global-set-key "\C-x5f" 'ffap-other-frame) |
| 1845 | (global-set-key "\C-x4r" 'ffap-read-only-other-window) | ||
| 1846 | (global-set-key "\C-x5r" 'ffap-read-only-other-frame) | ||
| 1847 | |||
| 1724 | (global-set-key "\C-xd" 'dired-at-point) | 1848 | (global-set-key "\C-xd" 'dired-at-point) |
| 1849 | (global-set-key "\C-x4d" 'ffap-dired-other-window) | ||
| 1850 | (global-set-key "\C-x5d" 'ffap-dired-other-frame) | ||
| 1851 | (global-set-key "\C-x\C-d" 'ffap-list-directory) | ||
| 1852 | |||
| 1725 | (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook) | 1853 | (add-hook 'gnus-summary-mode-hook 'ffap-gnus-hook) |
| 1726 | (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook) | 1854 | (add-hook 'gnus-article-mode-hook 'ffap-gnus-hook) |
| 1727 | (add-hook 'vm-mode-hook 'ffap-ro-mode-hook) | 1855 | (add-hook 'vm-mode-hook 'ffap-ro-mode-hook) |
diff --git a/lisp/filecache.el b/lisp/filecache.el index bd0b0f77781..90287ba5eef 100644 --- a/lisp/filecache.el +++ b/lisp/filecache.el | |||
| @@ -337,21 +337,20 @@ in each directory, not to the directory list itself." | |||
| 337 | Find is run in DIRECTORY." | 337 | Find is run in DIRECTORY." |
| 338 | (interactive "DAdd files under directory: ") | 338 | (interactive "DAdd files under directory: ") |
| 339 | (let ((dir (expand-file-name directory))) | 339 | (let ((dir (expand-file-name directory))) |
| 340 | (if (eq file-cache-find-command-posix-flag 'not-defined) | 340 | (when (memq system-type '(windows-nt cygwin)) |
| 341 | (setq file-cache-find-command-posix-flag | 341 | (if (eq file-cache-find-command-posix-flag 'not-defined) |
| 342 | (executable-command-find-posix-p file-cache-find-command))) | 342 | (setq file-cache-find-command-posix-flag |
| 343 | (executable-command-find-posix-p file-cache-find-command)))) | ||
| 343 | (set-buffer (get-buffer-create file-cache-buffer)) | 344 | (set-buffer (get-buffer-create file-cache-buffer)) |
| 344 | (erase-buffer) | 345 | (erase-buffer) |
| 345 | (call-process file-cache-find-command nil | 346 | (call-process file-cache-find-command nil |
| 346 | (get-buffer file-cache-buffer) nil | 347 | (get-buffer file-cache-buffer) nil |
| 347 | dir "-name" | 348 | dir "-name" |
| 348 | (cond | 349 | (if (memq system-type '(windows-nt cygwin)) |
| 349 | (file-cache-find-command-posix-flag | 350 | (if file-cache-find-command-posix-flag |
| 350 | "\\*") | 351 | "\\*" |
| 351 | ((eq system-type 'windows-nt) | 352 | "'*'") |
| 352 | "'*'") | 353 | "*") |
| 353 | (t | ||
| 354 | "*")) | ||
| 355 | "-print") | 354 | "-print") |
| 356 | (file-cache-add-from-file-cache-buffer))) | 355 | (file-cache-add-from-file-cache-buffer))) |
| 357 | 356 | ||
diff --git a/lisp/files.el b/lisp/files.el index 62068b2f217..0c7a6fff51b 100644 --- a/lisp/files.el +++ b/lisp/files.el | |||
| @@ -932,8 +932,7 @@ suppress wildcard expansion by setting `find-file-wildcards'. | |||
| 932 | 932 | ||
| 933 | To visit a file without any kind of conversion and without | 933 | To visit a file without any kind of conversion and without |
| 934 | automatically choosing a major mode, use \\[find-file-literally]." | 934 | automatically choosing a major mode, use \\[find-file-literally]." |
| 935 | (interactive | 935 | (interactive (find-file-read-args "Find file: " nil)) |
| 936 | (find-file-read-args "Find file: " nil)) | ||
| 937 | (let ((value (find-file-noselect filename nil nil wildcards))) | 936 | (let ((value (find-file-noselect filename nil nil wildcards))) |
| 938 | (if (listp value) | 937 | (if (listp value) |
| 939 | (mapcar 'switch-to-buffer (nreverse value)) | 938 | (mapcar 'switch-to-buffer (nreverse value)) |
| @@ -955,8 +954,8 @@ expand wildcards (if any) and visit multiple files." | |||
| 955 | (if (listp value) | 954 | (if (listp value) |
| 956 | (progn | 955 | (progn |
| 957 | (setq value (nreverse value)) | 956 | (setq value (nreverse value)) |
| 958 | (switch-to-buffer-other-window (car value)) | 957 | (cons (switch-to-buffer-other-window (car value)) |
| 959 | (mapcar 'switch-to-buffer (cdr value))) | 958 | (mapcar 'switch-to-buffer (cdr value)))) |
| 960 | (switch-to-buffer-other-window value)))) | 959 | (switch-to-buffer-other-window value)))) |
| 961 | 960 | ||
| 962 | (defun find-file-other-frame (filename &optional wildcards) | 961 | (defun find-file-other-frame (filename &optional wildcards) |
| @@ -975,8 +974,8 @@ expand wildcards (if any) and visit multiple files." | |||
| 975 | (if (listp value) | 974 | (if (listp value) |
| 976 | (progn | 975 | (progn |
| 977 | (setq value (nreverse value)) | 976 | (setq value (nreverse value)) |
| 978 | (switch-to-buffer-other-frame (car value)) | 977 | (cons (switch-to-buffer-other-frame (car value)) |
| 979 | (mapcar 'switch-to-buffer (cdr value))) | 978 | (mapcar 'switch-to-buffer (cdr value)))) |
| 980 | (switch-to-buffer-other-frame value)))) | 979 | (switch-to-buffer-other-frame value)))) |
| 981 | 980 | ||
| 982 | (defun find-file-existing (filename &optional wildcards) | 981 | (defun find-file-existing (filename &optional wildcards) |
| @@ -991,35 +990,53 @@ Like \\[find-file] but only allow files that exists." | |||
| 991 | "Edit file FILENAME but don't allow changes. | 990 | "Edit file FILENAME but don't allow changes. |
| 992 | Like \\[find-file] but marks buffer as read-only. | 991 | Like \\[find-file] but marks buffer as read-only. |
| 993 | Use \\[toggle-read-only] to permit editing." | 992 | Use \\[toggle-read-only] to permit editing." |
| 994 | (interactive (find-file-read-args "Find file read-only: " t)) | 993 | (interactive (find-file-read-args "Find file read-only: " nil)) |
| 995 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 994 | (unless (or (and wildcards find-file-wildcards |
| 996 | (find-file filename wildcards) | 995 | (not (string-match "\\`/:" filename)) |
| 997 | (toggle-read-only 1) | 996 | (string-match "[[*?]" filename)) |
| 998 | (current-buffer)) | 997 | (file-exists-p filename)) |
| 998 | (error "%s does not exist" filename)) | ||
| 999 | (let ((value (find-file filename wildcards))) | ||
| 1000 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1001 | (if (listp value) value (list value))) | ||
| 1002 | value)) | ||
| 999 | 1003 | ||
| 1000 | (defun find-file-read-only-other-window (filename &optional wildcards) | 1004 | (defun find-file-read-only-other-window (filename &optional wildcards) |
| 1001 | "Edit file FILENAME in another window but don't allow changes. | 1005 | "Edit file FILENAME in another window but don't allow changes. |
| 1002 | Like \\[find-file-other-window] but marks buffer as read-only. | 1006 | Like \\[find-file-other-window] but marks buffer as read-only. |
| 1003 | Use \\[toggle-read-only] to permit editing." | 1007 | Use \\[toggle-read-only] to permit editing." |
| 1004 | (interactive (find-file-read-args "Find file read-only other window: " t)) | 1008 | (interactive (find-file-read-args "Find file read-only other window: " nil)) |
| 1005 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 1009 | (unless (or (and wildcards find-file-wildcards |
| 1006 | (find-file-other-window filename wildcards) | 1010 | (not (string-match "\\`/:" filename)) |
| 1007 | (toggle-read-only 1) | 1011 | (string-match "[[*?]" filename)) |
| 1008 | (current-buffer)) | 1012 | (file-exists-p filename)) |
| 1013 | (error "%s does not exist" filename)) | ||
| 1014 | (let ((value (find-file-other-window filename wildcards))) | ||
| 1015 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1016 | (if (listp value) value (list value))) | ||
| 1017 | value)) | ||
| 1009 | 1018 | ||
| 1010 | (defun find-file-read-only-other-frame (filename &optional wildcards) | 1019 | (defun find-file-read-only-other-frame (filename &optional wildcards) |
| 1011 | "Edit file FILENAME in another frame but don't allow changes. | 1020 | "Edit file FILENAME in another frame but don't allow changes. |
| 1012 | Like \\[find-file-other-frame] but marks buffer as read-only. | 1021 | Like \\[find-file-other-frame] but marks buffer as read-only. |
| 1013 | Use \\[toggle-read-only] to permit editing." | 1022 | Use \\[toggle-read-only] to permit editing." |
| 1014 | (interactive (find-file-read-args "Find file read-only other frame: " t)) | 1023 | (interactive (find-file-read-args "Find file read-only other frame: " nil)) |
| 1015 | (unless (file-exists-p filename) (error "%s does not exist" filename)) | 1024 | (unless (or (and wildcards find-file-wildcards |
| 1016 | (find-file-other-frame filename wildcards) | 1025 | (not (string-match "\\`/:" filename)) |
| 1017 | (toggle-read-only 1) | 1026 | (string-match "[[*?]" filename)) |
| 1018 | (current-buffer)) | 1027 | (file-exists-p filename)) |
| 1019 | 1028 | (error "%s does not exist" filename)) | |
| 1020 | (defun find-alternate-file-other-window (filename) | 1029 | (let ((value (find-file-other-frame filename wildcards))) |
| 1030 | (mapc (lambda (b) (with-current-buffer b (toggle-read-only 1))) | ||
| 1031 | (if (listp value) value (list value))) | ||
| 1032 | value)) | ||
| 1033 | |||
| 1034 | (defun find-alternate-file-other-window (filename &optional wildcards) | ||
| 1021 | "Find file FILENAME as a replacement for the file in the next window. | 1035 | "Find file FILENAME as a replacement for the file in the next window. |
| 1022 | This command does not select that window." | 1036 | This command does not select that window. |
| 1037 | |||
| 1038 | Interactively, or if WILDCARDS is non-nil in a call from Lisp, | ||
| 1039 | expand wildcards (if any) and replace the file with multiple files." | ||
| 1023 | (interactive | 1040 | (interactive |
| 1024 | (save-selected-window | 1041 | (save-selected-window |
| 1025 | (other-window 1) | 1042 | (other-window 1) |
| @@ -1030,17 +1047,21 @@ This command does not select that window." | |||
| 1030 | (setq file-name (file-name-nondirectory file) | 1047 | (setq file-name (file-name-nondirectory file) |
| 1031 | file-dir (file-name-directory file))) | 1048 | file-dir (file-name-directory file))) |
| 1032 | (list (read-file-name | 1049 | (list (read-file-name |
| 1033 | "Find alternate file: " file-dir nil nil file-name))))) | 1050 | "Find alternate file: " file-dir nil nil file-name) |
| 1051 | t)))) | ||
| 1034 | (if (one-window-p) | 1052 | (if (one-window-p) |
| 1035 | (find-file-other-window filename) | 1053 | (find-file-other-window filename wildcards) |
| 1036 | (save-selected-window | 1054 | (save-selected-window |
| 1037 | (other-window 1) | 1055 | (other-window 1) |
| 1038 | (find-alternate-file filename)))) | 1056 | (find-alternate-file filename wildcards)))) |
| 1039 | 1057 | ||
| 1040 | (defun find-alternate-file (filename) | 1058 | (defun find-alternate-file (filename &optional wildcards) |
| 1041 | "Find file FILENAME, select its buffer, kill previous buffer. | 1059 | "Find file FILENAME, select its buffer, kill previous buffer. |
| 1042 | If the current buffer now contains an empty file that you just visited | 1060 | If the current buffer now contains an empty file that you just visited |
| 1043 | \(presumably by mistake), use this command to visit the file you really want." | 1061 | \(presumably by mistake), use this command to visit the file you really want. |
| 1062 | |||
| 1063 | Interactively, or if WILDCARDS is non-nil in a call from Lisp, | ||
| 1064 | expand wildcards (if any) and replace the file with multiple files." | ||
| 1044 | (interactive | 1065 | (interactive |
| 1045 | (let ((file buffer-file-name) | 1066 | (let ((file buffer-file-name) |
| 1046 | (file-name nil) | 1067 | (file-name nil) |
| @@ -1049,7 +1070,8 @@ If the current buffer now contains an empty file that you just visited | |||
| 1049 | (setq file-name (file-name-nondirectory file) | 1070 | (setq file-name (file-name-nondirectory file) |
| 1050 | file-dir (file-name-directory file))) | 1071 | file-dir (file-name-directory file))) |
| 1051 | (list (read-file-name | 1072 | (list (read-file-name |
| 1052 | "Find alternate file: " file-dir nil nil file-name)))) | 1073 | "Find alternate file: " file-dir nil nil file-name) |
| 1074 | t))) | ||
| 1053 | (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions) | 1075 | (unless (run-hook-with-args-until-failure 'kill-buffer-query-functions) |
| 1054 | (error "Aborted")) | 1076 | (error "Aborted")) |
| 1055 | (when (and (buffer-modified-p) (buffer-file-name)) | 1077 | (when (and (buffer-modified-p) (buffer-file-name)) |
| @@ -1077,7 +1099,7 @@ If the current buffer now contains an empty file that you just visited | |||
| 1077 | (setq buffer-file-truename nil) | 1099 | (setq buffer-file-truename nil) |
| 1078 | ;; Likewise for dired buffers. | 1100 | ;; Likewise for dired buffers. |
| 1079 | (setq dired-directory nil) | 1101 | (setq dired-directory nil) |
| 1080 | (find-file filename)) | 1102 | (find-file filename wildcards)) |
| 1081 | (when (eq obuf (current-buffer)) | 1103 | (when (eq obuf (current-buffer)) |
| 1082 | ;; This executes if find-file gets an error | 1104 | ;; This executes if find-file gets an error |
| 1083 | ;; and does not really find anything. | 1105 | ;; and does not really find anything. |
| @@ -1247,8 +1269,8 @@ Optional first arg NOWARN non-nil means suppress any warning messages. | |||
| 1247 | Optional second arg RAWFILE non-nil means the file is read literally. | 1269 | Optional second arg RAWFILE non-nil means the file is read literally. |
| 1248 | Optional third arg WILDCARDS non-nil means do wildcard processing | 1270 | Optional third arg WILDCARDS non-nil means do wildcard processing |
| 1249 | and visit all the matching files. When wildcards are actually | 1271 | and visit all the matching files. When wildcards are actually |
| 1250 | used and expanded, the value is a list of buffers | 1272 | used and expanded, return a list of buffers that are visiting |
| 1251 | that are visiting the various files." | 1273 | the various files." |
| 1252 | (setq filename | 1274 | (setq filename |
| 1253 | (abbreviate-file-name | 1275 | (abbreviate-file-name |
| 1254 | (expand-file-name filename))) | 1276 | (expand-file-name filename))) |
| @@ -1757,6 +1779,7 @@ in that case, this function acts as if `enable-local-variables' were t." | |||
| 1757 | ("\\.ses\\'" . ses-mode) | 1779 | ("\\.ses\\'" . ses-mode) |
| 1758 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) | 1780 | ("\\.\\(soa\\|zone\\)\\'" . dns-mode) |
| 1759 | ("\\.docbook\\'" . sgml-mode) | 1781 | ("\\.docbook\\'" . sgml-mode) |
| 1782 | ("\\.com\\'" . dcl-mode) | ||
| 1760 | ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) | 1783 | ("/config\\.\\(?:bat\\|log\\)\\'" . fundamental-mode) |
| 1761 | ;; Windows candidates may be opened case sensitively on Unix | 1784 | ;; Windows candidates may be opened case sensitively on Unix |
| 1762 | ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) | 1785 | ("\\.\\(?:[iI][nN][iI]\\|[lL][sS][tT]\\|[rR][eE][gG]\\|[sS][yY][sS]\\)\\'" . conf-mode) |
diff --git a/lisp/gnus/ChangeLog b/lisp/gnus/ChangeLog index 47945169a52..bb7b8337f4c 100644 --- a/lisp/gnus/ChangeLog +++ b/lisp/gnus/ChangeLog | |||
| @@ -1,7 +1,22 @@ | |||
| 1 | 2004-12-17 Kim F. Storm <storm@cua.dk> | ||
| 2 | |||
| 3 | * gnus-group.el (gnus-group-mode-map): Map follow-link to mouse-face. | ||
| 4 | |||
| 5 | * gnus-sum.el (gnus-summary-mode-map): Likewise. | ||
| 6 | |||
| 1 | 2004-12-08 Stefan Monnier <monnier@iro.umontreal.ca> | 7 | 2004-12-08 Stefan Monnier <monnier@iro.umontreal.ca> |
| 2 | 8 | ||
| 3 | * gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min. | 9 | * gnus-art.el (gnus-narrow-to-page): Don't hardcode point-min. |
| 4 | 10 | ||
| 11 | 2004-12-13 Katsumi Yamaoka <yamaoka@jpl.org> | ||
| 12 | |||
| 13 | * gnus-group.el (gnus-group-make-rss-group): Use | ||
| 14 | gnus-group-make-group instead of gnus-group-unsubscribe-group. | ||
| 15 | |||
| 16 | * gnus-start.el (gnus-setup-news): Honor user's setting to | ||
| 17 | gnus-message-archive-method. Suggested by Lute Kamstra | ||
| 18 | <Lute.Kamstra@xs4all.nl>. | ||
| 19 | |||
| 5 | 2004-12-02 Katsumi Yamaoka <yamaoka@jpl.org> | 20 | 2004-12-02 Katsumi Yamaoka <yamaoka@jpl.org> |
| 6 | 21 | ||
| 7 | * message.el (message-forward-make-body-mml): Remove headers | 22 | * message.el (message-forward-make-body-mml): Remove headers |
| @@ -896,7 +911,7 @@ | |||
| 896 | * gnus-delay.el (gnus-delay-default-hour): Add :version. | 911 | * gnus-delay.el (gnus-delay-default-hour): Add :version. |
| 897 | 912 | ||
| 898 | * gnus-cite.el (gnus-cite-blank-line-after-header) | 913 | * gnus-cite.el (gnus-cite-blank-line-after-header) |
| 899 | (gnus-article-boring-faces): | 914 | (gnus-article-boring-faces): |
| 900 | 915 | ||
| 901 | * gnus-art.el (gnus-buttonized-mime-types) | 916 | * gnus-art.el (gnus-buttonized-mime-types) |
| 902 | (gnus-inhibit-mime-unbuttonizing) | 917 | (gnus-inhibit-mime-unbuttonizing) |
diff --git a/lisp/gnus/gnus-group.el b/lisp/gnus/gnus-group.el index c55264b22de..336b635a6a0 100644 --- a/lisp/gnus/gnus-group.el +++ b/lisp/gnus/gnus-group.el | |||
| @@ -591,6 +591,7 @@ simple manner.") | |||
| 591 | "\M-e" gnus-group-edit-group-method | 591 | "\M-e" gnus-group-edit-group-method |
| 592 | "^" gnus-group-enter-server-mode | 592 | "^" gnus-group-enter-server-mode |
| 593 | gnus-mouse-2 gnus-mouse-pick-group | 593 | gnus-mouse-2 gnus-mouse-pick-group |
| 594 | [follow-link] mouse-face | ||
| 594 | "<" beginning-of-buffer | 595 | "<" beginning-of-buffer |
| 595 | ">" end-of-buffer | 596 | ">" end-of-buffer |
| 596 | "\C-c\C-b" gnus-bug | 597 | "\C-c\C-b" gnus-bug |
| @@ -2592,8 +2593,7 @@ If there is, use Gnus to create an nnrss group" | |||
| 2592 | (href (cdr (assoc 'href feedinfo)))) | 2593 | (href (cdr (assoc 'href feedinfo)))) |
| 2593 | (push (list title href desc) | 2594 | (push (list title href desc) |
| 2594 | nnrss-group-alist) | 2595 | nnrss-group-alist) |
| 2595 | (gnus-group-unsubscribe-group | 2596 | (gnus-group-make-group title '(nnrss "")) |
| 2596 | (concat "nnrss:" title)) | ||
| 2597 | (nnrss-save-server-data nil)) | 2597 | (nnrss-save-server-data nil)) |
| 2598 | (error "No feeds found for %s" url)))) | 2598 | (error "No feeds found for %s" url)))) |
| 2599 | 2599 | ||
diff --git a/lisp/gnus/gnus-start.el b/lisp/gnus/gnus-start.el index 17b0f1d687d..e1985c5db5d 100644 --- a/lisp/gnus/gnus-start.el +++ b/lisp/gnus/gnus-start.el | |||
| @@ -952,16 +952,28 @@ If LEVEL is non-nil, the news will be set up at level LEVEL." | |||
| 952 | ;; Make sure the archive server is available to all and sundry. | 952 | ;; Make sure the archive server is available to all and sundry. |
| 953 | (when gnus-message-archive-method | 953 | (when gnus-message-archive-method |
| 954 | (unless (assoc "archive" gnus-server-alist) | 954 | (unless (assoc "archive" gnus-server-alist) |
| 955 | (push `("archive" | 955 | (let ((method (or (and (stringp gnus-message-archive-method) |
| 956 | nnfolder | 956 | (gnus-server-to-method |
| 957 | "archive" | 957 | gnus-message-archive-method)) |
| 958 | (nnfolder-directory | 958 | gnus-message-archive-method))) |
| 959 | ,(nnheader-concat message-directory "archive")) | 959 | ;; Check whether the archive method is writable. |
| 960 | (nnfolder-active-file | 960 | (unless (or (stringp method) |
| 961 | ,(nnheader-concat message-directory "archive/active")) | 961 | (memq 'respool (assoc (format "%s" (car method)) |
| 962 | (nnfolder-get-new-mail nil) | 962 | gnus-valid-select-methods))) |
| 963 | (nnfolder-inhibit-expiry t)) | 963 | (setq method "archive")) ;; The default. |
| 964 | gnus-server-alist))) | 964 | (push (if (stringp method) |
| 965 | `("archive" | ||
| 966 | nnfolder | ||
| 967 | ,method | ||
| 968 | (nnfolder-directory | ||
| 969 | ,(nnheader-concat message-directory method)) | ||
| 970 | (nnfolder-active-file | ||
| 971 | ,(nnheader-concat message-directory | ||
| 972 | (concat method "/active"))) | ||
| 973 | (nnfolder-get-new-mail nil) | ||
| 974 | (nnfolder-inhibit-expiry t)) | ||
| 975 | (cons "archive" method)) | ||
| 976 | gnus-server-alist)))) | ||
| 965 | 977 | ||
| 966 | ;; If we don't read the complete active file, we fill in the | 978 | ;; If we don't read the complete active file, we fill in the |
| 967 | ;; hashtb here. | 979 | ;; hashtb here. |
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el index 03e1624237e..c4f320e888b 100644 --- a/lisp/gnus/gnus-sum.el +++ b/lisp/gnus/gnus-sum.el | |||
| @@ -1703,6 +1703,7 @@ increase the score of each group you read." | |||
| 1703 | "Q" gnus-summary-exit-no-update | 1703 | "Q" gnus-summary-exit-no-update |
| 1704 | "\C-c\C-i" gnus-info-find-node | 1704 | "\C-c\C-i" gnus-info-find-node |
| 1705 | gnus-mouse-2 gnus-mouse-pick-article | 1705 | gnus-mouse-2 gnus-mouse-pick-article |
| 1706 | [follow-link] mouse-face | ||
| 1706 | "m" gnus-summary-mail-other-window | 1707 | "m" gnus-summary-mail-other-window |
| 1707 | "a" gnus-summary-post-news | 1708 | "a" gnus-summary-post-news |
| 1708 | "i" gnus-summary-news-other-window | 1709 | "i" gnus-summary-news-other-window |
| @@ -5096,7 +5097,7 @@ If SELECT-ARTICLES, only select those articles from GROUP." | |||
| 5096 | 5097 | ||
| 5097 | (when gnus-agent | 5098 | (when gnus-agent |
| 5098 | (gnus-agent-possibly-alter-active group (gnus-active group) info) | 5099 | (gnus-agent-possibly-alter-active group (gnus-active group) info) |
| 5099 | 5100 | ||
| 5100 | (setq gnus-summary-use-undownloaded-faces | 5101 | (setq gnus-summary-use-undownloaded-faces |
| 5101 | (gnus-agent-find-parameter | 5102 | (gnus-agent-find-parameter |
| 5102 | group | 5103 | group |
| @@ -7044,7 +7045,7 @@ If optional argument UNREAD is non-nil, only unread article is selected." | |||
| 7044 | (gnus-summary-goto-subject article t))) | 7045 | (gnus-summary-goto-subject article t))) |
| 7045 | (gnus-summary-limit (append articles gnus-newsgroup-limit)) | 7046 | (gnus-summary-limit (append articles gnus-newsgroup-limit)) |
| 7046 | (gnus-summary-position-point)) | 7047 | (gnus-summary-position-point)) |
| 7047 | 7048 | ||
| 7048 | (defun gnus-summary-goto-subject (article &optional force silent) | 7049 | (defun gnus-summary-goto-subject (article &optional force silent) |
| 7049 | "Go the subject line of ARTICLE. | 7050 | "Go the subject line of ARTICLE. |
| 7050 | If FORCE, also allow jumping to articles not currently shown." | 7051 | If FORCE, also allow jumping to articles not currently shown." |
| @@ -9140,7 +9141,7 @@ ACTION can be either `move' (the default), `crosspost' or `copy'." | |||
| 9140 | 9141 | ||
| 9141 | ;;;!!!Why is this necessary? | 9142 | ;;;!!!Why is this necessary? |
| 9142 | (set-buffer gnus-summary-buffer) | 9143 | (set-buffer gnus-summary-buffer) |
| 9143 | 9144 | ||
| 9144 | (gnus-summary-goto-subject article) | 9145 | (gnus-summary-goto-subject article) |
| 9145 | (when (eq action 'move) | 9146 | (when (eq action 'move) |
| 9146 | (gnus-summary-mark-article article gnus-canceled-mark)))) | 9147 | (gnus-summary-mark-article article gnus-canceled-mark)))) |
diff --git a/lisp/help-fns.el b/lisp/help-fns.el index c06a7b1ee73..f799fbd9be7 100644 --- a/lisp/help-fns.el +++ b/lisp/help-fns.el | |||
| @@ -478,8 +478,13 @@ Return 0 if there is no such symbol." | |||
| 478 | (and (symbolp obj) (boundp obj) obj)))) | 478 | (and (symbolp obj) (boundp obj) obj)))) |
| 479 | (error nil)) | 479 | (error nil)) |
| 480 | (let* ((str (find-tag-default)) | 480 | (let* ((str (find-tag-default)) |
| 481 | (obj (if str (intern str)))) | 481 | (sym (if str (intern-soft str)))) |
| 482 | (and (symbolp obj) (boundp obj) obj)) | 482 | (if (and sym (boundp sym)) |
| 483 | sym | ||
| 484 | (save-match-data | ||
| 485 | (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) | ||
| 486 | (setq sym (intern-soft (match-string 1 str))) | ||
| 487 | (and (boundp sym) sym))))) | ||
| 483 | 0)) | 488 | 0)) |
| 484 | 489 | ||
| 485 | ;;;###autoload | 490 | ;;;###autoload |
| @@ -564,6 +569,7 @@ it is displayed along with the global value." | |||
| 564 | (insert " value is shown ") | 569 | (insert " value is shown ") |
| 565 | (insert-button "below" | 570 | (insert-button "below" |
| 566 | 'action help-button-cache | 571 | 'action help-button-cache |
| 572 | 'follow-link t | ||
| 567 | 'help-echo "mouse-2, RET: show value") | 573 | 'help-echo "mouse-2, RET: show value") |
| 568 | (insert ".\n\n"))) | 574 | (insert ".\n\n"))) |
| 569 | ;; Add a note for variables that have been make-var-buffer-local. | 575 | ;; Add a note for variables that have been make-var-buffer-local. |
diff --git a/lisp/help-mode.el b/lisp/help-mode.el index a2dcdf91ed8..e9d3561d251 100644 --- a/lisp/help-mode.el +++ b/lisp/help-mode.el | |||
| @@ -68,6 +68,7 @@ The format is (FUNCTION ARGS...).") | |||
| 68 | ;; Button types used by help | 68 | ;; Button types used by help |
| 69 | 69 | ||
| 70 | (define-button-type 'help-xref | 70 | (define-button-type 'help-xref |
| 71 | 'follow-link t | ||
| 71 | 'action #'help-button-action) | 72 | 'action #'help-button-action) |
| 72 | 73 | ||
| 73 | (defun help-button-action (button) | 74 | (defun help-button-action (button) |
diff --git a/lisp/help.el b/lisp/help.el index 5ec9b1f5299..f5831c9ab3f 100644 --- a/lisp/help.el +++ b/lisp/help.el | |||
| @@ -267,8 +267,13 @@ If that doesn't give a function, return nil." | |||
| 267 | (and (symbolp obj) (fboundp obj) obj)))) | 267 | (and (symbolp obj) (fboundp obj) obj)))) |
| 268 | (error nil)))) | 268 | (error nil)))) |
| 269 | (let* ((str (find-tag-default)) | 269 | (let* ((str (find-tag-default)) |
| 270 | (obj (if str (intern str)))) | 270 | (sym (if str (intern-soft str)))) |
| 271 | (and (symbolp obj) (fboundp obj) obj)))) | 271 | (if (and sym (fboundp sym)) |
| 272 | sym | ||
| 273 | (save-match-data | ||
| 274 | (when (and str (string-match "\\`\\W*\\(.*?\\)\\W*\\'" str)) | ||
| 275 | (setq sym (intern-soft (match-string 1 str))) | ||
| 276 | (and (fboundp sym) sym))))))) | ||
| 272 | 277 | ||
| 273 | 278 | ||
| 274 | ;;; `User' help functions | 279 | ;;; `User' help functions |
| @@ -609,17 +614,58 @@ the last key hit are used." | |||
| 609 | (princ "\n which is ") | 614 | (princ "\n which is ") |
| 610 | (describe-function-1 defn) | 615 | (describe-function-1 defn) |
| 611 | (when up-event | 616 | (when up-event |
| 612 | (let ((defn (or (string-key-binding up-event) (key-binding up-event)))) | 617 | (let ((ev (aref up-event 0)) |
| 618 | (descr (key-description up-event)) | ||
| 619 | (hdr "\n\n-------------- up event ---------------\n\n") | ||
| 620 | defn | ||
| 621 | mouse-1-tricky mouse-1-remapped) | ||
| 622 | (when (and (consp ev) | ||
| 623 | (eq (car ev) 'mouse-1) | ||
| 624 | (windowp window) | ||
| 625 | mouse-1-click-follows-link | ||
| 626 | (not (eq mouse-1-click-follows-link 'double)) | ||
| 627 | (with-current-buffer (window-buffer window) | ||
| 628 | (mouse-on-link-p (posn-point (event-start ev))))) | ||
| 629 | (setq mouse-1-tricky (integerp mouse-1-click-follows-link) | ||
| 630 | mouse-1-remapped (or (not mouse-1-tricky) | ||
| 631 | (> mouse-1-click-follows-link 0))) | ||
| 632 | (if mouse-1-remapped | ||
| 633 | (setcar ev 'mouse-2))) | ||
| 634 | (setq defn (or (string-key-binding up-event) (key-binding up-event))) | ||
| 613 | (unless (or (null defn) (integerp defn) (equal defn 'undefined)) | 635 | (unless (or (null defn) (integerp defn) (equal defn 'undefined)) |
| 614 | (princ "\n\n-------------- up event ---------------\n\n") | 636 | (princ (if mouse-1-tricky |
| 615 | (princ (key-description up-event)) | 637 | "\n\n----------------- up-event (short click) ----------------\n\n" |
| 638 | hdr)) | ||
| 639 | (setq hdr nil) | ||
| 640 | (princ descr) | ||
| 616 | (if (windowp window) | 641 | (if (windowp window) |
| 617 | (princ " at that spot")) | 642 | (princ " at that spot")) |
| 643 | (if mouse-1-remapped | ||
| 644 | (princ " is remapped to <mouse-2>\n which" )) | ||
| 618 | (princ " runs the command ") | 645 | (princ " runs the command ") |
| 619 | (prin1 defn) | 646 | (prin1 defn) |
| 620 | (princ "\n which is ") | 647 | (princ "\n which is ") |
| 621 | (describe-function-1 defn)))) | 648 | (describe-function-1 defn)) |
| 622 | (print-help-return-message))))))) | 649 | (when mouse-1-tricky |
| 650 | (setcar ev | ||
| 651 | (if (> mouse-1-click-follows-link 0) 'mouse-1 'mouse-2)) | ||
| 652 | (setq defn (or (string-key-binding up-event) (key-binding up-event))) | ||
| 653 | (unless (or (null defn) (integerp defn) (equal defn 'undefined)) | ||
| 654 | (princ (or hdr | ||
| 655 | "\n\n----------------- up-event (long click) ----------------\n\n")) | ||
| 656 | (princ "Pressing ") | ||
| 657 | (princ descr) | ||
| 658 | (if (windowp window) | ||
| 659 | (princ " at that spot")) | ||
| 660 | (princ (format " for longer than %d milli-seconds\n" | ||
| 661 | (abs mouse-1-click-follows-link))) | ||
| 662 | (if (not mouse-1-remapped) | ||
| 663 | (princ " remaps it to <mouse-2> which" )) | ||
| 664 | (princ " runs the command ") | ||
| 665 | (prin1 defn) | ||
| 666 | (princ "\n which is ") | ||
| 667 | (describe-function-1 defn)))) | ||
| 668 | (print-help-return-message)))))))) | ||
| 623 | 669 | ||
| 624 | 670 | ||
| 625 | (defun describe-mode (&optional buffer) | 671 | (defun describe-mode (&optional buffer) |
| @@ -692,6 +738,7 @@ whose documentation describes the minor mode." | |||
| 692 | (princ " ") | 738 | (princ " ") |
| 693 | (insert-button pretty-minor-mode | 739 | (insert-button pretty-minor-mode |
| 694 | 'action (car help-button-cache) | 740 | 'action (car help-button-cache) |
| 741 | 'follow-link t | ||
| 695 | 'help-echo "mouse-2, RET: show full information") | 742 | 'help-echo "mouse-2, RET: show full information") |
| 696 | (princ (format " minor mode (%s):\n" | 743 | (princ (format " minor mode (%s):\n" |
| 697 | (if indicator | 744 | (if indicator |
diff --git a/lisp/info-look.el b/lisp/info-look.el index 388415ec8c1..bc886f0320c 100644 --- a/lisp/info-look.el +++ b/lisp/info-look.el | |||
| @@ -47,7 +47,7 @@ Automatically becomes buffer local when set in any fashion.") | |||
| 47 | "Non-nil means pop up the Info buffer in another window." | 47 | "Non-nil means pop up the Info buffer in another window." |
| 48 | :group 'info-lookup :type 'boolean) | 48 | :group 'info-lookup :type 'boolean) |
| 49 | 49 | ||
| 50 | (defcustom info-lookup-highlight-face 'highlight | 50 | (defcustom info-lookup-highlight-face 'match |
| 51 | "Face for highlighting looked up help items. | 51 | "Face for highlighting looked up help items. |
| 52 | Setting this variable to nil disables highlighting." | 52 | Setting this variable to nil disables highlighting." |
| 53 | :group 'info-lookup :type 'face) | 53 | :group 'info-lookup :type 'face) |
diff --git a/lisp/info.el b/lisp/info.el index ef4225e5a3e..750f302d422 100644 --- a/lisp/info.el +++ b/lisp/info.el | |||
| @@ -86,7 +86,7 @@ The Lisp code is executed when the node is selected.") | |||
| 86 | :group 'info) | 86 | :group 'info) |
| 87 | 87 | ||
| 88 | (defface info-xref-visited | 88 | (defface info-xref-visited |
| 89 | '((t :inherit info-xref) | 89 | '((default :inherit info-xref) |
| 90 | (((class color) (background light)) :foreground "magenta4") | 90 | (((class color) (background light)) :foreground "magenta4") |
| 91 | (((class color) (background dark)) :foreground "magenta3")) ;"violet"? | 91 | (((class color) (background dark)) :foreground "magenta3")) ;"violet"? |
| 92 | "Face for visited Info cross-references." | 92 | "Face for visited Info cross-references." |
| @@ -2834,8 +2834,7 @@ if point is in a menu item description, follow that menu item." | |||
| 2834 | "Follow a node reference near point. Return non-nil if successful." | 2834 | "Follow a node reference near point. Return non-nil if successful." |
| 2835 | (let (node) | 2835 | (let (node) |
| 2836 | (cond | 2836 | (cond |
| 2837 | ((and (Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)") | 2837 | ((Info-get-token (point) "[hf]t?tp://" "[hf]t?tp://\\([^ \t\n\"`({<>})']+\\)") |
| 2838 | (or (featurep 'browse-url) (require 'browse-url nil t))) | ||
| 2839 | (setq node t) | 2838 | (setq node t) |
| 2840 | (browse-url (browse-url-url-at-point))) | 2839 | (browse-url (browse-url-url-at-point))) |
| 2841 | ((setq node (Info-get-token (point) "\\*note[ \n\t]+" | 2840 | ((setq node (Info-get-token (point) "\\*note[ \n\t]+" |
diff --git a/lisp/international/isearch-x.el b/lisp/international/isearch-x.el index 60736277b97..aad6b6e745e 100644 --- a/lisp/international/isearch-x.el +++ b/lisp/international/isearch-x.el | |||
| @@ -97,7 +97,7 @@ | |||
| 97 | (defun isearch-process-search-multibyte-characters (last-char) | 97 | (defun isearch-process-search-multibyte-characters (last-char) |
| 98 | (if (eq this-command 'isearch-printing-char) | 98 | (if (eq this-command 'isearch-printing-char) |
| 99 | (let ((overriding-terminal-local-map nil) | 99 | (let ((overriding-terminal-local-map nil) |
| 100 | (prompt (concat (isearch-message-prefix) isearch-message)) | 100 | (prompt (concat (isearch-message-prefix))) |
| 101 | (minibuffer-local-map isearch-minibuffer-local-map) | 101 | (minibuffer-local-map isearch-minibuffer-local-map) |
| 102 | str) | 102 | str) |
| 103 | (if isearch-input-method-function | 103 | (if isearch-input-method-function |
| @@ -107,11 +107,12 @@ | |||
| 107 | (cons 'with-input-method | 107 | (cons 'with-input-method |
| 108 | (cons last-char unread-command-events)) | 108 | (cons last-char unread-command-events)) |
| 109 | ;; Inherit current-input-method in a minibuffer. | 109 | ;; Inherit current-input-method in a minibuffer. |
| 110 | str (read-string prompt nil nil nil t)) | 110 | str (read-string prompt isearch-message nil nil t)) |
| 111 | (if (not str) | 111 | (if (not str) |
| 112 | ;; All inputs were deleted while the input method | 112 | ;; All inputs were deleted while the input method |
| 113 | ;; was working. | 113 | ;; was working. |
| 114 | (setq str "") | 114 | (setq str "") |
| 115 | (setq str (substring str (length isearch-message))) | ||
| 115 | (if (and (= (length str) 1) | 116 | (if (and (= (length str) 1) |
| 116 | (= (aref str 0) last-char) | 117 | (= (aref str 0) last-char) |
| 117 | (>= last-char 128)) | 118 | (>= last-char 128)) |
diff --git a/lisp/international/quail.el b/lisp/international/quail.el index d10e215881b..992f7ed56a6 100644 --- a/lisp/international/quail.el +++ b/lisp/international/quail.el | |||
| @@ -1371,11 +1371,12 @@ Return the input string." | |||
| 1371 | (while quail-translating | 1371 | (while quail-translating |
| 1372 | (set-buffer-modified-p modified-p) | 1372 | (set-buffer-modified-p modified-p) |
| 1373 | (quail-show-guidance) | 1373 | (quail-show-guidance) |
| 1374 | (let* ((keyseq (read-key-sequence | 1374 | (let* ((prompt (if input-method-use-echo-area |
| 1375 | (and input-method-use-echo-area | 1375 | (format "%s%s %s" |
| 1376 | (concat input-method-previous-message | 1376 | (or input-method-previous-message "") |
| 1377 | quail-current-str)) | 1377 | quail-current-str |
| 1378 | nil nil t)) | 1378 | quail-guidance-str))) |
| 1379 | (keyseq (read-key-sequence prompt nil nil t)) | ||
| 1379 | (cmd (lookup-key (quail-translation-keymap) keyseq))) | 1380 | (cmd (lookup-key (quail-translation-keymap) keyseq))) |
| 1380 | (if (if key | 1381 | (if (if key |
| 1381 | (and (commandp cmd) (not (eq cmd 'quail-other-command))) | 1382 | (and (commandp cmd) (not (eq cmd 'quail-other-command))) |
| @@ -1436,12 +1437,13 @@ Return the input string." | |||
| 1436 | quail-translating t) | 1437 | quail-translating t) |
| 1437 | (quail-setup-overlays nil))) | 1438 | (quail-setup-overlays nil))) |
| 1438 | (quail-show-guidance) | 1439 | (quail-show-guidance) |
| 1439 | (let* ((keyseq (read-key-sequence | 1440 | (let* ((prompt (if input-method-use-echo-area |
| 1440 | (and input-method-use-echo-area | 1441 | (format "%s%s%s %s" |
| 1441 | (concat input-method-previous-message | 1442 | (or input-method-previous-message "") |
| 1442 | quail-conversion-str | 1443 | quail-conversion-str |
| 1443 | quail-current-str)) | 1444 | quail-current-str |
| 1444 | nil nil t)) | 1445 | quail-guidance-str))) |
| 1446 | (keyseq (read-key-sequence prompt nil nil t)) | ||
| 1445 | (cmd (lookup-key (quail-conversion-keymap) keyseq))) | 1447 | (cmd (lookup-key (quail-conversion-keymap) keyseq))) |
| 1446 | (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) | 1448 | (if (if key (commandp cmd) (eq cmd 'quail-self-insert-command)) |
| 1447 | (progn | 1449 | (progn |
| @@ -1950,10 +1952,10 @@ minibuffer and the selected frame has no other windows)." | |||
| 1950 | 1952 | ||
| 1951 | ;; Then, show the guidance. | 1953 | ;; Then, show the guidance. |
| 1952 | (when (and (quail-require-guidance-buf) | 1954 | (when (and (quail-require-guidance-buf) |
| 1955 | (not input-method-use-echo-area) | ||
| 1953 | (null unread-command-events) | 1956 | (null unread-command-events) |
| 1954 | (null unread-post-input-method-events)) | 1957 | (null unread-post-input-method-events)) |
| 1955 | (if (or (eq (selected-window) (minibuffer-window)) | 1958 | (if (eq (selected-window) (minibuffer-window)) |
| 1956 | input-method-use-echo-area) | ||
| 1957 | (if (eq (minibuffer-window) (frame-root-window)) | 1959 | (if (eq (minibuffer-window) (frame-root-window)) |
| 1958 | ;; Use another frame. It is sure that we are using some | 1960 | ;; Use another frame. It is sure that we are using some |
| 1959 | ;; window system. | 1961 | ;; window system. |
diff --git a/lisp/isearch.el b/lisp/isearch.el index 77139988bb1..f94590ded2d 100644 --- a/lisp/isearch.el +++ b/lisp/isearch.el | |||
| @@ -229,7 +229,6 @@ Default value, nil, means edit the string instead." | |||
| 229 | (while (< i 256) | 229 | (while (< i 256) |
| 230 | (define-key map (vector i) 'isearch-printing-char) | 230 | (define-key map (vector i) 'isearch-printing-char) |
| 231 | (setq i (1+ i))) | 231 | (setq i (1+ i))) |
| 232 | (define-key map (vector i) 'isearch-printing-char) | ||
| 233 | 232 | ||
| 234 | ;; To handle local bindings with meta char prefix keys, define | 233 | ;; To handle local bindings with meta char prefix keys, define |
| 235 | ;; another full keymap. This must be done for any other prefix | 234 | ;; another full keymap. This must be done for any other prefix |
| @@ -654,7 +653,7 @@ is treated as a regexp. See \\[isearch-forward] for more info." | |||
| 654 | (setq ;; quit-flag nil not for isearch-mode | 653 | (setq ;; quit-flag nil not for isearch-mode |
| 655 | isearch-adjusted nil | 654 | isearch-adjusted nil |
| 656 | isearch-yank-flag nil) | 655 | isearch-yank-flag nil) |
| 657 | (isearch-lazy-highlight-new-loop) | 656 | (if isearch-lazy-highlight (isearch-lazy-highlight-new-loop)) |
| 658 | ;; We must prevent the point moving to the end of composition when a | 657 | ;; We must prevent the point moving to the end of composition when a |
| 659 | ;; part of the composition has just been searched. | 658 | ;; part of the composition has just been searched. |
| 660 | (setq disable-point-adjustment t)) | 659 | (setq disable-point-adjustment t)) |
| @@ -944,7 +943,7 @@ If first char entered is \\[isearch-yank-word-or-char], then do word search inst | |||
| 944 | (isearch-message-prefix nil nil isearch-nonincremental) | 943 | (isearch-message-prefix nil nil isearch-nonincremental) |
| 945 | isearch-string | 944 | isearch-string |
| 946 | minibuffer-local-isearch-map nil | 945 | minibuffer-local-isearch-map nil |
| 947 | 'junk-ring)) | 946 | 'junk-ring nil t)) |
| 948 | isearch-new-message | 947 | isearch-new-message |
| 949 | (mapconcat 'isearch-text-char-description | 948 | (mapconcat 'isearch-text-char-description |
| 950 | isearch-new-string ""))) | 949 | isearch-new-string ""))) |
| @@ -2334,8 +2333,7 @@ is nil. This function is called when exiting an incremental search if | |||
| 2334 | "Cleanup any previous `isearch-lazy-highlight' loop and begin a new one. | 2333 | "Cleanup any previous `isearch-lazy-highlight' loop and begin a new one. |
| 2335 | This happens when `isearch-update' is invoked (which can cause the | 2334 | This happens when `isearch-update' is invoked (which can cause the |
| 2336 | search string to change or the window to scroll)." | 2335 | search string to change or the window to scroll)." |
| 2337 | (when (and isearch-lazy-highlight | 2336 | (when (and (null executing-kbd-macro) |
| 2338 | (null executing-kbd-macro) | ||
| 2339 | (sit-for 0) ;make sure (window-start) is credible | 2337 | (sit-for 0) ;make sure (window-start) is credible |
| 2340 | (or (not (equal isearch-string | 2338 | (or (not (equal isearch-string |
| 2341 | isearch-lazy-highlight-last-string)) | 2339 | isearch-lazy-highlight-last-string)) |
| @@ -2387,59 +2385,64 @@ Attempt to do the search exactly the way the pending isearch would." | |||
| 2387 | (let ((max isearch-lazy-highlight-max-at-a-time) | 2385 | (let ((max isearch-lazy-highlight-max-at-a-time) |
| 2388 | (looping t) | 2386 | (looping t) |
| 2389 | nomore) | 2387 | nomore) |
| 2390 | (save-excursion | 2388 | (with-local-quit |
| 2391 | (save-match-data | 2389 | (save-selected-window |
| 2392 | (goto-char (if isearch-forward | 2390 | (if (and (window-live-p isearch-lazy-highlight-window) |
| 2393 | isearch-lazy-highlight-end | 2391 | (not (eq (selected-window) isearch-lazy-highlight-window))) |
| 2394 | isearch-lazy-highlight-start)) | 2392 | (select-window isearch-lazy-highlight-window)) |
| 2395 | (while looping | 2393 | (save-excursion |
| 2396 | (let ((found (isearch-lazy-highlight-search))) | 2394 | (save-match-data |
| 2397 | (when max | 2395 | (goto-char (if isearch-forward |
| 2398 | (setq max (1- max)) | 2396 | isearch-lazy-highlight-end |
| 2399 | (if (<= max 0) | 2397 | isearch-lazy-highlight-start)) |
| 2400 | (setq looping nil))) | 2398 | (while looping |
| 2401 | (if found | 2399 | (let ((found (isearch-lazy-highlight-search))) |
| 2402 | (let ((mb (match-beginning 0)) | 2400 | (when max |
| 2403 | (me (match-end 0))) | 2401 | (setq max (1- max)) |
| 2404 | (if (= mb me) ;zero-length match | 2402 | (if (<= max 0) |
| 2403 | (setq looping nil))) | ||
| 2404 | (if found | ||
| 2405 | (let ((mb (match-beginning 0)) | ||
| 2406 | (me (match-end 0))) | ||
| 2407 | (if (= mb me) ;zero-length match | ||
| 2408 | (if isearch-forward | ||
| 2409 | (if (= mb (if isearch-lazy-highlight-wrapped | ||
| 2410 | isearch-lazy-highlight-start | ||
| 2411 | (window-end))) | ||
| 2412 | (setq found nil) | ||
| 2413 | (forward-char 1)) | ||
| 2414 | (if (= mb (if isearch-lazy-highlight-wrapped | ||
| 2415 | isearch-lazy-highlight-end | ||
| 2416 | (window-start))) | ||
| 2417 | (setq found nil) | ||
| 2418 | (forward-char -1))) | ||
| 2419 | |||
| 2420 | ;; non-zero-length match | ||
| 2421 | (let ((ov (make-overlay mb me))) | ||
| 2422 | (push ov isearch-lazy-highlight-overlays) | ||
| 2423 | (overlay-put ov 'face isearch-lazy-highlight-face) | ||
| 2424 | (overlay-put ov 'priority 0) ;lower than main overlay | ||
| 2425 | (overlay-put ov 'window (selected-window)))) | ||
| 2426 | (if isearch-forward | ||
| 2427 | (setq isearch-lazy-highlight-end (point)) | ||
| 2428 | (setq isearch-lazy-highlight-start (point))))) | ||
| 2429 | |||
| 2430 | ;; not found or zero-length match at the search bound | ||
| 2431 | (if (not found) | ||
| 2432 | (if isearch-lazy-highlight-wrapped | ||
| 2433 | (setq looping nil | ||
| 2434 | nomore t) | ||
| 2435 | (setq isearch-lazy-highlight-wrapped t) | ||
| 2405 | (if isearch-forward | 2436 | (if isearch-forward |
| 2406 | (if (= mb (if isearch-lazy-highlight-wrapped | 2437 | (progn |
| 2407 | isearch-lazy-highlight-start | 2438 | (setq isearch-lazy-highlight-end (window-start)) |
| 2408 | (window-end))) | 2439 | (goto-char (window-start))) |
| 2409 | (setq found nil) | 2440 | (setq isearch-lazy-highlight-start (window-end)) |
| 2410 | (forward-char 1)) | 2441 | (goto-char (window-end))))))) |
| 2411 | (if (= mb (if isearch-lazy-highlight-wrapped | 2442 | (unless nomore |
| 2412 | isearch-lazy-highlight-end | 2443 | (setq isearch-lazy-highlight-timer |
| 2413 | (window-start))) | 2444 | (run-at-time isearch-lazy-highlight-interval nil |
| 2414 | (setq found nil) | 2445 | 'isearch-lazy-highlight-update))))))))) |
| 2415 | (forward-char -1))) | ||
| 2416 | |||
| 2417 | ;; non-zero-length match | ||
| 2418 | (let ((ov (make-overlay mb me))) | ||
| 2419 | (overlay-put ov 'face isearch-lazy-highlight-face) | ||
| 2420 | (overlay-put ov 'priority 0) ;lower than main overlay | ||
| 2421 | (overlay-put ov 'window (selected-window)) | ||
| 2422 | (push ov isearch-lazy-highlight-overlays))) | ||
| 2423 | (if isearch-forward | ||
| 2424 | (setq isearch-lazy-highlight-end (point)) | ||
| 2425 | (setq isearch-lazy-highlight-start (point))))) | ||
| 2426 | |||
| 2427 | ;; not found or zero-length match at the search bound | ||
| 2428 | (if (not found) | ||
| 2429 | (if isearch-lazy-highlight-wrapped | ||
| 2430 | (setq looping nil | ||
| 2431 | nomore t) | ||
| 2432 | (setq isearch-lazy-highlight-wrapped t) | ||
| 2433 | (if isearch-forward | ||
| 2434 | (progn | ||
| 2435 | (setq isearch-lazy-highlight-end (window-start)) | ||
| 2436 | (goto-char (window-start))) | ||
| 2437 | (setq isearch-lazy-highlight-start (window-end)) | ||
| 2438 | (goto-char (window-end))))))) | ||
| 2439 | (unless nomore | ||
| 2440 | (setq isearch-lazy-highlight-timer | ||
| 2441 | (run-at-time isearch-lazy-highlight-interval nil | ||
| 2442 | 'isearch-lazy-highlight-update))))))) | ||
| 2443 | 2446 | ||
| 2444 | (defun isearch-resume (search regexp word forward message case-fold) | 2447 | (defun isearch-resume (search regexp word forward message case-fold) |
| 2445 | "Resume an incremental search. | 2448 | "Resume an incremental search. |
diff --git a/lisp/mail/supercite.el b/lisp/mail/supercite.el index c1f4b6f0170..06282c430f0 100644 --- a/lisp/mail/supercite.el +++ b/lisp/mail/supercite.el | |||
| @@ -146,8 +146,9 @@ Each element of this list has the following form: | |||
| 146 | (...))) | 146 | (...))) |
| 147 | 147 | ||
| 148 | Where INFOKEY is a key for `sc-mail-field', REGEXP is a regular | 148 | Where INFOKEY is a key for `sc-mail-field', REGEXP is a regular |
| 149 | expression to match against the INFOKEY's value. FRAME is a citation | 149 | expression to match against the INFOKEY's value. FRAME is |
| 150 | frame, or a variable containing a citation frame." | 150 | a citation frame, or a symbol that represents the name of |
| 151 | a variable whose value is a citation frame." | ||
| 151 | :type '(repeat (list symbol (repeat (cons regexp | 152 | :type '(repeat (list symbol (repeat (cons regexp |
| 152 | (choice (repeat (repeat sexp)) | 153 | (choice (repeat (repeat sexp)) |
| 153 | symbol))))) | 154 | symbol))))) |
| @@ -1434,12 +1435,11 @@ When called interactively, the optional arg INTERACTIVE is non-nil, | |||
| 1434 | and that means call `sc-select-attribution' too." | 1435 | and that means call `sc-select-attribution' too." |
| 1435 | (interactive "r\nP\np") | 1436 | (interactive "r\nP\np") |
| 1436 | (undo-boundary) | 1437 | (undo-boundary) |
| 1437 | (let ((frame (or (sc-scan-info-alist | 1438 | (let ((frame (sc-scan-info-alist sc-cite-frame-alist)) |
| 1438 | (if (symbolp sc-cite-frame-alist) | ||
| 1439 | (symbol-value sc-cite-frame-alist) | ||
| 1440 | sc-cite-frame-alist)) | ||
| 1441 | sc-default-cite-frame)) | ||
| 1442 | (sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) | 1439 | (sc-confirm-always-p (if confirm-p t sc-confirm-always-p))) |
| 1440 | (if (and frame (symbolp frame)) | ||
| 1441 | (setq frame (symbol-value frame))) | ||
| 1442 | (or frame (setq frame sc-default-cite-frame)) | ||
| 1443 | (run-hooks 'sc-pre-cite-hook) | 1443 | (run-hooks 'sc-pre-cite-hook) |
| 1444 | (if interactive | 1444 | (if interactive |
| 1445 | (sc-select-attribution)) | 1445 | (sc-select-attribution)) |
| @@ -1450,11 +1450,10 @@ and that means call `sc-select-attribution' too." | |||
| 1450 | First runs `sc-pre-uncite-hook'." | 1450 | First runs `sc-pre-uncite-hook'." |
| 1451 | (interactive "r") | 1451 | (interactive "r") |
| 1452 | (undo-boundary) | 1452 | (undo-boundary) |
| 1453 | (let ((frame (or (sc-scan-info-alist | 1453 | (let ((frame (sc-scan-info-alist sc-uncite-frame-alist))) |
| 1454 | (if (symbolp sc-uncite-frame-alist) | 1454 | (if (and frame (symbolp frame)) |
| 1455 | (symbol-value sc-uncite-frame-alist) | 1455 | (setq frame (symbol-value frame))) |
| 1456 | sc-uncite-frame-alist)) | 1456 | (or frame (setq frame sc-default-uncite-frame)) |
| 1457 | sc-default-uncite-frame))) | ||
| 1458 | (run-hooks 'sc-pre-uncite-hook) | 1457 | (run-hooks 'sc-pre-uncite-hook) |
| 1459 | (regi-interpret frame start end))) | 1458 | (regi-interpret frame start end))) |
| 1460 | 1459 | ||
| @@ -1465,11 +1464,10 @@ First runs `sc-pre-recite-hook'." | |||
| 1465 | (let ((sc-confirm-always-p t)) | 1464 | (let ((sc-confirm-always-p t)) |
| 1466 | (sc-select-attribution)) | 1465 | (sc-select-attribution)) |
| 1467 | (undo-boundary) | 1466 | (undo-boundary) |
| 1468 | (let ((frame (or (sc-scan-info-alist | 1467 | (let ((frame (sc-scan-info-alist sc-recite-frame-alist))) |
| 1469 | (if (symbolp sc-recite-frame-alist) | 1468 | (if (and frame (symbolp frame)) |
| 1470 | (symbol-value sc-recite-frame-alist) | 1469 | (setq frame (symbol-value frame))) |
| 1471 | sc-recite-frame-alist)) | 1470 | (or frame (setq frame sc-default-recite-frame)) |
| 1472 | sc-default-recite-frame))) | ||
| 1473 | (run-hooks 'sc-pre-recite-hook) | 1471 | (run-hooks 'sc-pre-recite-hook) |
| 1474 | (regi-interpret frame start end))) | 1472 | (regi-interpret frame start end))) |
| 1475 | 1473 | ||
diff --git a/lisp/mouse.el b/lisp/mouse.el index b2fa71dde24..91e2e4ae5c6 100644 --- a/lisp/mouse.el +++ b/lisp/mouse.el | |||
| @@ -49,6 +49,39 @@ | |||
| 49 | :version "21.4" | 49 | :version "21.4" |
| 50 | :group 'mouse) | 50 | :group 'mouse) |
| 51 | 51 | ||
| 52 | (defcustom mouse-1-click-follows-link 350 | ||
| 53 | "Non-nil means that clicking Mouse-1 on a link follows the link. | ||
| 54 | |||
| 55 | With the default setting, an ordinary Mouse-1 click on a link | ||
| 56 | performs the same action as Mouse-2 on that link, while a longer | ||
| 57 | Mouse-1 click \(hold down the Mouse-1 button for more than 350 | ||
| 58 | milliseconds) performs the original Mouse-1 binding \(which | ||
| 59 | typically sets point where you click the mouse). | ||
| 60 | |||
| 61 | If value is an integer, the time elapsed between pressing and | ||
| 62 | releasing the mouse button determines whether to follow the link | ||
| 63 | or perform the normal Mouse-1 action (typically set point). | ||
| 64 | The absolute numeric value specifices the maximum duration of a | ||
| 65 | \"short click\" in milliseconds. A positive value means that a | ||
| 66 | short click follows the link, and a longer click performs the | ||
| 67 | normal action. A negative value gives the opposite behaviour. | ||
| 68 | |||
| 69 | If value is `double', a double click follows the link. | ||
| 70 | |||
| 71 | Otherwise, a single Mouse-1 click unconditionally follows the link. | ||
| 72 | |||
| 73 | Note that dragging the mouse never follows the link. | ||
| 74 | |||
| 75 | This feature only works in modes that specifically identify | ||
| 76 | clickable text as links, so it may not work with some external | ||
| 77 | packages. See `mouse-on-link-p' for details." | ||
| 78 | :version "21.4" | ||
| 79 | :type '(choice (const :tag "Disabled" nil) | ||
| 80 | (const :tag "Double click" double) | ||
| 81 | (number :tag "Single click time limit" :value 350) | ||
| 82 | (other :tag "Single click" t)) | ||
| 83 | :group 'mouse) | ||
| 84 | |||
| 52 | 85 | ||
| 53 | ;; Provide a mode-specific menu on a mouse button. | 86 | ;; Provide a mode-specific menu on a mouse button. |
| 54 | 87 | ||
| @@ -733,6 +766,51 @@ If the click is in the echo area, display the `*Messages*' buffer." | |||
| 733 | (run-hooks 'mouse-leave-buffer-hook) | 766 | (run-hooks 'mouse-leave-buffer-hook) |
| 734 | (mouse-drag-region-1 start-event)))) | 767 | (mouse-drag-region-1 start-event)))) |
| 735 | 768 | ||
| 769 | |||
| 770 | (defun mouse-on-link-p (pos) | ||
| 771 | "Return non-nil if POS is on a link in the current buffer. | ||
| 772 | |||
| 773 | A clickable link is identified by one of the following methods: | ||
| 774 | |||
| 775 | 1) If the character at POS has a non-nil `follow-link' text or | ||
| 776 | overlay property, the value of that property is returned. | ||
| 777 | |||
| 778 | 2) If there is a local key-binding or a keybinding at position | ||
| 779 | POS for the `follow-link' event, the binding of that event | ||
| 780 | determines whether POS is inside a link: | ||
| 781 | |||
| 782 | - If the binding is `mouse-face', POS is inside a link if there | ||
| 783 | is a non-nil `mouse-face' property at POS. Return t in this case. | ||
| 784 | |||
| 785 | - If the binding is a function, FUNC, POS is inside a link if | ||
| 786 | the call \(FUNC POS) returns non-nil. Return the return value | ||
| 787 | from that call. | ||
| 788 | |||
| 789 | - Otherwise, return the binding of the `follow-link' binding. | ||
| 790 | |||
| 791 | The return value is interpreted as follows: | ||
| 792 | |||
| 793 | - If it is a string, the mouse-1 event is translated into the | ||
| 794 | first character of the string, i.e. the action of the mouse-1 | ||
| 795 | click is the local or global binding of that character. | ||
| 796 | |||
| 797 | - If it is a vector, the mouse-1 event is translated into the | ||
| 798 | first element of that vector, i.e. the action of the mouse-1 | ||
| 799 | click is the local or global binding of that event. | ||
| 800 | |||
| 801 | - Otherwise, the mouse-1 event is translated into a mouse-2 event | ||
| 802 | at the same position." | ||
| 803 | (or (get-char-property pos 'follow-link) | ||
| 804 | (save-excursion | ||
| 805 | (goto-char pos) | ||
| 806 | (let ((b (key-binding [follow-link] nil t))) | ||
| 807 | (cond | ||
| 808 | ((eq b 'mouse-face) | ||
| 809 | (and (get-char-property pos 'mouse-face) t)) | ||
| 810 | ((functionp b) | ||
| 811 | (funcall b pos)) | ||
| 812 | (t b)))))) | ||
| 813 | |||
| 736 | (defun mouse-drag-region-1 (start-event) | 814 | (defun mouse-drag-region-1 (start-event) |
| 737 | (mouse-minibuffer-check start-event) | 815 | (mouse-minibuffer-check start-event) |
| 738 | (let* ((echo-keystrokes 0) | 816 | (let* ((echo-keystrokes 0) |
| @@ -749,6 +827,7 @@ If the click is in the echo area, display the `*Messages*' buffer." | |||
| 749 | (nth 3 bounds) | 827 | (nth 3 bounds) |
| 750 | ;; Don't count the mode line. | 828 | ;; Don't count the mode line. |
| 751 | (1- (nth 3 bounds)))) | 829 | (1- (nth 3 bounds)))) |
| 830 | on-link remap-double-click | ||
| 752 | (click-count (1- (event-click-count start-event)))) | 831 | (click-count (1- (event-click-count start-event)))) |
| 753 | (setq mouse-selection-click-count click-count) | 832 | (setq mouse-selection-click-count click-count) |
| 754 | (setq mouse-selection-click-count-buffer (current-buffer)) | 833 | (setq mouse-selection-click-count-buffer (current-buffer)) |
| @@ -758,6 +837,13 @@ If the click is in the echo area, display the `*Messages*' buffer." | |||
| 758 | (if (< (point) start-point) | 837 | (if (< (point) start-point) |
| 759 | (goto-char start-point)) | 838 | (goto-char start-point)) |
| 760 | (setq start-point (point)) | 839 | (setq start-point (point)) |
| 840 | (setq on-link (and mouse-1-click-follows-link | ||
| 841 | (mouse-on-link-p start-point))) | ||
| 842 | (setq remap-double-click (and on-link | ||
| 843 | (eq mouse-1-click-follows-link 'double) | ||
| 844 | (= click-count 1))) | ||
| 845 | (if remap-double-click ;; Don't expand mouse overlay in links | ||
| 846 | (setq click-count 0)) | ||
| 761 | (let ((range (mouse-start-end start-point start-point click-count))) | 847 | (let ((range (mouse-start-end start-point start-point click-count))) |
| 762 | (move-overlay mouse-drag-overlay (car range) (nth 1 range) | 848 | (move-overlay mouse-drag-overlay (car range) (nth 1 range) |
| 763 | (window-buffer start-window)) | 849 | (window-buffer start-window)) |
| @@ -880,6 +966,28 @@ If the click is in the echo area, display the `*Messages*' buffer." | |||
| 880 | (or end-point | 966 | (or end-point |
| 881 | (= (window-start start-window) | 967 | (= (window-start start-window) |
| 882 | start-window-start))) | 968 | start-window-start))) |
| 969 | (if (and on-link | ||
| 970 | (not end-point) | ||
| 971 | (consp event) | ||
| 972 | (or remap-double-click | ||
| 973 | (and | ||
| 974 | (not (eq mouse-1-click-follows-link 'double)) | ||
| 975 | (= click-count 0) | ||
| 976 | (= (event-click-count event) 1) | ||
| 977 | (not (input-pending-p)) | ||
| 978 | (or (not (integerp mouse-1-click-follows-link)) | ||
| 979 | (let ((t0 (posn-timestamp (event-start start-event))) | ||
| 980 | (t1 (posn-timestamp (event-end event)))) | ||
| 981 | (and (integerp t0) (integerp t1) | ||
| 982 | (if (> mouse-1-click-follows-link 0) | ||
| 983 | (<= (- t1 t0) mouse-1-click-follows-link) | ||
| 984 | (< (- t0 t1) mouse-1-click-follows-link))))) | ||
| 985 | (or (not double-click-time) | ||
| 986 | (sit-for 0 (if (integerp double-click-time) | ||
| 987 | double-click-time 500) t))))) | ||
| 988 | (if (or (vectorp on-link) (stringp on-link)) | ||
| 989 | (setq event (aref on-link 0)) | ||
| 990 | (setcar event 'mouse-2))) | ||
| 883 | (setq unread-command-events | 991 | (setq unread-command-events |
| 884 | (cons event unread-command-events))))) | 992 | (cons event unread-command-events))))) |
| 885 | (delete-overlay mouse-drag-overlay))))) | 993 | (delete-overlay mouse-drag-overlay))))) |
diff --git a/lisp/net/browse-url.el b/lisp/net/browse-url.el index 098f2988f1b..6e679876eef 100644 --- a/lisp/net/browse-url.el +++ b/lisp/net/browse-url.el | |||
| @@ -575,6 +575,7 @@ down (this *won't* always work)." | |||
| 575 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; | 575 | ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; |
| 576 | ;; URL input | 576 | ;; URL input |
| 577 | 577 | ||
| 578 | ;;;###autoload | ||
| 578 | (defun browse-url-url-at-point () | 579 | (defun browse-url-url-at-point () |
| 579 | (let ((url (thing-at-point 'url))) | 580 | (let ((url (thing-at-point 'url))) |
| 580 | (set-text-properties 0 (length url) nil url) | 581 | (set-text-properties 0 (length url) nil url) |
diff --git a/lisp/net/tramp-smb.el b/lisp/net/tramp-smb.el index 4628af88178..d0a7cf7b65f 100644 --- a/lisp/net/tramp-smb.el +++ b/lisp/net/tramp-smb.el | |||
| @@ -1105,9 +1105,11 @@ Return the difference in the format of a time value." | |||
| 1105 | ;; Do `PC-do-completion' without substitution | 1105 | ;; Do `PC-do-completion' without substitution |
| 1106 | (let* (save) | 1106 | (let* (save) |
| 1107 | (fset 'save (symbol-function 'substitute-in-file-name)) | 1107 | (fset 'save (symbol-function 'substitute-in-file-name)) |
| 1108 | (fset 'substitute-in-file-name (symbol-function 'identity)) | 1108 | (unwind-protect |
| 1109 | ad-do-it | 1109 | (progn |
| 1110 | (fset 'substitute-in-file-name (symbol-function 'save))) | 1110 | (fset 'substitute-in-file-name (symbol-function 'identity)) |
| 1111 | ad-do-it) | ||
| 1112 | (fset 'substitute-in-file-name (symbol-function 'save)))) | ||
| 1111 | 1113 | ||
| 1112 | ;; Expand "$" | 1114 | ;; Expand "$" |
| 1113 | (let* ((beg (or (and (functionp 'minibuffer-prompt-end) ; Emacs 21 | 1115 | (let* ((beg (or (and (functionp 'minibuffer-prompt-end) ; Emacs 21 |
diff --git a/lisp/net/tramp.el b/lisp/net/tramp.el index b0448fd25e9..34572e98674 100644 --- a/lisp/net/tramp.el +++ b/lisp/net/tramp.el | |||
| @@ -34,7 +34,7 @@ | |||
| 34 | ;; | 34 | ;; |
| 35 | ;; Notes: | 35 | ;; Notes: |
| 36 | ;; ----- | 36 | ;; ----- |
| 37 | ;; | 37 | ;; |
| 38 | ;; This package only works for Emacs 20 and higher, and for XEmacs 21 | 38 | ;; This package only works for Emacs 20 and higher, and for XEmacs 21 |
| 39 | ;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs | 39 | ;; and higher. (XEmacs 20 is missing the `with-timeout' macro. Emacs |
| 40 | ;; 19 is reported to have other problems. For XEmacs 21, you need the | 40 | ;; 19 is reported to have other problems. For XEmacs 21, you need the |
| @@ -205,7 +205,7 @@ file name, the backup directory is prepended with Tramp file name prefix | |||
| 205 | 205 | ||
| 206 | gives the same backup policy for Tramp files on their hosts like the | 206 | gives the same backup policy for Tramp files on their hosts like the |
| 207 | policy for local files." | 207 | policy for local files." |
| 208 | :type '(repeat | 208 | :type '(repeat |
| 209 | (list (regexp :tag "File regexp") | 209 | (list (regexp :tag "File regexp") |
| 210 | (string :tag "Backup Dir") | 210 | (string :tag "Backup Dir") |
| 211 | (set :inline t | 211 | (set :inline t |
| @@ -506,7 +506,7 @@ This variable defaults to the value of `tramp-encoding-shell'." | |||
| 506 | (tramp-copy-args nil) | 506 | (tramp-copy-args nil) |
| 507 | (tramp-copy-keep-date-arg "-p") | 507 | (tramp-copy-keep-date-arg "-p") |
| 508 | (tramp-password-end-of-line "xy")) ;see docstring for "xy" | 508 | (tramp-password-end-of-line "xy")) ;see docstring for "xy" |
| 509 | ("fcp" | 509 | ("fcp" |
| 510 | (tramp-connection-function tramp-open-connection-rsh) | 510 | (tramp-connection-function tramp-open-connection-rsh) |
| 511 | (tramp-login-program "fsh") | 511 | (tramp-login-program "fsh") |
| 512 | (tramp-copy-program "fcp") | 512 | (tramp-copy-program "fcp") |
| @@ -633,7 +633,7 @@ variable `tramp-methods'." | |||
| 633 | ("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") | 633 | ("rsh" tramp-multi-connect-rlogin "rsh %h -l %u%n") |
| 634 | ("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n") | 634 | ("remsh" tramp-multi-connect-rlogin "remsh %h -l %u%n") |
| 635 | ("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") | 635 | ("ssh" tramp-multi-connect-rlogin "ssh %h -l %u%n") |
| 636 | ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") | 636 | ("ssht" tramp-multi-connect-rlogin "ssh %h -e none -t -t -l %u%n") |
| 637 | ("su" tramp-multi-connect-su "su - %u%n") | 637 | ("su" tramp-multi-connect-su "su - %u%n") |
| 638 | ("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n")) | 638 | ("sudo" tramp-multi-connect-su "sudo -u %u -s -p Password:%n")) |
| 639 | "*List of connection functions for multi-hop methods. | 639 | "*List of connection functions for multi-hop methods. |
| @@ -777,7 +777,7 @@ the info pages.") | |||
| 777 | "sudo" tramp-completion-function-alist-su) | 777 | "sudo" tramp-completion-function-alist-su) |
| 778 | (tramp-set-completion-function | 778 | (tramp-set-completion-function |
| 779 | "multi" nil) | 779 | "multi" nil) |
| 780 | (tramp-set-completion-function | 780 | (tramp-set-completion-function |
| 781 | "scpx" tramp-completion-function-alist-ssh) | 781 | "scpx" tramp-completion-function-alist-ssh) |
| 782 | (tramp-set-completion-function | 782 | (tramp-set-completion-function |
| 783 | "sshx" tramp-completion-function-alist-ssh) | 783 | "sshx" tramp-completion-function-alist-ssh) |
| @@ -1536,9 +1536,9 @@ cat /tmp/tramp.$$ | |||
| 1536 | rm -f /tmp/tramp.$$ | 1536 | rm -f /tmp/tramp.$$ |
| 1537 | }" | 1537 | }" |
| 1538 | "Shell function to implement `uudecode' to standard output. | 1538 | "Shell function to implement `uudecode' to standard output. |
| 1539 | Many systems support `uudecode -o /dev/stdout' for this or | 1539 | Many systems support `uudecode -o /dev/stdout' or `uudecode -o -' |
| 1540 | `uudecode -o -' or `uudecode -p', but some systems don't, and for | 1540 | for this or `uudecode -p', but some systems don't, and for them |
| 1541 | them we have this shell function.") | 1541 | we have this shell function.") |
| 1542 | 1542 | ||
| 1543 | ;; Perl script to implement `file-attributes' in a Lisp `read'able | 1543 | ;; Perl script to implement `file-attributes' in a Lisp `read'able |
| 1544 | ;; output. If you are hacking on this, note that you get *no* output | 1544 | ;; output. If you are hacking on this, note that you get *no* output |
| @@ -1960,10 +1960,9 @@ If VAR is nil, then we bind `v' to the structure and `multi-method', | |||
| 1960 | (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) | 1960 | (put 'with-parsed-tramp-file-name 'lisp-indent-function 2) |
| 1961 | ;; To be activated for debugging containing this macro | 1961 | ;; To be activated for debugging containing this macro |
| 1962 | ;; It works only when VAR is nil. Otherwise, it can be deactivated by | 1962 | ;; It works only when VAR is nil. Otherwise, it can be deactivated by |
| 1963 | ;; (def-edebug-spec with-parsed-tramp-file-name 0) | 1963 | ;; (put 'with-parsed-tramp-file-name 'edebug-form-spec 0) |
| 1964 | ;; I'm too stupid to write a precise SPEC for it. | 1964 | ;; I'm too stupid to write a precise SPEC for it. |
| 1965 | (if (functionp 'def-edebug-spec) | 1965 | (put 'with-parsed-tramp-file-name 'edebug-form-spec t) |
| 1966 | (def-edebug-spec with-parsed-tramp-file-name t)) | ||
| 1967 | 1966 | ||
| 1968 | (defmacro tramp-let-maybe (variable value &rest body) | 1967 | (defmacro tramp-let-maybe (variable value &rest body) |
| 1969 | "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. | 1968 | "Let-bind VARIABLE to VALUE in BODY, but only if VARIABLE is not obsolete. |
| @@ -2056,7 +2055,7 @@ target of the symlink differ." | |||
| 2056 | (setq filename (tramp-file-name-localname | 2055 | (setq filename (tramp-file-name-localname |
| 2057 | (tramp-dissect-file-name | 2056 | (tramp-dissect-file-name |
| 2058 | (expand-file-name filename))))) | 2057 | (expand-file-name filename))))) |
| 2059 | 2058 | ||
| 2060 | ;; Right, they are on the same host, regardless of user, method, etc. | 2059 | ;; Right, they are on the same host, regardless of user, method, etc. |
| 2061 | ;; We now make the link on the remote machine. This will occur as the user | 2060 | ;; We now make the link on the remote machine. This will occur as the user |
| 2062 | ;; that FILENAME belongs to. | 2061 | ;; that FILENAME belongs to. |
| @@ -2065,7 +2064,7 @@ target of the symlink differ." | |||
| 2065 | l-multi-method l-method l-user l-host | 2064 | l-multi-method l-method l-user l-host |
| 2066 | (format "cd %s && %s -sf %s %s" | 2065 | (format "cd %s && %s -sf %s %s" |
| 2067 | cwd ln | 2066 | cwd ln |
| 2068 | filename | 2067 | filename |
| 2069 | l-localname) | 2068 | l-localname) |
| 2070 | t))))) | 2069 | t))))) |
| 2071 | 2070 | ||
| @@ -2347,9 +2346,9 @@ target of the symlink differ." | |||
| 2347 | "file attributes with perl: %s" | 2346 | "file attributes with perl: %s" |
| 2348 | (tramp-make-tramp-file-name | 2347 | (tramp-make-tramp-file-name |
| 2349 | multi-method method user host localname)) | 2348 | multi-method method user host localname)) |
| 2350 | (tramp-maybe-send-perl-script tramp-perl-file-attributes | 2349 | (tramp-maybe-send-perl-script multi-method method user host |
| 2351 | "tramp_file_attributes" | 2350 | tramp-perl-file-attributes |
| 2352 | multi-method method user host) | 2351 | "tramp_file_attributes") |
| 2353 | (tramp-send-command multi-method method user host | 2352 | (tramp-send-command multi-method method user host |
| 2354 | (format "tramp_file_attributes %s %s" | 2353 | (format "tramp_file_attributes %s %s" |
| 2355 | (tramp-shell-quote-argument localname) id-format)) | 2354 | (tramp-shell-quote-argument localname) id-format)) |
| @@ -2394,7 +2393,12 @@ target of the symlink differ." | |||
| 2394 | ;; This function makes the same assumption as | 2393 | ;; This function makes the same assumption as |
| 2395 | ;; `tramp-handle-set-visited-file-modtime'. | 2394 | ;; `tramp-handle-set-visited-file-modtime'. |
| 2396 | (defun tramp-handle-verify-visited-file-modtime (buf) | 2395 | (defun tramp-handle-verify-visited-file-modtime (buf) |
| 2397 | "Like `verify-visited-file-modtime' for tramp files." | 2396 | "Like `verify-visited-file-modtime' for tramp files. |
| 2397 | At the time `verify-visited-file-modtime' calls this function, we | ||
| 2398 | already know that the buffer is visiting a file and that | ||
| 2399 | `visited-file-modtime' does not return 0. Do not call this | ||
| 2400 | function directly, unless those two cases are already taken care | ||
| 2401 | of." | ||
| 2398 | (with-current-buffer buf | 2402 | (with-current-buffer buf |
| 2399 | ;; There is no file visiting the buffer, or the buffer has no | 2403 | ;; There is no file visiting the buffer, or the buffer has no |
| 2400 | ;; recorded last modification time. | 2404 | ;; recorded last modification time. |
| @@ -2406,7 +2410,7 @@ target of the symlink differ." | |||
| 2406 | (let* ((attr (file-attributes f)) | 2410 | (let* ((attr (file-attributes f)) |
| 2407 | (modtime (nth 5 attr)) | 2411 | (modtime (nth 5 attr)) |
| 2408 | (mt (visited-file-modtime))) | 2412 | (mt (visited-file-modtime))) |
| 2409 | 2413 | ||
| 2410 | (cond | 2414 | (cond |
| 2411 | ;; file exists, and has a known modtime. | 2415 | ;; file exists, and has a known modtime. |
| 2412 | ((and attr (not (equal modtime '(0 0)))) | 2416 | ((and attr (not (equal modtime '(0 0)))) |
| @@ -2689,9 +2693,9 @@ if the remote host can't provide the modtime." | |||
| 2689 | (save-excursion | 2693 | (save-excursion |
| 2690 | (setq directory (tramp-handle-expand-file-name directory)) | 2694 | (setq directory (tramp-handle-expand-file-name directory)) |
| 2691 | (with-parsed-tramp-file-name directory nil | 2695 | (with-parsed-tramp-file-name directory nil |
| 2692 | (tramp-maybe-send-perl-script tramp-perl-directory-files-and-attributes | 2696 | (tramp-maybe-send-perl-script multi-method method user host |
| 2693 | "tramp_directory_files_and_attributes" | 2697 | tramp-perl-directory-files-and-attributes |
| 2694 | multi-method method user host) | 2698 | "tramp_directory_files_and_attributes") |
| 2695 | (tramp-send-command multi-method method user host | 2699 | (tramp-send-command multi-method method user host |
| 2696 | (format "tramp_directory_files_and_attributes %s %s" | 2700 | (format "tramp_directory_files_and_attributes %s %s" |
| 2697 | (tramp-shell-quote-argument localname) | 2701 | (tramp-shell-quote-argument localname) |
| @@ -2753,7 +2757,7 @@ if the remote host can't provide the modtime." | |||
| 2753 | (push (buffer-substring (point) | 2757 | (push (buffer-substring (point) |
| 2754 | (tramp-line-end-position)) | 2758 | (tramp-line-end-position)) |
| 2755 | result)) | 2759 | result)) |
| 2756 | 2760 | ||
| 2757 | (tramp-send-command multi-method method user host "cd") | 2761 | (tramp-send-command multi-method method user host "cd") |
| 2758 | (tramp-wait-for-output) | 2762 | (tramp-wait-for-output) |
| 2759 | 2763 | ||
| @@ -3096,6 +3100,12 @@ be a local filename. The method used must be an out-of-band method." | |||
| 3096 | 3100 | ||
| 3097 | ;; Use an asynchronous process. By this, password can be handled. | 3101 | ;; Use an asynchronous process. By this, password can be handled. |
| 3098 | (save-excursion | 3102 | (save-excursion |
| 3103 | |||
| 3104 | ;; Check for program. | ||
| 3105 | (when (and (fboundp 'executable-find) | ||
| 3106 | (not (executable-find copy-program))) | ||
| 3107 | (error "Cannot find copy program: %s" copy-program)) | ||
| 3108 | |||
| 3099 | (set-buffer trampbuf) | 3109 | (set-buffer trampbuf) |
| 3100 | (setq tramp-current-multi-method multi-method | 3110 | (setq tramp-current-multi-method multi-method |
| 3101 | tramp-current-method method | 3111 | tramp-current-method method |
| @@ -3170,15 +3180,15 @@ This is like `dired-recursive-delete-directory' for tramp files." | |||
| 3170 | 'file-error | 3180 | 'file-error |
| 3171 | (list "Removing old file name" "no such directory" filename))) | 3181 | (list "Removing old file name" "no such directory" filename))) |
| 3172 | ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>) | 3182 | ;; Which is better, -r or -R? (-r works for me <daniel@danann.net>) |
| 3173 | (tramp-send-command multi-method method user host | 3183 | (tramp-send-command multi-method method user host |
| 3174 | (format "rm -r %s" (tramp-shell-quote-argument localname))) | 3184 | (format "rm -r %s" (tramp-shell-quote-argument localname))) |
| 3175 | ;; Wait for the remote system to return to us... | 3185 | ;; Wait for the remote system to return to us... |
| 3176 | ;; This might take a while, allow it plenty of time. | 3186 | ;; This might take a while, allow it plenty of time. |
| 3177 | (tramp-wait-for-output 120) | 3187 | (tramp-wait-for-output 120) |
| 3178 | ;; Make sure that it worked... | 3188 | ;; Make sure that it worked... |
| 3179 | (and (file-exists-p filename) | 3189 | (and (file-exists-p filename) |
| 3180 | (error "Failed to recusively delete %s" filename)))) | 3190 | (error "Failed to recursively delete %s" filename)))) |
| 3181 | 3191 | ||
| 3182 | (defun tramp-handle-dired-call-process (program discard &rest arguments) | 3192 | (defun tramp-handle-dired-call-process (program discard &rest arguments) |
| 3183 | "Like `dired-call-process' for tramp files." | 3193 | "Like `dired-call-process' for tramp files." |
| 3184 | (with-parsed-tramp-file-name default-directory nil | 3194 | (with-parsed-tramp-file-name default-directory nil |
| @@ -3200,7 +3210,7 @@ This is like `dired-recursive-delete-directory' for tramp files." | |||
| 3200 | (tramp-send-command-and-check multi-method method user host nil) | 3210 | (tramp-send-command-and-check multi-method method user host nil) |
| 3201 | (tramp-send-command multi-method method user host "cd") | 3211 | (tramp-send-command multi-method method user host "cd") |
| 3202 | (tramp-wait-for-output))))) | 3212 | (tramp-wait-for-output))))) |
| 3203 | 3213 | ||
| 3204 | (defun tramp-handle-dired-compress-file (file &rest ok-flag) | 3214 | (defun tramp-handle-dired-compress-file (file &rest ok-flag) |
| 3205 | "Like `dired-compress-file' for tramp files." | 3215 | "Like `dired-compress-file' for tramp files." |
| 3206 | ;; OK-FLAG is valid for XEmacs only, but not implemented. | 3216 | ;; OK-FLAG is valid for XEmacs only, but not implemented. |
| @@ -3568,7 +3578,7 @@ This will break if COMMAND prints a newline, followed by the value of | |||
| 3568 | (when (and (numberp buffer) (zerop buffer)) | 3578 | (when (and (numberp buffer) (zerop buffer)) |
| 3569 | (error "Implementation does not handle immediate return")) | 3579 | (error "Implementation does not handle immediate return")) |
| 3570 | (when (consp buffer) (error "Implementation does not handle error files")) | 3580 | (when (consp buffer) (error "Implementation does not handle error files")) |
| 3571 | (shell-command | 3581 | (shell-command |
| 3572 | (mapconcat 'tramp-shell-quote-argument | 3582 | (mapconcat 'tramp-shell-quote-argument |
| 3573 | (cons program args) | 3583 | (cons program args) |
| 3574 | " ") | 3584 | " ") |
| @@ -4250,7 +4260,7 @@ necessary anymore." | |||
| 4250 | ;; `tramp-completion-file-name-regexp-unified' aren't different. | 4260 | ;; `tramp-completion-file-name-regexp-unified' aren't different. |
| 4251 | ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to | 4261 | ;; If nil, `tramp-completion-run-real-handler' is called (i.e. forwarding to |
| 4252 | ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'. | 4262 | ;; `tramp-file-name-handler'). Otherwise, it takes `tramp-run-real-handler'. |
| 4253 | ;; Using `last-input-event' is a little bit risky, because completing a file | 4263 | ;; Using `last-input-event' is a little bit risky, because completing a file |
| 4254 | ;; might require loading other files, like "~/.netrc", and for them it | 4264 | ;; might require loading other files, like "~/.netrc", and for them it |
| 4255 | ;; shouldn't be decided based on that variable. On the other hand, those files | 4265 | ;; shouldn't be decided based on that variable. On the other hand, those files |
| 4256 | ;; shouldn't have partial tramp file name syntax. Maybe another variable should | 4266 | ;; shouldn't have partial tramp file name syntax. Maybe another variable should |
| @@ -4354,7 +4364,7 @@ necessary anymore." | |||
| 4354 | (funcall (nth 0 x) (nth 1 x))))) | 4364 | (funcall (nth 0 x) (nth 1 x))))) |
| 4355 | (tramp-get-completion-function m)) | 4365 | (tramp-get-completion-function m)) |
| 4356 | 4366 | ||
| 4357 | (setq result (append result | 4367 | (setq result (append result |
| 4358 | (mapcar | 4368 | (mapcar |
| 4359 | (lambda (x) | 4369 | (lambda (x) |
| 4360 | (tramp-get-completion-user-host | 4370 | (tramp-get-completion-user-host |
| @@ -4395,7 +4405,7 @@ necessary anymore." | |||
| 4395 | ;; [nil nil "x" nil nil] | 4405 | ;; [nil nil "x" nil nil] |
| 4396 | ;; [nil "x" nil nil nil] | 4406 | ;; [nil "x" nil nil nil] |
| 4397 | 4407 | ||
| 4398 | ;; "/x:" "/x:y" "/x:y:" | 4408 | ;; "/x:" "/x:y" "/x:y:" |
| 4399 | ;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""] | 4409 | ;; [nil nil nil "x" ""] [nil nil nil "x" "y"] [nil "x" nil "y" ""] |
| 4400 | ;; "/[x/" "/[x/y" | 4410 | ;; "/[x/" "/[x/y" |
| 4401 | ;; [nil "x" nil "" nil] [nil "x" nil "y" nil] | 4411 | ;; [nil "x" nil "" nil] [nil "x" nil "y" nil] |
| @@ -4769,7 +4779,7 @@ User may be nil." | |||
| 4769 | 4779 | ||
| 4770 | ;;; Internal Functions: | 4780 | ;;; Internal Functions: |
| 4771 | 4781 | ||
| 4772 | (defun tramp-maybe-send-perl-script (script name multi-method method user host) | 4782 | (defun tramp-maybe-send-perl-script (multi-method method user host script name) |
| 4773 | "Define in remote shell function NAME implemented as perl SCRIPT. | 4783 | "Define in remote shell function NAME implemented as perl SCRIPT. |
| 4774 | Only send the definition if it has not already been done. | 4784 | Only send the definition if it has not already been done. |
| 4775 | Function may have 0-3 parameters." | 4785 | Function may have 0-3 parameters." |
| @@ -4864,7 +4874,7 @@ TIME is an Emacs internal time value as returned by `current-time'." | |||
| 4864 | "touch" nil (current-buffer) nil "-t" touch-time file)) | 4874 | "touch" nil (current-buffer) nil "-t" touch-time file)) |
| 4865 | (pop-to-buffer (current-buffer)) | 4875 | (pop-to-buffer (current-buffer)) |
| 4866 | (error "tramp-touch: touch failed")))))) | 4876 | (error "tramp-touch: touch failed")))))) |
| 4867 | 4877 | ||
| 4868 | (defun tramp-buffer-name (multi-method method user host) | 4878 | (defun tramp-buffer-name (multi-method method user host) |
| 4869 | "A name for the connection buffer for USER at HOST using METHOD." | 4879 | "A name for the connection buffer for USER at HOST using METHOD." |
| 4870 | (if multi-method | 4880 | (if multi-method |
| @@ -5022,7 +5032,7 @@ file exists and nonzero exit status otherwise." | |||
| 5022 | (file-exists-p existing) | 5032 | (file-exists-p existing) |
| 5023 | (not (file-exists-p nonexisting)))) | 5033 | (not (file-exists-p nonexisting)))) |
| 5024 | (error "Couldn't find command to check if file exists.")))) | 5034 | (error "Couldn't find command to check if file exists.")))) |
| 5025 | 5035 | ||
| 5026 | 5036 | ||
| 5027 | ;; CCC test ksh or bash found for tilde expansion? | 5037 | ;; CCC test ksh or bash found for tilde expansion? |
| 5028 | (defun tramp-find-shell (multi-method method user host) | 5038 | (defun tramp-find-shell (multi-method method user host) |
| @@ -5121,9 +5131,9 @@ Returns nil if none was found, else the command is returned." | |||
| 5121 | (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path) | 5131 | (tramp-check-ls-commands multi-method method user host "gnuls" tramp-remote-path) |
| 5122 | (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path))) | 5132 | (tramp-check-ls-commands multi-method method user host "gls" tramp-remote-path))) |
| 5123 | 5133 | ||
| 5124 | ;; ------------------------------------------------------------ | 5134 | ;; ------------------------------------------------------------ |
| 5125 | ;; -- Functions for establishing connection -- | 5135 | ;; -- Functions for establishing connection -- |
| 5126 | ;; ------------------------------------------------------------ | 5136 | ;; ------------------------------------------------------------ |
| 5127 | 5137 | ||
| 5128 | ;; The following functions are actions to be taken when seeing certain | 5138 | ;; The following functions are actions to be taken when seeing certain |
| 5129 | ;; prompts from the remote host. See the variable | 5139 | ;; prompts from the remote host. See the variable |
| @@ -5364,7 +5374,7 @@ Maybe the different regular expressions need to be tuned. | |||
| 5364 | (when multi-method | 5374 | (when multi-method |
| 5365 | (error "Cannot multi-connect using telnet connection method")) | 5375 | (error "Cannot multi-connect using telnet connection method")) |
| 5366 | (tramp-pre-connection multi-method method user host) | 5376 | (tramp-pre-connection multi-method method user host) |
| 5367 | (tramp-message 7 "Opening connection for %s@%s using %s..." | 5377 | (tramp-message 7 "Opening connection for %s@%s using %s..." |
| 5368 | (or user (user-login-name)) host method) | 5378 | (or user (user-login-name)) host method) |
| 5369 | (let ((process-environment (copy-sequence process-environment))) | 5379 | (let ((process-environment (copy-sequence process-environment))) |
| 5370 | (setenv "TERM" tramp-terminal-type) | 5380 | (setenv "TERM" tramp-terminal-type) |
| @@ -5398,7 +5408,7 @@ Maybe the different regular expressions need to be tuned. | |||
| 5398 | p multi-method method user host) | 5408 | p multi-method method user host) |
| 5399 | (tramp-post-connection multi-method method user host))))) | 5409 | (tramp-post-connection multi-method method user host))))) |
| 5400 | 5410 | ||
| 5401 | 5411 | ||
| 5402 | (defun tramp-open-connection-rsh (multi-method method user host) | 5412 | (defun tramp-open-connection-rsh (multi-method method user host) |
| 5403 | "Open a connection using an rsh METHOD. | 5413 | "Open a connection using an rsh METHOD. |
| 5404 | This starts the command `rsh HOST -l USER'[*], then waits for a remote | 5414 | This starts the command `rsh HOST -l USER'[*], then waits for a remote |
| @@ -5423,7 +5433,7 @@ arguments, and xx will be used as the host name to connect to. | |||
| 5423 | (error "Cannot multi-connect using rsh connection method")) | 5433 | (error "Cannot multi-connect using rsh connection method")) |
| 5424 | (tramp-pre-connection multi-method method user host) | 5434 | (tramp-pre-connection multi-method method user host) |
| 5425 | (if (and user (not (string= user ""))) | 5435 | (if (and user (not (string= user ""))) |
| 5426 | (tramp-message 7 "Opening connection for %s@%s using %s..." | 5436 | (tramp-message 7 "Opening connection for %s@%s using %s..." |
| 5427 | user host method) | 5437 | user host method) |
| 5428 | (tramp-message 7 "Opening connection at %s using %s..." host method)) | 5438 | (tramp-message 7 "Opening connection at %s using %s..." host method)) |
| 5429 | (let ((process-environment (copy-sequence process-environment)) | 5439 | (let ((process-environment (copy-sequence process-environment)) |
| @@ -5452,9 +5462,9 @@ arguments, and xx will be used as the host name to connect to. | |||
| 5452 | (> emacs-major-version 20)) | 5462 | (> emacs-major-version 20)) |
| 5453 | tramp-dos-coding-system)) | 5463 | tramp-dos-coding-system)) |
| 5454 | (p (if (and user (not (string= user ""))) | 5464 | (p (if (and user (not (string= user ""))) |
| 5455 | (apply #'start-process bufnam buf login-program | 5465 | (apply #'start-process bufnam buf login-program |
| 5456 | real-host "-l" user login-args) | 5466 | real-host "-l" user login-args) |
| 5457 | (apply #'start-process bufnam buf login-program | 5467 | (apply #'start-process bufnam buf login-program |
| 5458 | real-host login-args))) | 5468 | real-host login-args))) |
| 5459 | (found nil)) | 5469 | (found nil)) |
| 5460 | (tramp-set-process-query-on-exit-flag p nil) | 5470 | (tramp-set-process-query-on-exit-flag p nil) |
| @@ -5524,10 +5534,10 @@ prompt than you do, so it is not at all unlikely that the variable | |||
| 5524 | tramp-actions-before-shell) | 5534 | tramp-actions-before-shell) |
| 5525 | (tramp-open-connection-setup-interactive-shell | 5535 | (tramp-open-connection-setup-interactive-shell |
| 5526 | p multi-method method user host) | 5536 | p multi-method method user host) |
| 5527 | (tramp-post-connection multi-method method | 5537 | (tramp-post-connection multi-method method |
| 5528 | user host))))) | 5538 | user host))))) |
| 5529 | 5539 | ||
| 5530 | ;; HHH: Not Changed. Multi method. It is not clear to me how this can | 5540 | ;; HHH: Not Changed. Multi method. It is not clear to me how this can |
| 5531 | ;; handle not giving a user name in the "file name". | 5541 | ;; handle not giving a user name in the "file name". |
| 5532 | ;; | 5542 | ;; |
| 5533 | ;; This is more difficult than for the single-hop method. In the | 5543 | ;; This is more difficult than for the single-hop method. In the |
| @@ -5597,7 +5607,7 @@ log in as u2 to h2." | |||
| 5597 | (tramp-post-connection multi-method method user host))))) | 5607 | (tramp-post-connection multi-method method user host))))) |
| 5598 | 5608 | ||
| 5599 | ;; HHH: Changed. Multi method. Don't know how to handle this in the case | 5609 | ;; HHH: Changed. Multi method. Don't know how to handle this in the case |
| 5600 | ;; of no user name provided. Hack to make it work as it did before: | 5610 | ;; of no user name provided. Hack to make it work as it did before: |
| 5601 | ;; changed `user' to `(or user (user-login-name))' in the places where | 5611 | ;; changed `user' to `(or user (user-login-name))' in the places where |
| 5602 | ;; the value is actually used. | 5612 | ;; the value is actually used. |
| 5603 | (defun tramp-multi-connect-telnet (p method user host command) | 5613 | (defun tramp-multi-connect-telnet (p method user host command) |
| @@ -5619,8 +5629,8 @@ If USER is nil, uses the return value of (user-login-name) instead." | |||
| 5619 | (tramp-process-multi-actions p method user host | 5629 | (tramp-process-multi-actions p method user host |
| 5620 | tramp-multi-actions))) | 5630 | tramp-multi-actions))) |
| 5621 | 5631 | ||
| 5622 | ;; HHH: Changed. Multi method. Don't know how to handle this in the case | 5632 | ;; HHH: Changed. Multi method. Don't know how to handle this in the case |
| 5623 | ;; of no user name provided. Hack to make it work as it did before: | 5633 | ;; of no user name provided. Hack to make it work as it did before: |
| 5624 | ;; changed `user' to `(or user (user-login-name))' in the places where | 5634 | ;; changed `user' to `(or user (user-login-name))' in the places where |
| 5625 | ;; the value is actually used. | 5635 | ;; the value is actually used. |
| 5626 | (defun tramp-multi-connect-rlogin (p method user host command) | 5636 | (defun tramp-multi-connect-rlogin (p method user host command) |
| @@ -5645,8 +5655,8 @@ If USER is nil, uses the return value of (user-login-name) instead." | |||
| 5645 | (tramp-process-multi-actions p method user host | 5655 | (tramp-process-multi-actions p method user host |
| 5646 | tramp-multi-actions))) | 5656 | tramp-multi-actions))) |
| 5647 | 5657 | ||
| 5648 | ;; HHH: Changed. Multi method. Don't know how to handle this in the case | 5658 | ;; HHH: Changed. Multi method. Don't know how to handle this in the case |
| 5649 | ;; of no user name provided. Hack to make it work as it did before: | 5659 | ;; of no user name provided. Hack to make it work as it did before: |
| 5650 | ;; changed `user' to `(or user (user-login-name))' in the places where | 5660 | ;; changed `user' to `(or user (user-login-name))' in the places where |
| 5651 | ;; the value is actually used. | 5661 | ;; the value is actually used. |
| 5652 | (defun tramp-multi-connect-su (p method user host command) | 5662 | (defun tramp-multi-connect-su (p method user host command) |
| @@ -6276,7 +6286,7 @@ Sends COMMAND, then waits 30 seconds for shell prompt." | |||
| 6276 | (tramp-barf-if-no-shell-prompt | 6286 | (tramp-barf-if-no-shell-prompt |
| 6277 | nil 30 | 6287 | nil 30 |
| 6278 | "Couldn't `%s', see buffer `%s'" command (buffer-name))) | 6288 | "Couldn't `%s', see buffer `%s'" command (buffer-name))) |
| 6279 | 6289 | ||
| 6280 | (defun tramp-wait-for-output (&optional timeout) | 6290 | (defun tramp-wait-for-output (&optional timeout) |
| 6281 | "Wait for output from remote rsh command." | 6291 | "Wait for output from remote rsh command." |
| 6282 | (let ((proc (get-buffer-process (current-buffer))) | 6292 | (let ((proc (get-buffer-process (current-buffer))) |
| @@ -6609,9 +6619,9 @@ Not actually used. Use `(format \"%o\" i)' instead?" | |||
| 6609 | "")) | 6619 | "")) |
| 6610 | 6620 | ||
| 6611 | 6621 | ||
| 6612 | ;; ------------------------------------------------------------ | 6622 | ;; ------------------------------------------------------------ |
| 6613 | ;; -- TRAMP file names -- | 6623 | ;; -- TRAMP file names -- |
| 6614 | ;; ------------------------------------------------------------ | 6624 | ;; ------------------------------------------------------------ |
| 6615 | ;; Conversion functions between external representation and | 6625 | ;; Conversion functions between external representation and |
| 6616 | ;; internal data structure. Convenience functions for internal | 6626 | ;; internal data structure. Convenience functions for internal |
| 6617 | ;; data structure. | 6627 | ;; data structure. |
| @@ -6622,7 +6632,7 @@ Not actually used. Use `(format \"%o\" i)' instead?" | |||
| 6622 | "Return t iff NAME is a tramp file." | 6632 | "Return t iff NAME is a tramp file." |
| 6623 | (save-match-data | 6633 | (save-match-data |
| 6624 | (string-match tramp-file-name-regexp name))) | 6634 | (string-match tramp-file-name-regexp name))) |
| 6625 | 6635 | ||
| 6626 | ;; HHH: Changed. Used to assign the return value of (user-login-name) | 6636 | ;; HHH: Changed. Used to assign the return value of (user-login-name) |
| 6627 | ;; to the `user' part of the structure if a user name was not | 6637 | ;; to the `user' part of the structure if a user name was not |
| 6628 | ;; provided, now it assigns nil. | 6638 | ;; provided, now it assigns nil. |
| @@ -6675,7 +6685,7 @@ This is MULTI-METHOD, if non-nil. Otherwise, it is METHOD, if non-nil. | |||
| 6675 | If both MULTI-METHOD and METHOD are nil, do a lookup in | 6685 | If both MULTI-METHOD and METHOD are nil, do a lookup in |
| 6676 | `tramp-default-method-alist'." | 6686 | `tramp-default-method-alist'." |
| 6677 | (or multi-method method (tramp-find-default-method user host))) | 6687 | (or multi-method method (tramp-find-default-method user host))) |
| 6678 | 6688 | ||
| 6679 | ;; HHH: Not Changed. Multi method. Will probably not handle the case where | 6689 | ;; HHH: Not Changed. Multi method. Will probably not handle the case where |
| 6680 | ;; a user name is not provided in the "file name" very well. | 6690 | ;; a user name is not provided in the "file name" very well. |
| 6681 | (defun tramp-dissect-multi-file-name (name) | 6691 | (defun tramp-dissect-multi-file-name (name) |
| @@ -6847,7 +6857,7 @@ as default." | |||
| 6847 | (if entry | 6857 | (if entry |
| 6848 | (second entry) | 6858 | (second entry) |
| 6849 | (symbol-value param)))) | 6859 | (symbol-value param)))) |
| 6850 | 6860 | ||
| 6851 | 6861 | ||
| 6852 | ;; Auto saving to a special directory. | 6862 | ;; Auto saving to a special directory. |
| 6853 | 6863 | ||
| @@ -7039,9 +7049,9 @@ exiting if process is running." | |||
| 7039 | process flag))) | 7049 | process flag))) |
| 7040 | 7050 | ||
| 7041 | 7051 | ||
| 7042 | ;; ------------------------------------------------------------ | 7052 | ;; ------------------------------------------------------------ |
| 7043 | ;; -- Kludges section -- | 7053 | ;; -- Kludges section -- |
| 7044 | ;; ------------------------------------------------------------ | 7054 | ;; ------------------------------------------------------------ |
| 7045 | 7055 | ||
| 7046 | ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' | 7056 | ;; Currently (as of Emacs 20.5), the function `shell-quote-argument' |
| 7047 | ;; does not deal well with newline characters. Newline is replaced by | 7057 | ;; does not deal well with newline characters. Newline is replaced by |
| @@ -7304,7 +7314,7 @@ report. | |||
| 7304 | ;; strange when doing zerop, we should kill the process and start | 7314 | ;; strange when doing zerop, we should kill the process and start |
| 7305 | ;; again. (Greg Stark) | 7315 | ;; again. (Greg Stark) |
| 7306 | ;; * Add caching for filename completion. (Greg Stark) | 7316 | ;; * Add caching for filename completion. (Greg Stark) |
| 7307 | ;; Of course, this has issues with usability (stale cache bites) | 7317 | ;; Of course, this has issues with usability (stale cache bites) |
| 7308 | ;; -- <daniel@danann.net> | 7318 | ;; -- <daniel@danann.net> |
| 7309 | ;; * Provide a local cache of old versions of remote files for the rsync | 7319 | ;; * Provide a local cache of old versions of remote files for the rsync |
| 7310 | ;; transfer method to use. (Greg Stark) | 7320 | ;; transfer method to use. (Greg Stark) |
diff --git a/lisp/net/trampver.el b/lisp/net/trampver.el index 7456bc1660f..866d6e5647d 100644 --- a/lisp/net/trampver.el +++ b/lisp/net/trampver.el | |||
| @@ -30,7 +30,7 @@ | |||
| 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run | 30 | ;; are auto-frobbed from configure.ac, so you should edit that file and run |
| 31 | ;; "autoconf && ./configure" to change them. | 31 | ;; "autoconf && ./configure" to change them. |
| 32 | 32 | ||
| 33 | (defconst tramp-version "2.0.45" | 33 | (defconst tramp-version "2.0.46" |
| 34 | "This version of Tramp.") | 34 | "This version of Tramp.") |
| 35 | 35 | ||
| 36 | (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" | 36 | (defconst tramp-bug-report-address "tramp-devel@mail.freesoftware.fsf.org" |
diff --git a/lisp/pcvs-defs.el b/lisp/pcvs-defs.el index 6bdd6bb6dd8..27629c5ddc6 100644 --- a/lisp/pcvs-defs.el +++ b/lisp/pcvs-defs.el | |||
| @@ -380,6 +380,8 @@ This variable is buffer local and only used in the *cvs* buffer.") | |||
| 380 | ("+" . cvs-mode-tree) | 380 | ("+" . cvs-mode-tree) |
| 381 | ;; mouse bindings | 381 | ;; mouse bindings |
| 382 | ([mouse-2] . cvs-mode-find-file) | 382 | ([mouse-2] . cvs-mode-find-file) |
| 383 | ([follow-link] . (lambda (pos) | ||
| 384 | (if (eq (get-char-property pos 'face) 'cvs-filename-face) t))) | ||
| 383 | ([(down-mouse-3)] . cvs-menu) | 385 | ([(down-mouse-3)] . cvs-menu) |
| 384 | ;; dired-like bindings | 386 | ;; dired-like bindings |
| 385 | ("\C-o" . cvs-mode-display-file) | 387 | ("\C-o" . cvs-mode-display-file) |
diff --git a/lisp/play/zone.el b/lisp/play/zone.el index abe9657a9d8..80d0760bed2 100644 --- a/lisp/play/zone.el +++ b/lisp/play/zone.el | |||
| @@ -33,10 +33,11 @@ | |||
| 33 | ;; `zone-programs'. See `zone-call' for higher-ordered zoning. | 33 | ;; `zone-programs'. See `zone-call' for higher-ordered zoning. |
| 34 | 34 | ||
| 35 | ;; WARNING: Not appropriate for Emacs sessions over modems or | 35 | ;; WARNING: Not appropriate for Emacs sessions over modems or |
| 36 | ;; computers as slow as mine. | 36 | ;; computers as slow as mine. |
| 37 | 37 | ||
| 38 | ;; THANKS: Christopher Mayer, Scott Flinchbaugh, Rachel Kalmar, | 38 | ;; THANKS: Christopher Mayer, Scott Flinchbaugh, |
| 39 | ;; Max Froumentin. | 39 | ;; Rachel Kalmar, Max Froumentin, Juri Linkov, |
| 40 | ;; Luigi Panzeri, John Paul Wallington. | ||
| 40 | 41 | ||
| 41 | ;;; Code: | 42 | ;;; Code: |
| 42 | 43 | ||
| @@ -75,6 +76,7 @@ If nil, don't interrupt for about 1^26 seconds.") | |||
| 75 | zone-pgm-paragraph-spaz | 76 | zone-pgm-paragraph-spaz |
| 76 | zone-pgm-stress | 77 | zone-pgm-stress |
| 77 | zone-pgm-stress-destress | 78 | zone-pgm-stress-destress |
| 79 | zone-pgm-random-life | ||
| 78 | ]) | 80 | ]) |
| 79 | 81 | ||
| 80 | (defmacro zone-orig (&rest body) | 82 | (defmacro zone-orig (&rest body) |
| @@ -139,19 +141,28 @@ If the element is a function or a list of a function and a number, | |||
| 139 | (window-start))))) | 141 | (window-start))))) |
| 140 | (put 'zone 'orig-buffer (current-buffer)) | 142 | (put 'zone 'orig-buffer (current-buffer)) |
| 141 | (put 'zone 'modeline-hidden-level 0) | 143 | (put 'zone 'modeline-hidden-level 0) |
| 142 | (set-buffer outbuf) | 144 | (switch-to-buffer outbuf) |
| 143 | (setq mode-name "Zone") | 145 | (setq mode-name "Zone") |
| 144 | (erase-buffer) | 146 | (erase-buffer) |
| 147 | (setq buffer-undo-list t | ||
| 148 | truncate-lines t | ||
| 149 | tab-width (zone-orig tab-width) | ||
| 150 | line-spacing (zone-orig line-spacing)) | ||
| 145 | (insert text) | 151 | (insert text) |
| 146 | (switch-to-buffer outbuf) | ||
| 147 | (setq buffer-undo-list t) | ||
| 148 | (untabify (point-min) (point-max)) | 152 | (untabify (point-min) (point-max)) |
| 149 | (set-window-start (selected-window) (point-min)) | 153 | (set-window-start (selected-window) (point-min)) |
| 150 | (set-window-point (selected-window) wp) | 154 | (set-window-point (selected-window) wp) |
| 151 | (sit-for 0 500) | 155 | (sit-for 0 500) |
| 152 | (let ((pgm (elt zone-programs (random (length zone-programs)))) | 156 | (let ((pgm (elt zone-programs (random (length zone-programs)))) |
| 153 | (ct (and f (frame-parameter f 'cursor-type)))) | 157 | (ct (and f (frame-parameter f 'cursor-type))) |
| 154 | (when ct (modify-frame-parameters f '((cursor-type . (bar . 0))))) | 158 | (restore (list '(kill-buffer outbuf)))) |
| 159 | (when ct | ||
| 160 | (modify-frame-parameters f '((cursor-type . (bar . 0)))) | ||
| 161 | (setq restore (cons '(modify-frame-parameters | ||
| 162 | f (list (cons 'cursor-type ct))) | ||
| 163 | restore))) | ||
| 164 | ;; Make `restore' a self-disabling one-shot thunk. | ||
| 165 | (setq restore `(lambda () ,@restore (setq restore nil))) | ||
| 155 | (condition-case nil | 166 | (condition-case nil |
| 156 | (progn | 167 | (progn |
| 157 | (message "Zoning... (%s)" pgm) | 168 | (message "Zoning... (%s)" pgm) |
| @@ -165,14 +176,17 @@ If the element is a function or a list of a function and a number, | |||
| 165 | (zone-call pgm) | 176 | (zone-call pgm) |
| 166 | (message "Zoning...sorry")) | 177 | (message "Zoning...sorry")) |
| 167 | (error | 178 | (error |
| 179 | (funcall restore) | ||
| 168 | (while (not (input-pending-p)) | 180 | (while (not (input-pending-p)) |
| 169 | (message (format "We were zoning when we wrote %s..." pgm)) | 181 | (message (format "We were zoning when we wrote %s..." pgm)) |
| 170 | (sit-for 3) | 182 | (sit-for 3) |
| 171 | (message "...here's hoping we didn't hose your buffer!") | 183 | (message "...here's hoping we didn't hose your buffer!") |
| 172 | (sit-for 3))) | 184 | (sit-for 3))) |
| 173 | (quit (ding) (message "Zoning...sorry"))) | 185 | (quit |
| 174 | (when ct (modify-frame-parameters f (list (cons 'cursor-type ct))))) | 186 | (funcall restore) |
| 175 | (kill-buffer outbuf))) | 187 | (ding) |
| 188 | (message "Zoning...sorry"))) | ||
| 189 | (when restore (funcall restore))))) | ||
| 176 | 190 | ||
| 177 | ;;;; Zone when idle, or not. | 191 | ;;;; Zone when idle, or not. |
| 178 | 192 | ||
| @@ -194,13 +208,11 @@ If the element is a function or a list of a function and a number, | |||
| 194 | (message "I won't zone out any more")) | 208 | (message "I won't zone out any more")) |
| 195 | 209 | ||
| 196 | 210 | ||
| 197 | ;;;; zone-pgm-jitter | 211 | ;;;; jittering |
| 198 | 212 | ||
| 199 | (defun zone-shift-up () | 213 | (defun zone-shift-up () |
| 200 | (let* ((b (point)) | 214 | (let* ((b (point)) |
| 201 | (e (progn | 215 | (e (progn (forward-line 1) (point))) |
| 202 | (end-of-line) | ||
| 203 | (if (looking-at "\n") (1+ (point)) (point)))) | ||
| 204 | (s (buffer-substring b e))) | 216 | (s (buffer-substring b e))) |
| 205 | (delete-region b e) | 217 | (delete-region b e) |
| 206 | (goto-char (point-max)) | 218 | (goto-char (point-max)) |
| @@ -208,48 +220,40 @@ If the element is a function or a list of a function and a number, | |||
| 208 | 220 | ||
| 209 | (defun zone-shift-down () | 221 | (defun zone-shift-down () |
| 210 | (goto-char (point-max)) | 222 | (goto-char (point-max)) |
| 211 | (forward-line -1) | ||
| 212 | (beginning-of-line) | ||
| 213 | (let* ((b (point)) | 223 | (let* ((b (point)) |
| 214 | (e (progn | 224 | (e (progn (forward-line -1) (point))) |
| 215 | (end-of-line) | ||
| 216 | (if (looking-at "\n") (1+ (point)) (point)))) | ||
| 217 | (s (buffer-substring b e))) | 225 | (s (buffer-substring b e))) |
| 218 | (delete-region b e) | 226 | (delete-region b e) |
| 219 | (goto-char (point-min)) | 227 | (goto-char (point-min)) |
| 220 | (insert s))) | 228 | (insert s))) |
| 221 | 229 | ||
| 222 | (defun zone-shift-left () | 230 | (defun zone-shift-left () |
| 223 | (while (not (eobp)) | 231 | (let (s) |
| 224 | (or (eolp) | 232 | (while (not (eobp)) |
| 225 | (let ((c (following-char))) | 233 | (unless (eolp) |
| 226 | (delete-char 1) | 234 | (setq s (buffer-substring (point) (1+ (point)))) |
| 227 | (end-of-line) | 235 | (delete-char 1) |
| 228 | (insert c))) | 236 | (end-of-line) |
| 229 | (forward-line 1))) | 237 | (insert s)) |
| 238 | (forward-char 1)))) | ||
| 230 | 239 | ||
| 231 | (defun zone-shift-right () | 240 | (defun zone-shift-right () |
| 232 | (while (not (eobp)) | 241 | (goto-char (point-max)) |
| 233 | (end-of-line) | 242 | (end-of-line) |
| 234 | (or (bolp) | 243 | (let (s) |
| 235 | (let ((c (preceding-char))) | 244 | (while (not (bobp)) |
| 236 | (delete-backward-char 1) | 245 | (unless (bolp) |
| 237 | (beginning-of-line) | 246 | (setq s (buffer-substring (1- (point)) (point))) |
| 238 | (insert c))) | 247 | (delete-char -1) |
| 239 | (forward-line 1))) | 248 | (beginning-of-line) |
| 249 | (insert s)) | ||
| 250 | (end-of-line 0)))) | ||
| 240 | 251 | ||
| 241 | (defun zone-pgm-jitter () | 252 | (defun zone-pgm-jitter () |
| 242 | (let ((ops [ | 253 | (let ((ops [ |
| 243 | zone-shift-left | 254 | zone-shift-left |
| 244 | zone-shift-left | ||
| 245 | zone-shift-left | ||
| 246 | zone-shift-left | ||
| 247 | zone-shift-right | 255 | zone-shift-right |
| 248 | zone-shift-down | 256 | zone-shift-down |
| 249 | zone-shift-down | ||
| 250 | zone-shift-down | ||
| 251 | zone-shift-down | ||
| 252 | zone-shift-down | ||
| 253 | zone-shift-up | 257 | zone-shift-up |
| 254 | ])) | 258 | ])) |
| 255 | (goto-char (point-min)) | 259 | (goto-char (point-min)) |
| @@ -259,7 +263,7 @@ If the element is a function or a list of a function and a number, | |||
| 259 | (sit-for 0 10)))) | 263 | (sit-for 0 10)))) |
| 260 | 264 | ||
| 261 | 265 | ||
| 262 | ;;;; zone-pgm-whack-chars | 266 | ;;;; whacking chars |
| 263 | 267 | ||
| 264 | (defun zone-pgm-whack-chars () | 268 | (defun zone-pgm-whack-chars () |
| 265 | (let ((tbl (copy-sequence (get 'zone-pgm-whack-chars 'wc-tbl)))) | 269 | (let ((tbl (copy-sequence (get 'zone-pgm-whack-chars 'wc-tbl)))) |
| @@ -279,7 +283,7 @@ If the element is a function or a list of a function and a number, | |||
| 279 | (setq i (1+ i))) | 283 | (setq i (1+ i))) |
| 280 | tbl)) | 284 | tbl)) |
| 281 | 285 | ||
| 282 | ;;;; zone-pgm-dissolve | 286 | ;;;; dissolving |
| 283 | 287 | ||
| 284 | (defun zone-remove-text () | 288 | (defun zone-remove-text () |
| 285 | (let ((working t)) | 289 | (let ((working t)) |
| @@ -304,11 +308,11 @@ If the element is a function or a list of a function and a number, | |||
| 304 | (zone-pgm-jitter)) | 308 | (zone-pgm-jitter)) |
| 305 | 309 | ||
| 306 | 310 | ||
| 307 | ;;;; zone-pgm-explode | 311 | ;;;; exploding |
| 308 | 312 | ||
| 309 | (defun zone-exploding-remove () | 313 | (defun zone-exploding-remove () |
| 310 | (let ((i 0)) | 314 | (let ((i 0)) |
| 311 | (while (< i 20) | 315 | (while (< i 5) |
| 312 | (save-excursion | 316 | (save-excursion |
| 313 | (goto-char (point-min)) | 317 | (goto-char (point-min)) |
| 314 | (while (not (eobp)) | 318 | (while (not (eobp)) |
| @@ -327,7 +331,7 @@ If the element is a function or a list of a function and a number, | |||
| 327 | (zone-pgm-jitter)) | 331 | (zone-pgm-jitter)) |
| 328 | 332 | ||
| 329 | 333 | ||
| 330 | ;;;; zone-pgm-putz-with-case | 334 | ;;;; putzing w/ case |
| 331 | 335 | ||
| 332 | ;; Faster than `zone-pgm-putz-with-case', but not as good: all | 336 | ;; Faster than `zone-pgm-putz-with-case', but not as good: all |
| 333 | ;; instances of the same letter have the same case, which produces a | 337 | ;; instances of the same letter have the same case, which produces a |
| @@ -376,7 +380,7 @@ If the element is a function or a list of a function and a number, | |||
| 376 | (sit-for 0 2))) | 380 | (sit-for 0 2))) |
| 377 | 381 | ||
| 378 | 382 | ||
| 379 | ;;;; zone-pgm-rotate | 383 | ;;;; rotating |
| 380 | 384 | ||
| 381 | (defun zone-line-specs () | 385 | (defun zone-line-specs () |
| 382 | (let (ret) | 386 | (let (ret) |
| @@ -438,46 +442,84 @@ If the element is a function or a list of a function and a number, | |||
| 438 | (zone-pgm-rotate (lambda () (1- (- (random 3)))))) | 442 | (zone-pgm-rotate (lambda () (1- (- (random 3)))))) |
| 439 | 443 | ||
| 440 | 444 | ||
| 441 | ;;;; zone-pgm-drip | 445 | ;;;; dripping |
| 442 | 446 | ||
| 443 | (defun zone-cpos (pos) | 447 | (defsubst zone-cpos (pos) |
| 444 | (buffer-substring pos (1+ pos))) | 448 | (buffer-substring pos (1+ pos))) |
| 445 | 449 | ||
| 446 | (defun zone-fret (pos) | 450 | (defsubst zone-replace-char (count del-count char-as-string new-value) |
| 451 | (delete-char (or del-count (- count))) | ||
| 452 | (aset char-as-string 0 new-value) | ||
| 453 | (dotimes (i count) (insert char-as-string))) | ||
| 454 | |||
| 455 | (defsubst zone-park/sit-for (pos seconds) | ||
| 456 | (let ((p (point))) | ||
| 457 | (goto-char pos) | ||
| 458 | (prog1 (sit-for seconds) | ||
| 459 | (goto-char p)))) | ||
| 460 | |||
| 461 | (defun zone-fret (wbeg pos) | ||
| 447 | (let* ((case-fold-search nil) | 462 | (let* ((case-fold-search nil) |
| 448 | (c-string (zone-cpos pos)) | 463 | (c-string (zone-cpos pos)) |
| 464 | (cw-ceil (ceiling (char-width (aref c-string 0)))) | ||
| 449 | (hmm (cond | 465 | (hmm (cond |
| 450 | ((string-match "[a-z]" c-string) (upcase c-string)) | 466 | ((string-match "[a-z]" c-string) (upcase c-string)) |
| 451 | ((string-match "[A-Z]" c-string) (downcase c-string)) | 467 | ((string-match "[A-Z]" c-string) (downcase c-string)) |
| 452 | (t " ")))) | 468 | (t (propertize " " 'display `(space :width ,cw-ceil)))))) |
| 453 | (do ((i 0 (1+ i)) | 469 | (do ((i 0 (1+ i)) |
| 454 | (wait 0.5 (* wait 0.8))) | 470 | (wait 0.5 (* wait 0.8))) |
| 455 | ((= i 20)) | 471 | ((= i 20)) |
| 456 | (goto-char pos) | 472 | (goto-char pos) |
| 457 | (delete-char 1) | 473 | (delete-char 1) |
| 458 | (insert (if (= 0 (% i 2)) hmm c-string)) | 474 | (insert (if (= 0 (% i 2)) hmm c-string)) |
| 459 | (sit-for wait)) | 475 | (zone-park/sit-for wbeg wait)) |
| 460 | (delete-char -1) (insert c-string))) | 476 | (delete-char -1) (insert c-string))) |
| 461 | 477 | ||
| 462 | (defun zone-fall-through-ws (c col wend) | 478 | (defun zone-fill-out-screen (width height) |
| 463 | (let ((fall-p nil) ; todo: move outward | 479 | (let ((start (window-start)) |
| 464 | (wait 0.15) | 480 | (line (make-string width 32))) |
| 465 | (o (point)) ; for terminals w/o cursor hiding | 481 | (goto-char start) |
| 466 | (p (point))) | 482 | ;; fill out rectangular ws block |
| 467 | (while (progn | 483 | (while (progn (end-of-line) |
| 468 | (forward-line 1) | 484 | (let ((cc (current-column))) |
| 469 | (move-to-column col) | 485 | (if (< cc width) |
| 470 | (looking-at " ")) | 486 | (insert (substring line cc)) |
| 471 | (setq fall-p t) | 487 | (delete-char (- width cc))) |
| 472 | (delete-char 1) | 488 | (cond ((eobp) (insert "\n") nil) |
| 473 | (insert (if (< (point) wend) c " ")) | 489 | (t (forward-char 1) t))))) |
| 474 | (save-excursion | 490 | ;; pad ws past bottom of screen |
| 475 | (goto-char p) | 491 | (let ((nl (- height (count-lines (point-min) (point))))) |
| 476 | (delete-char 1) | 492 | (when (> nl 0) |
| 477 | (insert " ") | 493 | (setq line (concat line "\n")) |
| 478 | (goto-char o) | 494 | (do ((i 0 (1+ i))) |
| 479 | (sit-for (setq wait (* wait 0.8)))) | 495 | ((= i nl)) |
| 480 | (setq p (1- (point)))) | 496 | (insert line)))) |
| 497 | (goto-char start) | ||
| 498 | (recenter 0) | ||
| 499 | (sit-for 0))) | ||
| 500 | |||
| 501 | (defun zone-fall-through-ws (c wbeg wend) | ||
| 502 | (let* ((cw-ceil (ceiling (char-width (aref c 0)))) | ||
| 503 | (spaces (make-string cw-ceil 32)) | ||
| 504 | (col (current-column)) | ||
| 505 | (wait 0.15) | ||
| 506 | newpos fall-p) | ||
| 507 | (while (when (save-excursion | ||
| 508 | (next-line 1) | ||
| 509 | (and (= col (current-column)) | ||
| 510 | (setq newpos (point)) | ||
| 511 | (string= spaces (buffer-substring-no-properties | ||
| 512 | newpos (+ newpos cw-ceil))) | ||
| 513 | (setq newpos (+ newpos (1- cw-ceil))))) | ||
| 514 | (setq fall-p t) | ||
| 515 | (delete-char 1) | ||
| 516 | (insert spaces) | ||
| 517 | (goto-char newpos) | ||
| 518 | (when (< (point) wend) | ||
| 519 | (delete-char cw-ceil) | ||
| 520 | (insert c) | ||
| 521 | (forward-char -1) | ||
| 522 | (zone-park/sit-for wbeg (setq wait (* wait 0.8)))))) | ||
| 481 | fall-p)) | 523 | fall-p)) |
| 482 | 524 | ||
| 483 | (defun zone-pgm-drip (&optional fret-p pancake-p) | 525 | (defun zone-pgm-drip (&optional fret-p pancake-p) |
| @@ -485,59 +527,35 @@ If the element is a function or a list of a function and a number, | |||
| 485 | (wh (window-height)) | 527 | (wh (window-height)) |
| 486 | (mc 0) ; miss count | 528 | (mc 0) ; miss count |
| 487 | (total (* ww wh)) | 529 | (total (* ww wh)) |
| 488 | (fall-p nil)) | 530 | (fall-p nil) |
| 489 | (goto-char (point-min)) | 531 | wbeg wend c) |
| 490 | ;; fill out rectangular ws block | 532 | (zone-fill-out-screen ww wh) |
| 491 | (while (not (eobp)) | 533 | (setq wbeg (window-start) |
| 492 | (end-of-line) | 534 | wend (window-end)) |
| 493 | (let ((cc (current-column))) | ||
| 494 | (if (< cc ww) | ||
| 495 | (insert (make-string (- ww cc) ? )) | ||
| 496 | (delete-char (- ww cc)))) | ||
| 497 | (unless (eobp) | ||
| 498 | (forward-char 1))) | ||
| 499 | ;; pad ws past bottom of screen | ||
| 500 | (let ((nl (- wh (count-lines (point-min) (point))))) | ||
| 501 | (when (> nl 0) | ||
| 502 | (let ((line (concat (make-string (1- ww) ? ) "\n"))) | ||
| 503 | (do ((i 0 (1+ i))) | ||
| 504 | ((= i nl)) | ||
| 505 | (insert line))))) | ||
| 506 | (catch 'done | 535 | (catch 'done |
| 507 | (while (not (input-pending-p)) | 536 | (while (not (input-pending-p)) |
| 508 | (goto-char (point-min)) | 537 | (setq mc 0 wend (window-end)) |
| 509 | (sit-for 0) | 538 | ;; select non-ws character, but don't miss too much |
| 510 | (let ((wbeg (window-start)) | 539 | (goto-char (+ wbeg (random (- wend wbeg)))) |
| 511 | (wend (window-end))) | 540 | (while (looking-at "[ \n\f]") |
| 512 | (setq mc 0) | 541 | (if (= total (setq mc (1+ mc))) |
| 513 | ;; select non-ws character, but don't miss too much | 542 | (throw 'done 'sel) |
| 514 | (goto-char (+ wbeg (random (- wend wbeg)))) | 543 | (goto-char (+ wbeg (random (- wend wbeg)))))) |
| 515 | (while (looking-at "[ \n\f]") | 544 | ;; character animation sequence |
| 516 | (if (= total (setq mc (1+ mc))) | 545 | (let ((p (point))) |
| 517 | (throw 'done 'sel) | 546 | (when fret-p (zone-fret wbeg p)) |
| 518 | (goto-char (+ wbeg (random (- wend wbeg)))))) | 547 | (goto-char p) |
| 519 | ;; character animation sequence | 548 | (setq c (zone-cpos p) |
| 520 | (let ((p (point))) | 549 | fall-p (zone-fall-through-ws c wbeg wend))) |
| 521 | (when fret-p (zone-fret p)) | ||
| 522 | (goto-char p) | ||
| 523 | (setq fall-p (zone-fall-through-ws | ||
| 524 | (zone-cpos p) (current-column) wend)))) | ||
| 525 | ;; assuming current-column has not changed... | 550 | ;; assuming current-column has not changed... |
| 526 | (when (and pancake-p | 551 | (when (and pancake-p |
| 527 | fall-p | 552 | fall-p |
| 528 | (< (count-lines (point-min) (point)) | 553 | (< (count-lines (point-min) (point)) |
| 529 | wh)) | 554 | wh)) |
| 530 | (previous-line 1) | 555 | (let ((cw (ceiling (char-width (aref c 0))))) |
| 531 | (forward-char 1) | 556 | (zone-replace-char cw 1 c ?@) (zone-park/sit-for wbeg 0.137) |
| 532 | (sit-for 0.137) | 557 | (zone-replace-char cw nil c ?*) (zone-park/sit-for wbeg 0.137) |
| 533 | (delete-char -1) | 558 | (zone-replace-char cw nil c ?_))))))) |
| 534 | (insert "@") | ||
| 535 | (sit-for 0.137) | ||
| 536 | (delete-char -1) | ||
| 537 | (insert "*") | ||
| 538 | (sit-for 0.137) | ||
| 539 | (delete-char -1) | ||
| 540 | (insert "_")))))) | ||
| 541 | 559 | ||
| 542 | (defun zone-pgm-drip-fretfully () | 560 | (defun zone-pgm-drip-fretfully () |
| 543 | (zone-pgm-drip t)) | 561 | (zone-pgm-drip t)) |
| @@ -549,10 +567,12 @@ If the element is a function or a list of a function and a number, | |||
| 549 | (zone-pgm-drip t t)) | 567 | (zone-pgm-drip t t)) |
| 550 | 568 | ||
| 551 | 569 | ||
| 552 | ;;;; zone-pgm-paragraph-spaz | 570 | ;;;; paragraph spazzing (for textish modes) |
| 553 | 571 | ||
| 554 | (defun zone-pgm-paragraph-spaz () | 572 | (defun zone-pgm-paragraph-spaz () |
| 555 | (if (memq (zone-orig major-mode) '(text-mode fundamental-mode)) | 573 | (if (memq (zone-orig major-mode) |
| 574 | ;; there should be a better way to distinguish textish modes | ||
| 575 | '(text-mode texinfo-mode fundamental-mode)) | ||
| 556 | (let ((fill-column fill-column) | 576 | (let ((fill-column fill-column) |
| 557 | (fc-min fill-column) | 577 | (fc-min fill-column) |
| 558 | (fc-max fill-column) | 578 | (fc-max fill-column) |
| @@ -570,7 +590,7 @@ If the element is a function or a list of a function and a number, | |||
| 570 | (zone-pgm-rotate))) | 590 | (zone-pgm-rotate))) |
| 571 | 591 | ||
| 572 | 592 | ||
| 573 | ;;;; zone-pgm-stress | 593 | ;;;; stressing and destressing |
| 574 | 594 | ||
| 575 | (defun zone-pgm-stress () | 595 | (defun zone-pgm-stress () |
| 576 | (goto-char (point-min)) | 596 | (goto-char (point-min)) |
| @@ -596,9 +616,6 @@ If the element is a function or a list of a function and a number, | |||
| 596 | (message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr")) | 616 | (message (concat (make-string (random (- (frame-width) 5)) ? ) "grrr")) |
| 597 | (sit-for 0.1))))) | 617 | (sit-for 0.1))))) |
| 598 | 618 | ||
| 599 | |||
| 600 | ;;;; zone-pgm-stress-destress | ||
| 601 | |||
| 602 | (defun zone-pgm-stress-destress () | 619 | (defun zone-pgm-stress-destress () |
| 603 | (zone-call 'zone-pgm-stress 25) | 620 | (zone-call 'zone-pgm-stress 25) |
| 604 | (zone-hiding-modeline | 621 | (zone-hiding-modeline |
| @@ -617,6 +634,63 @@ If the element is a function or a list of a function and a number, | |||
| 617 | zone-pgm-drip)))) | 634 | zone-pgm-drip)))) |
| 618 | 635 | ||
| 619 | 636 | ||
| 637 | ;;;; the lyfe so short the craft so long to lerne --chaucer | ||
| 638 | |||
| 639 | (defvar zone-pgm-random-life-wait nil | ||
| 640 | "*Seconds to wait between successive `life' generations. | ||
| 641 | If nil, `zone-pgm-random-life' chooses a value from 0-3 (inclusive).") | ||
| 642 | |||
| 643 | (defun zone-pgm-random-life () | ||
| 644 | (require 'life) | ||
| 645 | (zone-fill-out-screen (1- (window-width)) (1- (window-height))) | ||
| 646 | (let ((top (progn (goto-char (window-start)) (forward-line 7) (point))) | ||
| 647 | (bot (progn (goto-char (window-end)) (forward-line -7) (point))) | ||
| 648 | (rtc (- (frame-width) 11)) | ||
| 649 | (min (window-start)) | ||
| 650 | (max (1- (window-end))) | ||
| 651 | s c col) | ||
| 652 | (delete-region max (point-max)) | ||
| 653 | (while (and (progn (goto-char min) (sit-for 0.05)) | ||
| 654 | (progn (goto-char (+ min (random max))) | ||
| 655 | (or (progn (skip-chars-forward " @\n" max) | ||
| 656 | (not (= max (point)))) | ||
| 657 | (unless (or (= 0 (skip-chars-backward " @\n" min)) | ||
| 658 | (= min (point))) | ||
| 659 | (forward-char -1) | ||
| 660 | t)))) | ||
| 661 | (unless (or (eolp) (eobp)) | ||
| 662 | (setq s (zone-cpos (point)) | ||
| 663 | c (aref s 0)) | ||
| 664 | (zone-replace-char | ||
| 665 | (char-width c) | ||
| 666 | 1 s (cond ((or (> top (point)) | ||
| 667 | (< bot (point)) | ||
| 668 | (or (> 11 (setq col (current-column))) | ||
| 669 | (< rtc col))) | ||
| 670 | 32) | ||
| 671 | ((and (<= ?a c) (>= ?z c)) (+ c (- ?A ?a))) | ||
| 672 | ((and (<= ?A c) (>= ?Z c)) ?*) | ||
| 673 | (t ?@))))) | ||
| 674 | (sit-for 3) | ||
| 675 | (setq col nil) | ||
| 676 | (goto-char bot) | ||
| 677 | (while (< top (point)) | ||
| 678 | (setq c (point)) | ||
| 679 | (move-to-column 9) | ||
| 680 | (setq col (cons (buffer-substring (point) c) col)) | ||
| 681 | (end-of-line 0) | ||
| 682 | (forward-char -10)) | ||
| 683 | (let ((life-patterns (vector | ||
| 684 | (if (and col (search-forward "@" max t)) | ||
| 685 | (cons (make-string (length (car col)) 32) col) | ||
| 686 | (list (mapconcat 'identity | ||
| 687 | (make-list (/ (- rtc 11) 15) | ||
| 688 | (make-string 5 ?@)) | ||
| 689 | (make-string 10 32))))))) | ||
| 690 | (life (or zone-pgm-random-life-wait (random 4))) | ||
| 691 | (kill-buffer nil)))) | ||
| 692 | |||
| 693 | |||
| 620 | ;;;;;;;;;;;;;;; | 694 | ;;;;;;;;;;;;;;; |
| 621 | (provide 'zone) | 695 | (provide 'zone) |
| 622 | 696 | ||
diff --git a/lisp/progmodes/compile.el b/lisp/progmodes/compile.el index f2750ec8ff4..9c7e8fe1560 100644 --- a/lisp/progmodes/compile.el +++ b/lisp/progmodes/compile.el | |||
| @@ -1044,6 +1044,7 @@ exited abnormally with code %d\n" | |||
| 1044 | (defvar compilation-minor-mode-map | 1044 | (defvar compilation-minor-mode-map |
| 1045 | (let ((map (make-sparse-keymap))) | 1045 | (let ((map (make-sparse-keymap))) |
| 1046 | (define-key map [mouse-2] 'compile-goto-error) | 1046 | (define-key map [mouse-2] 'compile-goto-error) |
| 1047 | (define-key map [follow-link] 'mouse-face) | ||
| 1047 | (define-key map "\C-c\C-c" 'compile-goto-error) | 1048 | (define-key map "\C-c\C-c" 'compile-goto-error) |
| 1048 | (define-key map "\C-m" 'compile-goto-error) | 1049 | (define-key map "\C-m" 'compile-goto-error) |
| 1049 | (define-key map "\C-c\C-k" 'kill-compilation) | 1050 | (define-key map "\C-c\C-k" 'kill-compilation) |
| @@ -1073,6 +1074,7 @@ exited abnormally with code %d\n" | |||
| 1073 | (defvar compilation-button-map | 1074 | (defvar compilation-button-map |
| 1074 | (let ((map (make-sparse-keymap))) | 1075 | (let ((map (make-sparse-keymap))) |
| 1075 | (define-key map [mouse-2] 'compile-goto-error) | 1076 | (define-key map [mouse-2] 'compile-goto-error) |
| 1077 | (define-key map [follow-link] 'mouse-face) | ||
| 1076 | (define-key map "\C-m" 'compile-goto-error) | 1078 | (define-key map "\C-m" 'compile-goto-error) |
| 1077 | map) | 1079 | map) |
| 1078 | "Keymap for compilation-message buttons.") | 1080 | "Keymap for compilation-message buttons.") |
| @@ -1084,6 +1086,7 @@ exited abnormally with code %d\n" | |||
| 1084 | ;; because that introduces a menu bar item we don't want. | 1086 | ;; because that introduces a menu bar item we don't want. |
| 1085 | ;; That confuses C-down-mouse-3. | 1087 | ;; That confuses C-down-mouse-3. |
| 1086 | (define-key map [mouse-2] 'compile-goto-error) | 1088 | (define-key map [mouse-2] 'compile-goto-error) |
| 1089 | (define-key map [follow-link] 'mouse-face) | ||
| 1087 | (define-key map "\C-c\C-c" 'compile-goto-error) | 1090 | (define-key map "\C-c\C-c" 'compile-goto-error) |
| 1088 | (define-key map "\C-m" 'compile-goto-error) | 1091 | (define-key map "\C-m" 'compile-goto-error) |
| 1089 | (define-key map "\C-c\C-k" 'kill-compilation) | 1092 | (define-key map "\C-c\C-k" 'kill-compilation) |
diff --git a/lisp/progmodes/executable.el b/lisp/progmodes/executable.el index a5d401a5f5e..0eb53771019 100644 --- a/lisp/progmodes/executable.el +++ b/lisp/progmodes/executable.el | |||
| @@ -199,20 +199,20 @@ non-executable files." | |||
| 199 | (file-modes buffer-file-name))))))) | 199 | (file-modes buffer-file-name))))))) |
| 200 | 200 | ||
| 201 | 201 | ||
| 202 | ;;;###autoload | ||
| 202 | (defun executable-interpret (command) | 203 | (defun executable-interpret (command) |
| 203 | "Run script with user-specified args, and collect output in a buffer. | 204 | "Run script with user-specified args, and collect output in a buffer. |
| 204 | While script runs asynchronously, you can use the \\[next-error] command | 205 | While script runs asynchronously, you can use the \\[next-error] |
| 205 | to find the next error." | 206 | command to find the next error. The buffer is also in `comint-mode' and |
| 207 | `compilation-shell-minor-mode', so that you can answer any prompts." | ||
| 206 | (interactive (list (read-string "Run script: " | 208 | (interactive (list (read-string "Run script: " |
| 207 | (or executable-command | 209 | (or executable-command |
| 208 | buffer-file-name)))) | 210 | buffer-file-name)))) |
| 209 | (require 'compile) | 211 | (require 'compile) |
| 210 | (save-some-buffers (not compilation-ask-about-save)) | 212 | (save-some-buffers (not compilation-ask-about-save)) |
| 211 | (make-local-variable 'executable-command) | 213 | (set (make-local-variable 'executable-command) command) |
| 212 | (compile-internal (setq executable-command command) | 214 | (let ((compilation-error-regexp-alist executable-error-regexp-alist)) |
| 213 | "No more errors." "Interpretation" | 215 | (compilation-start command t (lambda (x) "*interpretation*")))) |
| 214 | ;; Give it a simpler regexp to match. | ||
| 215 | nil executable-error-regexp-alist)) | ||
| 216 | 216 | ||
| 217 | 217 | ||
| 218 | 218 | ||
diff --git a/lisp/progmodes/grep.el b/lisp/progmodes/grep.el index fd4b716ae4b..04fcae78ea6 100644 --- a/lisp/progmodes/grep.el +++ b/lisp/progmodes/grep.el | |||
| @@ -275,6 +275,9 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 275 | (defvar grep-error-face compilation-error-face | 275 | (defvar grep-error-face compilation-error-face |
| 276 | "Face name to use for grep error messages.") | 276 | "Face name to use for grep error messages.") |
| 277 | 277 | ||
| 278 | (defvar grep-match-face 'match | ||
| 279 | "Face name to use for grep matches.") | ||
| 280 | |||
| 278 | (defvar grep-mode-font-lock-keywords | 281 | (defvar grep-mode-font-lock-keywords |
| 279 | '(;; Command output lines. | 282 | '(;; Command output lines. |
| 280 | ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face) | 283 | ("^\\([A-Za-z_0-9/\.+-]+\\)[ \t]*:" 1 font-lock-function-name-face) |
| @@ -291,7 +294,7 @@ Notice that using \\[next-error] or \\[compile-goto-error] modifies | |||
| 291 | (2 compilation-line-face)) | 294 | (2 compilation-line-face)) |
| 292 | ;; Highlight grep matches and delete markers | 295 | ;; Highlight grep matches and delete markers |
| 293 | ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" | 296 | ("\\(\033\\[01;41m\\)\\(.*?\\)\\(\033\\[00m\\)" |
| 294 | (2 compilation-column-face) | 297 | (2 grep-match-face) |
| 295 | ((lambda (p)) | 298 | ((lambda (p)) |
| 296 | (progn | 299 | (progn |
| 297 | ;; Delete markers with `replace-match' because it updates | 300 | ;; Delete markers with `replace-match' because it updates |
diff --git a/lisp/progmodes/idlw-shell.el b/lisp/progmodes/idlw-shell.el index eaa6f3be4ea..44675470b67 100644 --- a/lisp/progmodes/idlw-shell.el +++ b/lisp/progmodes/idlw-shell.el | |||
| @@ -841,6 +841,8 @@ IDL has currently stepped.") | |||
| 841 | (defvar idlwave-shell-sources-query) | 841 | (defvar idlwave-shell-sources-query) |
| 842 | (defvar idlwave-shell-mode-map) | 842 | (defvar idlwave-shell-mode-map) |
| 843 | (defvar idlwave-shell-calling-stack-index) | 843 | (defvar idlwave-shell-calling-stack-index) |
| 844 | (defvar idlwave-shell-only-prompt-pattern nil) | ||
| 845 | (defvar tool-bar-map) | ||
| 844 | 846 | ||
| 845 | (defun idlwave-shell-mode () | 847 | (defun idlwave-shell-mode () |
| 846 | "Major mode for interacting with an inferior IDL process. | 848 | "Major mode for interacting with an inferior IDL process. |
| @@ -994,7 +996,7 @@ IDL has currently stepped.") | |||
| 994 | (setq idlwave-shell-hide-output nil) | 996 | (setq idlwave-shell-hide-output nil) |
| 995 | 997 | ||
| 996 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 998 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 997 | (make-local-hook 'kill-buffer-hook) | 999 | ;;(make-local-hook 'kill-buffer-hook) |
| 998 | (add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm | 1000 | (add-hook 'kill-buffer-hook 'idlwave-shell-kill-shell-buffer-confirm |
| 999 | nil 'local) | 1001 | nil 'local) |
| 1000 | (add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local) | 1002 | (add-hook 'kill-buffer-hook 'idlwave-shell-delete-temp-files nil 'local) |
| @@ -1038,7 +1040,7 @@ IDL has currently stepped.") | |||
| 1038 | (setq abbrev-mode t) | 1040 | (setq abbrev-mode t) |
| 1039 | 1041 | ||
| 1040 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility | 1042 | ;; NB: `make-local-hook' needed for older/alternative Emacs compatibility |
| 1041 | (make-local-hook 'post-command-hook) | 1043 | ;;(make-local-hook 'post-command-hook) |
| 1042 | (add-hook 'post-command-hook 'idlwave-command-hook nil t) | 1044 | (add-hook 'post-command-hook 'idlwave-command-hook nil t) |
| 1043 | 1045 | ||
| 1044 | ;; Read the command history? | 1046 | ;; Read the command history? |
| @@ -1458,7 +1460,6 @@ Otherwise just move the line. Move down unless UP is non-nil." | |||
| 1458 | "Return t if the shell process is running." | 1460 | "Return t if the shell process is running." |
| 1459 | (eq (process-status idlwave-shell-process-name) 'run)) | 1461 | (eq (process-status idlwave-shell-process-name) 'run)) |
| 1460 | 1462 | ||
| 1461 | (defvar idlwave-shell-only-prompt-pattern nil) | ||
| 1462 | (defun idlwave-shell-filter-hidden-output (output) | 1463 | (defun idlwave-shell-filter-hidden-output (output) |
| 1463 | "Filter hidden output, leaving the good stuff. | 1464 | "Filter hidden output, leaving the good stuff. |
| 1464 | 1465 | ||
| @@ -1475,6 +1476,7 @@ error messages, etc." | |||
| 1475 | 1476 | ||
| 1476 | (defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*" | 1477 | (defvar idlwave-shell-hidden-output-buffer " *idlwave-shell-hidden-output*" |
| 1477 | "Buffer containing hidden output from IDL commands.") | 1478 | "Buffer containing hidden output from IDL commands.") |
| 1479 | (defvar idlwave-shell-current-state nil) | ||
| 1478 | 1480 | ||
| 1479 | (defun idlwave-shell-filter (proc string) | 1481 | (defun idlwave-shell-filter (proc string) |
| 1480 | "Watch for IDL prompt and filter incoming text. | 1482 | "Watch for IDL prompt and filter incoming text. |
| @@ -1627,7 +1629,55 @@ and then calls `idlwave-shell-send-command' for any pending commands." | |||
| 1627 | (run-hooks 'idlwave-shell-sentinel-hook)) | 1629 | (run-hooks 'idlwave-shell-sentinel-hook)) |
| 1628 | (run-hooks 'idlwave-shell-sentinel-hook)))) | 1630 | (run-hooks 'idlwave-shell-sentinel-hook)))) |
| 1629 | 1631 | ||
| 1630 | (defvar idlwave-shell-current-state nil) | 1632 | (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*" |
| 1633 | "Buffer containing syntax errors from IDL compilations.") | ||
| 1634 | |||
| 1635 | ;; FIXME: the following two variables do not currently allow line breaks | ||
| 1636 | ;; in module and file names. I am not sure if it will be necessary to | ||
| 1637 | ;; change this. Currently it seems to work the way it is. | ||
| 1638 | (defvar idlwave-shell-syntax-error | ||
| 1639 | "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1640 | "A regular expression to match an IDL syntax error. | ||
| 1641 | The 1st pair matches the file name, the second pair matches the line | ||
| 1642 | number.") | ||
| 1643 | |||
| 1644 | (defvar idlwave-shell-other-error | ||
| 1645 | "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1646 | "A regular expression to match any IDL error.") | ||
| 1647 | |||
| 1648 | (defvar idlwave-shell-halting-error | ||
| 1649 | "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n" | ||
| 1650 | "A regular expression to match errors which halt execution.") | ||
| 1651 | |||
| 1652 | (defvar idlwave-shell-cant-continue-error | ||
| 1653 | "^% Can't continue from this point.\n" | ||
| 1654 | "A regular expression to match errors stepping errors.") | ||
| 1655 | |||
| 1656 | (defvar idlwave-shell-file-line-message | ||
| 1657 | (concat | ||
| 1658 | "\\(" ; program name group (1) | ||
| 1659 | "\\$MAIN\\$\\|" ; main level routine | ||
| 1660 | "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..] | ||
| 1661 | "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2) | ||
| 1662 | "\\)" ; end program name group (1) | ||
| 1663 | "[ \t\n]+" ; white space | ||
| 1664 | "\\(" ; line number group (3) | ||
| 1665 | "[0-9]+" ; the line number (the fix point) | ||
| 1666 | "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4) | ||
| 1667 | "\\)" ; end line number group (3) | ||
| 1668 | "[ \t\n]+" ; white space | ||
| 1669 | "\\(" ; file name group (5) | ||
| 1670 | "[^ \t\n]+" ; file names can contain any non-white | ||
| 1671 | "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6) | ||
| 1672 | "\\)" ; end line number group (5) | ||
| 1673 | ) | ||
| 1674 | "*A regular expression to parse out the file name and line number. | ||
| 1675 | The 1st group should match the subroutine name. | ||
| 1676 | The 3rd group is the line number. | ||
| 1677 | The 5th group is the file name. | ||
| 1678 | All parts may contain linebreaks surrounded by spaces. This is important | ||
| 1679 | in IDL5 which inserts random linebreaks in long module and file names.") | ||
| 1680 | |||
| 1631 | (defun idlwave-shell-scan-for-state () | 1681 | (defun idlwave-shell-scan-for-state () |
| 1632 | "Scan for state info. Looks for messages in output from last IDL | 1682 | "Scan for state info. Looks for messages in output from last IDL |
| 1633 | command indicating where IDL has stopped. The types of messages we are | 1683 | command indicating where IDL has stopped. The types of messages we are |
| @@ -1721,55 +1771,6 @@ the above." | |||
| 1721 | ;; Otherwise, no particular state | 1771 | ;; Otherwise, no particular state |
| 1722 | (t (setq idlwave-shell-current-state nil))))) | 1772 | (t (setq idlwave-shell-current-state nil))))) |
| 1723 | 1773 | ||
| 1724 | (defvar idlwave-shell-error-buffer " *idlwave-shell-errors*" | ||
| 1725 | "Buffer containing syntax errors from IDL compilations.") | ||
| 1726 | |||
| 1727 | ;; FIXME: the following two variables do not currently allow line breaks | ||
| 1728 | ;; in module and file names. I am not sure if it will be necessary to | ||
| 1729 | ;; change this. Currently it seems to work the way it is. | ||
| 1730 | (defvar idlwave-shell-syntax-error | ||
| 1731 | "^% Syntax error.\\s-*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1732 | "A regular expression to match an IDL syntax error. | ||
| 1733 | The 1st pair matches the file name, the second pair matches the line | ||
| 1734 | number.") | ||
| 1735 | |||
| 1736 | (defvar idlwave-shell-other-error | ||
| 1737 | "^% .*\n\\s-*At:\\s-*\\(.*\\),\\s-*Line\\s-*\\(.*\\)" | ||
| 1738 | "A regular expression to match any IDL error.") | ||
| 1739 | |||
| 1740 | (defvar idlwave-shell-halting-error | ||
| 1741 | "^% .*\n\\([^%].*\n\\)*% Execution halted at:\\(\\s-*\\S-+\\s-*[0-9]+\\s-*.*\\)\n" | ||
| 1742 | "A regular expression to match errors which halt execution.") | ||
| 1743 | |||
| 1744 | (defvar idlwave-shell-cant-continue-error | ||
| 1745 | "^% Can't continue from this point.\n" | ||
| 1746 | "A regular expression to match errors stepping errors.") | ||
| 1747 | |||
| 1748 | (defvar idlwave-shell-file-line-message | ||
| 1749 | (concat | ||
| 1750 | "\\(" ; program name group (1) | ||
| 1751 | "\\$MAIN\\$\\|" ; main level routine | ||
| 1752 | "\\<[a-zA-Z][a-zA-Z0-9_$:]*" ; start with a letter followed by [..] | ||
| 1753 | "\\([ \t]*\n[ \t]*[a-zA-Z0-9_$:]+\\)*"; continuation lines program name (2) | ||
| 1754 | "\\)" ; end program name group (1) | ||
| 1755 | "[ \t\n]+" ; white space | ||
| 1756 | "\\(" ; line number group (3) | ||
| 1757 | "[0-9]+" ; the line number (the fix point) | ||
| 1758 | "\\([ \t]*\n[ \t]*[0-9]+\\)*" ; continuation lines number (4) | ||
| 1759 | "\\)" ; end line number group (3) | ||
| 1760 | "[ \t\n]+" ; white space | ||
| 1761 | "\\(" ; file name group (5) | ||
| 1762 | "[^ \t\n]+" ; file names can contain any non-white | ||
| 1763 | "\\([ \t]*\n[ \t]*[^ \t\n]+\\)*" ; continuation lines file name (6) | ||
| 1764 | "\\)" ; end line number group (5) | ||
| 1765 | ) | ||
| 1766 | "*A regular expression to parse out the file name and line number. | ||
| 1767 | The 1st group should match the subroutine name. | ||
| 1768 | The 3rd group is the line number. | ||
| 1769 | The 5th group is the file name. | ||
| 1770 | All parts may contain linebreaks surrounded by spaces. This is important | ||
| 1771 | in IDL5 which inserts random linebreaks in long module and file names.") | ||
| 1772 | |||
| 1773 | (defun idlwave-shell-parse-line (string &optional skip-main) | 1774 | (defun idlwave-shell-parse-line (string &optional skip-main) |
| 1774 | "Parse IDL message for the subroutine, file name and line number. | 1775 | "Parse IDL message for the subroutine, file name and line number. |
| 1775 | We need to work hard here to remove the stupid line breaks inserted by | 1776 | We need to work hard here to remove the stupid line breaks inserted by |
| @@ -2102,8 +2103,8 @@ Change the default directory for the process buffer to concur." | |||
| 2102 | 'hide 'wait) | 2103 | 'hide 'wait) |
| 2103 | ;; If we don't know anything about the class, update shell routines | 2104 | ;; If we don't know anything about the class, update shell routines |
| 2104 | (if (and idlwave-shell-get-object-class | 2105 | (if (and idlwave-shell-get-object-class |
| 2105 | (not (assoc-ignore-case idlwave-shell-get-object-class | 2106 | (not (assoc-string idlwave-shell-get-object-class |
| 2106 | (idlwave-class-alist)))) | 2107 | (idlwave-class-alist) t))) |
| 2107 | (idlwave-shell-maybe-update-routine-info)) | 2108 | (idlwave-shell-maybe-update-routine-info)) |
| 2108 | idlwave-shell-get-object-class))) | 2109 | idlwave-shell-get-object-class))) |
| 2109 | 2110 | ||
| @@ -2165,9 +2166,10 @@ keywords." | |||
| 2165 | (idlwave-complete arg))))) | 2166 | (idlwave-complete arg))))) |
| 2166 | 2167 | ||
| 2167 | ;; Get rid of opaque dynamic variable passing of link? | 2168 | ;; Get rid of opaque dynamic variable passing of link? |
| 2169 | (defvar link) ;dynamic variable | ||
| 2168 | (defun idlwave-shell-complete-execcomm-help (mode word) | 2170 | (defun idlwave-shell-complete-execcomm-help (mode word) |
| 2169 | (let ((word (or (nth 1 idlwave-completion-help-info) word)) | 2171 | (let ((word (or (nth 1 idlwave-completion-help-info) word)) |
| 2170 | (entry (assoc-ignore-case word idlwave-executive-commands-alist))) | 2172 | (entry (assoc-string word idlwave-executive-commands-alist t))) |
| 2171 | (cond | 2173 | (cond |
| 2172 | ((eq mode 'test) | 2174 | ((eq mode 'test) |
| 2173 | (and (stringp word) entry (cdr entry))) | 2175 | (and (stringp word) entry (cdr entry))) |
| @@ -2217,6 +2219,7 @@ args of an executive .run, .rnew or .compile." | |||
| 2217 | (looking-at "\\$"))) | 2219 | (looking-at "\\$"))) |
| 2218 | 2220 | ||
| 2219 | ;; Debugging Commands ------------------------------------------------------ | 2221 | ;; Debugging Commands ------------------------------------------------------ |
| 2222 | (defvar idlwave-shell-electric-debug-mode) ; defined by easy-mmode | ||
| 2220 | 2223 | ||
| 2221 | (defun idlwave-shell-redisplay (&optional hide) | 2224 | (defun idlwave-shell-redisplay (&optional hide) |
| 2222 | "Tries to resync the display with where execution has stopped. | 2225 | "Tries to resync the display with where execution has stopped. |
| @@ -3517,6 +3520,7 @@ considered the new breakpoint if the file name of frame matches." | |||
| 3517 | 3520 | ||
| 3518 | (defvar idlwave-shell-bp-overlays nil | 3521 | (defvar idlwave-shell-bp-overlays nil |
| 3519 | "Alist of overlays marking breakpoints") | 3522 | "Alist of overlays marking breakpoints") |
| 3523 | (defvar idlwave-shell-bp-glyph) | ||
| 3520 | 3524 | ||
| 3521 | (defun idlwave-shell-update-bp-overlays () | 3525 | (defun idlwave-shell-update-bp-overlays () |
| 3522 | "Update the overlays which mark breakpoints in the source code. | 3526 | "Update the overlays which mark breakpoints in the source code. |
| @@ -3605,7 +3609,6 @@ Existing overlays are recycled, in order to minimize consumption." | |||
| 3605 | (set-window-buffer win buf)))))))) | 3609 | (set-window-buffer win buf)))))))) |
| 3606 | 3610 | ||
| 3607 | 3611 | ||
| 3608 | (defvar idlwave-shell-bp-glyph) | ||
| 3609 | (defun idlwave-shell-make-new-bp-overlay (&optional type disabled help) | 3612 | (defun idlwave-shell-make-new-bp-overlay (&optional type disabled help) |
| 3610 | "Make a new overlay for highlighting breakpoints. | 3613 | "Make a new overlay for highlighting breakpoints. |
| 3611 | 3614 | ||
| @@ -4026,7 +4029,7 @@ Otherwise, just expand the file name." | |||
| 4026 | '(alt)))) | 4029 | '(alt)))) |
| 4027 | (shift (memq 'shift mod)) | 4030 | (shift (memq 'shift mod)) |
| 4028 | (mod-noshift (delete 'shift (copy-sequence mod))) | 4031 | (mod-noshift (delete 'shift (copy-sequence mod))) |
| 4029 | s k1 c2 k2 cmd cannotshift) | 4032 | s k1 c2 k2 cmd electric only-buffer cannotshift) |
| 4030 | (while (setq s (pop specs)) | 4033 | (while (setq s (pop specs)) |
| 4031 | (setq k1 (nth 0 s) | 4034 | (setq k1 (nth 0 s) |
| 4032 | c2 (nth 1 s) | 4035 | c2 (nth 1 s) |
| @@ -4089,6 +4092,9 @@ Otherwise, just expand the file name." | |||
| 4089 | (setq idlwave-shell-suppress-electric-debug nil)) | 4092 | (setq idlwave-shell-suppress-electric-debug nil)) |
| 4090 | (idlwave-shell-electric-debug-mode)) | 4093 | (idlwave-shell-electric-debug-mode)) |
| 4091 | 4094 | ||
| 4095 | (defvar idlwave-shell-electric-debug-read-only) | ||
| 4096 | (defvar idlwave-shell-electric-debug-buffers nil) | ||
| 4097 | |||
| 4092 | (easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode | 4098 | (easy-mmode-define-minor-mode idlwave-shell-electric-debug-mode |
| 4093 | "Toggle Electric Debug mode. | 4099 | "Toggle Electric Debug mode. |
| 4094 | With no argument, this command toggles the mode. | 4100 | With no argument, this command toggles the mode. |
| @@ -4138,7 +4144,6 @@ idlwave-shell-electric-debug-mode-map) | |||
| 4138 | (force-mode-line-update)) | 4144 | (force-mode-line-update)) |
| 4139 | 4145 | ||
| 4140 | ;; Turn it off in all relevant buffers | 4146 | ;; Turn it off in all relevant buffers |
| 4141 | (defvar idlwave-shell-electric-debug-buffers nil) | ||
| 4142 | (defun idlwave-shell-electric-debug-all-off () | 4147 | (defun idlwave-shell-electric-debug-all-off () |
| 4143 | (setq idlwave-shell-suppress-electric-debug nil) | 4148 | (setq idlwave-shell-suppress-electric-debug nil) |
| 4144 | (let ((buffers idlwave-shell-electric-debug-buffers) | 4149 | (let ((buffers idlwave-shell-electric-debug-buffers) |
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el index 45694b57b99..a17ba3e844f 100644 --- a/lisp/progmodes/idlwave.el +++ b/lisp/progmodes/idlwave.el | |||
| @@ -2571,7 +2571,9 @@ If not in a statement just moves to end of line. Returns position." | |||
| 2571 | (let ((save-point (point))) | 2571 | (let ((save-point (point))) |
| 2572 | (when (re-search-forward ".*&" lim t) | 2572 | (when (re-search-forward ".*&" lim t) |
| 2573 | (goto-char (match-end 0)) | 2573 | (goto-char (match-end 0)) |
| 2574 | (if (idlwave-quoted) (goto-char save-point))) | 2574 | (if (idlwave-quoted) |
| 2575 | (goto-char save-point) | ||
| 2576 | (if (eq (char-after (- (point) 2)) ?&) (goto-char save-point)))) | ||
| 2575 | (point))) | 2577 | (point))) |
| 2576 | 2578 | ||
| 2577 | (defun idlwave-skip-label-or-case () | 2579 | (defun idlwave-skip-label-or-case () |
diff --git a/lisp/replace.el b/lisp/replace.el index 8a5c0a9680c..775ad0ffb05 100644 --- a/lisp/replace.el +++ b/lisp/replace.el | |||
| @@ -735,16 +735,17 @@ Alternatively, click \\[occur-mode-mouse-goto] on an item to go to it. | |||
| 735 | Compatibility function for \\[next-error] invocations." | 735 | Compatibility function for \\[next-error] invocations." |
| 736 | (interactive "p") | 736 | (interactive "p") |
| 737 | ;; we need to run occur-find-match from within the Occur buffer | 737 | ;; we need to run occur-find-match from within the Occur buffer |
| 738 | (with-current-buffer | 738 | (with-current-buffer |
| 739 | (if (next-error-buffer-p (current-buffer)) | 739 | (if (next-error-buffer-p (current-buffer)) |
| 740 | (current-buffer) | 740 | (current-buffer) |
| 741 | (next-error-find-buffer nil nil (lambda() (eq major-mode 'occur-mode)))) | 741 | (next-error-find-buffer nil nil (lambda() (eq major-mode 'occur-mode)))) |
| 742 | 742 | ||
| 743 | (when reset | 743 | (goto-char (cond (reset (point-min)) |
| 744 | (goto-char (point-min))) | 744 | ((< argp 0) (line-beginning-position)) |
| 745 | ((line-end-position)))) | ||
| 745 | (occur-find-match | 746 | (occur-find-match |
| 746 | (abs (prefix-numeric-value argp)) | 747 | (abs argp) |
| 747 | (if (> 0 (prefix-numeric-value argp)) | 748 | (if (> 0 argp) |
| 748 | #'previous-single-property-change | 749 | #'previous-single-property-change |
| 749 | #'next-single-property-change) | 750 | #'next-single-property-change) |
| 750 | "No more matches") | 751 | "No more matches") |
| @@ -752,6 +753,20 @@ Compatibility function for \\[next-error] invocations." | |||
| 752 | (set-window-point (get-buffer-window (current-buffer)) (point)) | 753 | (set-window-point (get-buffer-window (current-buffer)) (point)) |
| 753 | (occur-mode-goto-occurrence))) | 754 | (occur-mode-goto-occurrence))) |
| 754 | 755 | ||
| 756 | (defface match | ||
| 757 | '((((class color) (min-colors 88) (background light)) | ||
| 758 | :background "Tan") | ||
| 759 | (((class color) (min-colors 88) (background dark)) | ||
| 760 | :background "RoyalBlue4") | ||
| 761 | (((class color) (min-colors 8)) | ||
| 762 | :background "blue" :foreground "white") | ||
| 763 | (((type tty) (class mono)) | ||
| 764 | :inverse-video t) | ||
| 765 | (t :background "gray")) | ||
| 766 | "Face used to highlight matches permanently." | ||
| 767 | :group 'matching | ||
| 768 | :version "21.4") | ||
| 769 | |||
| 755 | (defcustom list-matching-lines-default-context-lines 0 | 770 | (defcustom list-matching-lines-default-context-lines 0 |
| 756 | "*Default number of context lines included around `list-matching-lines' matches. | 771 | "*Default number of context lines included around `list-matching-lines' matches. |
| 757 | A negative number means to include that many lines before the match. | 772 | A negative number means to include that many lines before the match. |
| @@ -761,7 +776,7 @@ A positive number means to include that many lines both before and after." | |||
| 761 | 776 | ||
| 762 | (defalias 'list-matching-lines 'occur) | 777 | (defalias 'list-matching-lines 'occur) |
| 763 | 778 | ||
| 764 | (defcustom list-matching-lines-face 'bold | 779 | (defcustom list-matching-lines-face 'match |
| 765 | "*Face used by \\[list-matching-lines] to show the text that matches. | 780 | "*Face used by \\[list-matching-lines] to show the text that matches. |
| 766 | If the value is nil, don't highlight the matching portions specially." | 781 | If the value is nil, don't highlight the matching portions specially." |
| 767 | :type 'face | 782 | :type 'face |
| @@ -776,18 +791,22 @@ If the value is nil, don't highlight the buffer names specially." | |||
| 776 | (defun occur-accumulate-lines (count &optional keep-props) | 791 | (defun occur-accumulate-lines (count &optional keep-props) |
| 777 | (save-excursion | 792 | (save-excursion |
| 778 | (let ((forwardp (> count 0)) | 793 | (let ((forwardp (> count 0)) |
| 779 | (result nil)) | 794 | result beg end) |
| 780 | (while (not (or (zerop count) | 795 | (while (not (or (zerop count) |
| 781 | (if forwardp | 796 | (if forwardp |
| 782 | (eobp) | 797 | (eobp) |
| 783 | (bobp)))) | 798 | (bobp)))) |
| 784 | (setq count (+ count (if forwardp -1 1))) | 799 | (setq count (+ count (if forwardp -1 1))) |
| 800 | (setq beg (line-beginning-position) | ||
| 801 | end (line-end-position)) | ||
| 802 | (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode | ||
| 803 | (text-property-not-all beg end 'fontified t)) | ||
| 804 | (jit-lock-fontify-now beg end)) | ||
| 785 | (push | 805 | (push |
| 786 | (funcall (if keep-props | 806 | (funcall (if keep-props |
| 787 | #'buffer-substring | 807 | #'buffer-substring |
| 788 | #'buffer-substring-no-properties) | 808 | #'buffer-substring-no-properties) |
| 789 | (line-beginning-position) | 809 | beg end) |
| 790 | (line-end-position)) | ||
| 791 | result) | 810 | result) |
| 792 | (forward-line (if forwardp 1 -1))) | 811 | (forward-line (if forwardp 1 -1))) |
| 793 | (nreverse result)))) | 812 | (nreverse result)))) |
| @@ -982,14 +1001,17 @@ See also `multi-occur'." | |||
| 982 | (when (setq endpt (re-search-forward regexp nil t)) | 1001 | (when (setq endpt (re-search-forward regexp nil t)) |
| 983 | (setq matches (1+ matches)) ;; increment match count | 1002 | (setq matches (1+ matches)) ;; increment match count |
| 984 | (setq matchbeg (match-beginning 0)) | 1003 | (setq matchbeg (match-beginning 0)) |
| 985 | (setq begpt (save-excursion | ||
| 986 | (goto-char matchbeg) | ||
| 987 | (line-beginning-position))) | ||
| 988 | (setq lines (+ lines (1- (count-lines origpt endpt)))) | 1004 | (setq lines (+ lines (1- (count-lines origpt endpt)))) |
| 1005 | (save-excursion | ||
| 1006 | (goto-char matchbeg) | ||
| 1007 | (setq begpt (line-beginning-position) | ||
| 1008 | endpt (line-end-position))) | ||
| 989 | (setq marker (make-marker)) | 1009 | (setq marker (make-marker)) |
| 990 | (set-marker marker matchbeg) | 1010 | (set-marker marker matchbeg) |
| 991 | (setq curstring (buffer-substring begpt | 1011 | (if (and keep-props (boundp 'jit-lock-mode) jit-lock-mode |
| 992 | (line-end-position))) | 1012 | (text-property-not-all begpt endpt 'fontified t)) |
| 1013 | (jit-lock-fontify-now begpt endpt)) | ||
| 1014 | (setq curstring (buffer-substring begpt endpt)) | ||
| 993 | ;; Depropertize the string, and maybe | 1015 | ;; Depropertize the string, and maybe |
| 994 | ;; highlight the matches | 1016 | ;; highlight the matches |
| 995 | (let ((len (length curstring)) | 1017 | (let ((len (length curstring)) |
| @@ -998,17 +1020,15 @@ See also `multi-occur'." | |||
| 998 | (set-text-properties 0 len nil curstring)) | 1020 | (set-text-properties 0 len nil curstring)) |
| 999 | (while (and (< start len) | 1021 | (while (and (< start len) |
| 1000 | (string-match regexp curstring start)) | 1022 | (string-match regexp curstring start)) |
| 1001 | (add-text-properties (match-beginning 0) | 1023 | (add-text-properties |
| 1002 | (match-end 0) | 1024 | (match-beginning 0) (match-end 0) |
| 1003 | (append | 1025 | (append |
| 1004 | `(occur-match t) | 1026 | `(occur-match t) |
| 1005 | (when match-face | 1027 | (when match-face |
| 1006 | ;; Use `face' rather than | 1028 | ;; Use `face' rather than `font-lock-face' here |
| 1007 | ;; `font-lock-face' here | 1029 | ;; so as to override faces copied from the buffer. |
| 1008 | ;; so as to override faces | 1030 | `(face ,match-face))) |
| 1009 | ;; copied from the buffer. | 1031 | curstring) |
| 1010 | `(face ,match-face))) | ||
| 1011 | curstring) | ||
| 1012 | (setq start (match-end 0)))) | 1032 | (setq start (match-end 0)))) |
| 1013 | ;; Generate the string to insert for this match | 1033 | ;; Generate the string to insert for this match |
| 1014 | (let* ((out-line | 1034 | (let* ((out-line |
| @@ -1019,7 +1039,10 @@ See also `multi-occur'." | |||
| 1019 | (when prefix-face | 1039 | (when prefix-face |
| 1020 | `(font-lock-face prefix-face)) | 1040 | `(font-lock-face prefix-face)) |
| 1021 | '(occur-prefix t))) | 1041 | '(occur-prefix t))) |
| 1022 | curstring | 1042 | ;; We don't put `mouse-face' on the newline, |
| 1043 | ;; because that loses. And don't put it | ||
| 1044 | ;; on context lines to reduce flicker. | ||
| 1045 | (propertize curstring 'mouse-face 'highlight) | ||
| 1023 | "\n")) | 1046 | "\n")) |
| 1024 | (data | 1047 | (data |
| 1025 | (if (= nlines 0) | 1048 | (if (= nlines 0) |
| @@ -1043,10 +1066,7 @@ See also `multi-occur'." | |||
| 1043 | (insert "-------\n")) | 1066 | (insert "-------\n")) |
| 1044 | (add-text-properties | 1067 | (add-text-properties |
| 1045 | beg end | 1068 | beg end |
| 1046 | `(occur-target ,marker help-echo "mouse-2: go to this occurrence")) | 1069 | `(occur-target ,marker help-echo "mouse-2: go to this occurrence"))))) |
| 1047 | ;; We don't put `mouse-face' on the newline, | ||
| 1048 | ;; because that loses. | ||
| 1049 | (add-text-properties beg (1- end) '(mouse-face highlight))))) | ||
| 1050 | (goto-char endpt)) | 1070 | (goto-char endpt)) |
| 1051 | (if endpt | 1071 | (if endpt |
| 1052 | (progn | 1072 | (progn |
| @@ -1214,7 +1234,7 @@ but coerced to the correct value of INTEGERS." | |||
| 1214 | 1234 | ||
| 1215 | (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) | 1235 | (defun replace-match-maybe-edit (newtext fixedcase literal noedit match-data) |
| 1216 | "Make a replacement with `replace-match', editing `\\?'. | 1236 | "Make a replacement with `replace-match', editing `\\?'. |
| 1217 | NEXTEXT, FIXEDCASE, LITERAL are just passed on. If NOEDIT is true, no | 1237 | NEWTEXT, FIXEDCASE, LITERAL are just passed on. If NOEDIT is true, no |
| 1218 | check for `\\?' is made to save time. MATCH-DATA is used for the | 1238 | check for `\\?' is made to save time. MATCH-DATA is used for the |
| 1219 | replacement. In case editing is done, it is changed to use markers. | 1239 | replacement. In case editing is done, it is changed to use markers. |
| 1220 | 1240 | ||
| @@ -1281,6 +1301,9 @@ make, or the user didn't cancel the call." | |||
| 1281 | ;; (match-data); otherwise it is t if a match is possible at point. | 1301 | ;; (match-data); otherwise it is t if a match is possible at point. |
| 1282 | (match-again t) | 1302 | (match-again t) |
| 1283 | 1303 | ||
| 1304 | (isearch-string isearch-string) | ||
| 1305 | (isearch-regexp isearch-regexp) | ||
| 1306 | (isearch-case-fold-search isearch-case-fold-search) | ||
| 1284 | (message | 1307 | (message |
| 1285 | (if query-flag | 1308 | (if query-flag |
| 1286 | (substitute-command-keys | 1309 | (substitute-command-keys |
| @@ -1313,6 +1336,12 @@ make, or the user didn't cancel the call." | |||
| 1313 | (if regexp-flag from-string | 1336 | (if regexp-flag from-string |
| 1314 | (regexp-quote from-string)) | 1337 | (regexp-quote from-string)) |
| 1315 | "\\b"))) | 1338 | "\\b"))) |
| 1339 | (when query-replace-lazy-highlight | ||
| 1340 | (setq isearch-string search-string | ||
| 1341 | isearch-regexp (or delimited-flag regexp-flag) | ||
| 1342 | isearch-case-fold-search case-fold-search | ||
| 1343 | isearch-lazy-highlight-last-string nil)) | ||
| 1344 | |||
| 1316 | (push-mark) | 1345 | (push-mark) |
| 1317 | (undo-boundary) | 1346 | (undo-boundary) |
| 1318 | (unwind-protect | 1347 | (unwind-protect |
| @@ -1380,7 +1409,7 @@ make, or the user didn't cancel the call." | |||
| 1380 | (if (not query-flag) | 1409 | (if (not query-flag) |
| 1381 | (let ((inhibit-read-only | 1410 | (let ((inhibit-read-only |
| 1382 | query-replace-skip-read-only)) | 1411 | query-replace-skip-read-only)) |
| 1383 | (unless noedit | 1412 | (unless (or literal noedit) |
| 1384 | (replace-highlight (nth 0 real-match-data) | 1413 | (replace-highlight (nth 0 real-match-data) |
| 1385 | (nth 1 real-match-data))) | 1414 | (nth 1 real-match-data))) |
| 1386 | (setq noedit | 1415 | (setq noedit |
| @@ -1528,7 +1557,16 @@ make, or the user didn't cancel the call." | |||
| 1528 | (setq unread-command-events | 1557 | (setq unread-command-events |
| 1529 | (append (listify-key-sequence key) | 1558 | (append (listify-key-sequence key) |
| 1530 | unread-command-events)) | 1559 | unread-command-events)) |
| 1531 | (setq done t)))) | 1560 | (setq done t))) |
| 1561 | (when query-replace-lazy-highlight | ||
| 1562 | ;; Restore isearch data for lazy highlighting | ||
| 1563 | ;; in case of isearching during recursive edit | ||
| 1564 | (setq isearch-string search-string | ||
| 1565 | isearch-regexp (or delimited-flag regexp-flag) | ||
| 1566 | isearch-case-fold-search case-fold-search) | ||
| 1567 | ;; Force lazy rehighlighting only after replacements | ||
| 1568 | (if (not (memq def '(skip backup))) | ||
| 1569 | (setq isearch-lazy-highlight-last-string nil)))) | ||
| 1532 | ;; Record previous position for ^ when we move on. | 1570 | ;; Record previous position for ^ when we move on. |
| 1533 | ;; Change markers to numbers in the match data | 1571 | ;; Change markers to numbers in the match data |
| 1534 | ;; since lots of markers slow down editing. | 1572 | ;; since lots of markers slow down editing. |
| @@ -1564,26 +1602,44 @@ make, or the user didn't cancel the call." | |||
| 1564 | (and keep-going stack))) | 1602 | (and keep-going stack))) |
| 1565 | 1603 | ||
| 1566 | (defcustom query-replace-highlight t | 1604 | (defcustom query-replace-highlight t |
| 1567 | "*Non-nil means to highlight words during query replacement." | 1605 | "*Non-nil means to highlight matches during query replacement." |
| 1568 | :type 'boolean | 1606 | :type 'boolean |
| 1569 | :group 'matching) | 1607 | :group 'matching) |
| 1570 | 1608 | ||
| 1609 | (defcustom query-replace-lazy-highlight t | ||
| 1610 | "*Controls the lazy-highlighting during query replacements. | ||
| 1611 | When non-nil, all text in the buffer matching the current match | ||
| 1612 | is highlighted lazily using isearch lazy highlighting (see | ||
| 1613 | `isearch-lazy-highlight-initial-delay' and | ||
| 1614 | `isearch-lazy-highlight-interval')." | ||
| 1615 | :type 'boolean | ||
| 1616 | :group 'matching | ||
| 1617 | :version "21.4") | ||
| 1618 | |||
| 1619 | (defface query-replace | ||
| 1620 | '((t (:inherit isearch))) | ||
| 1621 | "Face for highlighting query replacement matches." | ||
| 1622 | :group 'matching | ||
| 1623 | :version "21.4") | ||
| 1624 | |||
| 1571 | (defvar replace-overlay nil) | 1625 | (defvar replace-overlay nil) |
| 1572 | 1626 | ||
| 1627 | (defun replace-highlight (beg end) | ||
| 1628 | (if query-replace-highlight | ||
| 1629 | (if replace-overlay | ||
| 1630 | (move-overlay replace-overlay beg end (current-buffer)) | ||
| 1631 | (setq replace-overlay (make-overlay beg end)) | ||
| 1632 | (overlay-put replace-overlay 'priority 1) ;higher than lazy overlays | ||
| 1633 | (overlay-put replace-overlay 'face 'query-replace))) | ||
| 1634 | (if query-replace-lazy-highlight | ||
| 1635 | (isearch-lazy-highlight-new-loop))) | ||
| 1636 | |||
| 1573 | (defun replace-dehighlight () | 1637 | (defun replace-dehighlight () |
| 1574 | (and replace-overlay | 1638 | (when replace-overlay |
| 1575 | (progn | 1639 | (delete-overlay replace-overlay)) |
| 1576 | (delete-overlay replace-overlay) | 1640 | (when query-replace-lazy-highlight |
| 1577 | (setq replace-overlay nil)))) | 1641 | (isearch-lazy-highlight-cleanup isearch-lazy-highlight-cleanup) |
| 1578 | 1642 | (setq isearch-lazy-highlight-last-string nil))) | |
| 1579 | (defun replace-highlight (start end) | ||
| 1580 | (and query-replace-highlight | ||
| 1581 | (if replace-overlay | ||
| 1582 | (move-overlay replace-overlay start end (current-buffer)) | ||
| 1583 | (setq replace-overlay (make-overlay start end)) | ||
| 1584 | (overlay-put replace-overlay 'face | ||
| 1585 | (if (facep 'query-replace) | ||
| 1586 | 'query-replace 'region))))) | ||
| 1587 | 1643 | ||
| 1588 | ;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 | 1644 | ;; arch-tag: 16b4cd61-fd40-497b-b86f-b667c4cf88e4 |
| 1589 | ;;; replace.el ends here | 1645 | ;;; replace.el ends here |
diff --git a/lisp/simple.el b/lisp/simple.el index a0d2306634c..7465e33c8e9 100644 --- a/lisp/simple.el +++ b/lisp/simple.el | |||
| @@ -123,33 +123,33 @@ to navigate in it.") | |||
| 123 | 123 | ||
| 124 | (make-variable-buffer-local 'next-error-function) | 124 | (make-variable-buffer-local 'next-error-function) |
| 125 | 125 | ||
| 126 | (defsubst next-error-buffer-p (buffer | 126 | (defsubst next-error-buffer-p (buffer |
| 127 | &optional | 127 | &optional |
| 128 | extra-test-inclusive | 128 | extra-test-inclusive |
| 129 | extra-test-exclusive) | 129 | extra-test-exclusive) |
| 130 | "Test if BUFFER is a next-error capable buffer. | 130 | "Test if BUFFER is a next-error capable buffer. |
| 131 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. | 131 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. |
| 132 | EXTRA-TEST-INCLUSIVE is called to disallow buffers." | 132 | EXTRA-TEST-EXCLUSIVE is called to disallow buffers." |
| 133 | (with-current-buffer buffer | 133 | (with-current-buffer buffer |
| 134 | (or (and extra-test-inclusive (funcall extra-test-inclusive)) | 134 | (or (and extra-test-inclusive (funcall extra-test-inclusive)) |
| 135 | (and (if extra-test-exclusive (funcall extra-test-exclusive) t) | 135 | (and (if extra-test-exclusive (funcall extra-test-exclusive) t) |
| 136 | next-error-function)))) | 136 | next-error-function)))) |
| 137 | 137 | ||
| 138 | (defun next-error-find-buffer (&optional other-buffer | 138 | (defun next-error-find-buffer (&optional other-buffer |
| 139 | extra-test-inclusive | 139 | extra-test-inclusive |
| 140 | extra-test-exclusive) | 140 | extra-test-exclusive) |
| 141 | "Return a next-error capable buffer. | 141 | "Return a next-error capable buffer. |
| 142 | OTHER-BUFFER will disallow the current buffer. | 142 | OTHER-BUFFER will disallow the current buffer. |
| 143 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. | 143 | EXTRA-TEST-INCLUSIVE is called to allow extra buffers. |
| 144 | EXTRA-TEST-INCLUSIVE is called to disallow buffers." | 144 | EXTRA-TEST-EXCLUSIVE is called to disallow buffers." |
| 145 | (or | 145 | (or |
| 146 | ;; 1. If one window on the selected frame displays such buffer, return it. | 146 | ;; 1. If one window on the selected frame displays such buffer, return it. |
| 147 | (let ((window-buffers | 147 | (let ((window-buffers |
| 148 | (delete-dups | 148 | (delete-dups |
| 149 | (delq nil (mapcar (lambda (w) | 149 | (delq nil (mapcar (lambda (w) |
| 150 | (if (next-error-buffer-p | 150 | (if (next-error-buffer-p |
| 151 | (window-buffer w) | 151 | (window-buffer w) |
| 152 | extra-test-inclusive extra-test-exclusive) | 152 | extra-test-inclusive extra-test-exclusive) |
| 153 | (window-buffer w))) | 153 | (window-buffer w))) |
| 154 | (window-list)))))) | 154 | (window-list)))))) |
| 155 | (if other-buffer | 155 | (if other-buffer |
| @@ -159,29 +159,29 @@ EXTRA-TEST-INCLUSIVE is called to disallow buffers." | |||
| 159 | ;; 2. If next-error-last-buffer is set to a live buffer, use that. | 159 | ;; 2. If next-error-last-buffer is set to a live buffer, use that. |
| 160 | (if (and next-error-last-buffer | 160 | (if (and next-error-last-buffer |
| 161 | (buffer-name next-error-last-buffer) | 161 | (buffer-name next-error-last-buffer) |
| 162 | (next-error-buffer-p next-error-last-buffer | 162 | (next-error-buffer-p next-error-last-buffer |
| 163 | extra-test-inclusive extra-test-exclusive) | 163 | extra-test-inclusive extra-test-exclusive) |
| 164 | (or (not other-buffer) | 164 | (or (not other-buffer) |
| 165 | (not (eq next-error-last-buffer (current-buffer))))) | 165 | (not (eq next-error-last-buffer (current-buffer))))) |
| 166 | next-error-last-buffer) | 166 | next-error-last-buffer) |
| 167 | ;; 3. If the current buffer is a next-error capable buffer, return it. | 167 | ;; 3. If the current buffer is a next-error capable buffer, return it. |
| 168 | (if (and (not other-buffer) | 168 | (if (and (not other-buffer) |
| 169 | (next-error-buffer-p (current-buffer) | 169 | (next-error-buffer-p (current-buffer) |
| 170 | extra-test-inclusive extra-test-exclusive)) | 170 | extra-test-inclusive extra-test-exclusive)) |
| 171 | (current-buffer)) | 171 | (current-buffer)) |
| 172 | ;; 4. Look for a next-error capable buffer in a buffer list. | 172 | ;; 4. Look for a next-error capable buffer in a buffer list. |
| 173 | (let ((buffers (buffer-list))) | 173 | (let ((buffers (buffer-list))) |
| 174 | (while (and buffers | 174 | (while (and buffers |
| 175 | (or (not (next-error-buffer-p | 175 | (or (not (next-error-buffer-p |
| 176 | (car buffers) | 176 | (car buffers) |
| 177 | extra-test-inclusive extra-test-exclusive)) | 177 | extra-test-inclusive extra-test-exclusive)) |
| 178 | (and other-buffer (eq (car buffers) (current-buffer))))) | 178 | (and other-buffer (eq (car buffers) (current-buffer))))) |
| 179 | (setq buffers (cdr buffers))) | 179 | (setq buffers (cdr buffers))) |
| 180 | (if buffers | 180 | (if buffers |
| 181 | (car buffers) | 181 | (car buffers) |
| 182 | (or (and other-buffer | 182 | (or (and other-buffer |
| 183 | (next-error-buffer-p (current-buffer) | 183 | (next-error-buffer-p (current-buffer) |
| 184 | extra-test-inclusive extra-test-exclusive) | 184 | extra-test-inclusive extra-test-exclusive) |
| 185 | ;; The current buffer is a next-error capable buffer. | 185 | ;; The current buffer is a next-error capable buffer. |
| 186 | (progn | 186 | (progn |
| 187 | (if other-buffer | 187 | (if other-buffer |
| @@ -645,9 +645,6 @@ If BACKWARD-ONLY is non-nil, only delete spaces before point." | |||
| 645 | (skip-chars-forward " \t") | 645 | (skip-chars-forward " \t") |
| 646 | (constrain-to-field nil orig-pos t))))) | 646 | (constrain-to-field nil orig-pos t))))) |
| 647 | 647 | ||
| 648 | (defvar inhibit-mark-movement nil | ||
| 649 | "If non-nil, \\[beginning-of-buffer] and \\[end-of-buffer] does not set the mark.") | ||
| 650 | |||
| 651 | (defun beginning-of-buffer (&optional arg) | 648 | (defun beginning-of-buffer (&optional arg) |
| 652 | "Move point to the beginning of the buffer; leave mark at previous position. | 649 | "Move point to the beginning of the buffer; leave mark at previous position. |
| 653 | With \\[universal-argument] prefix, do not set mark at previous position. | 650 | With \\[universal-argument] prefix, do not set mark at previous position. |
| @@ -659,8 +656,9 @@ of the accessible part of the buffer. | |||
| 659 | Don't use this command in Lisp programs! | 656 | Don't use this command in Lisp programs! |
| 660 | \(goto-char (point-min)) is faster and avoids clobbering the mark." | 657 | \(goto-char (point-min)) is faster and avoids clobbering the mark." |
| 661 | (interactive "P") | 658 | (interactive "P") |
| 662 | (unless (or inhibit-mark-movement (consp arg)) | 659 | (or (consp arg) |
| 663 | (push-mark)) | 660 | (and transient-mark-mode mark-active) |
| 661 | (push-mark)) | ||
| 664 | (let ((size (- (point-max) (point-min)))) | 662 | (let ((size (- (point-max) (point-min)))) |
| 665 | (goto-char (if (and arg (not (consp arg))) | 663 | (goto-char (if (and arg (not (consp arg))) |
| 666 | (+ (point-min) | 664 | (+ (point-min) |
| @@ -683,8 +681,9 @@ of the accessible part of the buffer. | |||
| 683 | Don't use this command in Lisp programs! | 681 | Don't use this command in Lisp programs! |
| 684 | \(goto-char (point-max)) is faster and avoids clobbering the mark." | 682 | \(goto-char (point-max)) is faster and avoids clobbering the mark." |
| 685 | (interactive "P") | 683 | (interactive "P") |
| 686 | (unless (or inhibit-mark-movement (consp arg)) | 684 | (or (consp arg) |
| 687 | (push-mark)) | 685 | (and transient-mark-mode mark-active) |
| 686 | (push-mark)) | ||
| 688 | (let ((size (- (point-max) (point-min)))) | 687 | (let ((size (- (point-max) (point-min)))) |
| 689 | (goto-char (if (and arg (not (consp arg))) | 688 | (goto-char (if (and arg (not (consp arg))) |
| 690 | (- (point-max) | 689 | (- (point-max) |
| @@ -1485,6 +1484,17 @@ is not *inside* the region START...END." | |||
| 1485 | (t | 1484 | (t |
| 1486 | '(0 . 0))) | 1485 | '(0 . 0))) |
| 1487 | '(0 . 0))) | 1486 | '(0 . 0))) |
| 1487 | |||
| 1488 | ;; When the first undo batch in an undo list is longer than undo-outer-limit, | ||
| 1489 | ;; this function gets called to ask the user what to do. | ||
| 1490 | ;; Garbage collection is inhibited around the call, | ||
| 1491 | ;; so it had better not do a lot of consing. | ||
| 1492 | (setq undo-outer-limit-function 'undo-outer-limit-truncate) | ||
| 1493 | (defun undo-outer-limit-truncate (size) | ||
| 1494 | (if (yes-or-no-p (format "Buffer %s undo info is %d bytes long; discard it? " | ||
| 1495 | (buffer-name) size)) | ||
| 1496 | (progn (setq buffer-undo-list nil) t) | ||
| 1497 | nil)) | ||
| 1488 | 1498 | ||
| 1489 | (defvar shell-command-history nil | 1499 | (defvar shell-command-history nil |
| 1490 | "History list for some commands that read shell commands.") | 1500 | "History list for some commands that read shell commands.") |
| @@ -2991,11 +3001,11 @@ You can also deactivate the mark by typing \\[keyboard-quit] or | |||
| 2991 | Many commands change their behavior when Transient Mark mode is in effect | 3001 | Many commands change their behavior when Transient Mark mode is in effect |
| 2992 | and the mark is active, by acting on the region instead of their usual | 3002 | and the mark is active, by acting on the region instead of their usual |
| 2993 | default part of the buffer's text. Examples of such commands include | 3003 | default part of the buffer's text. Examples of such commands include |
| 2994 | \\[comment-dwim], \\[flush-lines], \\[ispell], \\[keep-lines], | 3004 | \\[comment-dwim], \\[flush-lines], \\[keep-lines], \ |
| 2995 | \\[query-replace], \\[query-replace-regexp], and \\[undo]. Invoke | 3005 | \\[query-replace], \\[query-replace-regexp], \\[ispell], and \\[undo]. |
| 2996 | \\[apropos-documentation] and type \"transient\" or \"mark.*active\" at | 3006 | Invoke \\[apropos-documentation] and type \"transient\" or |
| 2997 | the prompt, to see the documentation of commands which are sensitive to | 3007 | \"mark.*active\" at the prompt, to see the documentation of |
| 2998 | the Transient Mark mode." | 3008 | commands which are sensitive to the Transient Mark mode." |
| 2999 | :global t :group 'editing-basics :require nil) | 3009 | :global t :group 'editing-basics :require nil) |
| 3000 | 3010 | ||
| 3001 | (defun pop-global-mark () | 3011 | (defun pop-global-mark () |
| @@ -3246,7 +3256,7 @@ Outline mode sets this." | |||
| 3246 | (if (if forward | 3256 | (if (if forward |
| 3247 | ;; If going forward, don't accept the previous | 3257 | ;; If going forward, don't accept the previous |
| 3248 | ;; allowable position if it is before the target line. | 3258 | ;; allowable position if it is before the target line. |
| 3249 | (< line-beg (point)) | 3259 | (< line-beg (point)) |
| 3250 | ;; If going backward, don't accept the previous | 3260 | ;; If going backward, don't accept the previous |
| 3251 | ;; allowable position if it is still after the target line. | 3261 | ;; allowable position if it is still after the target line. |
| 3252 | (<= (point) line-end)) | 3262 | (<= (point) line-end)) |
| @@ -3527,12 +3537,17 @@ With argument, do this that many times." | |||
| 3527 | (interactive "p") | 3537 | (interactive "p") |
| 3528 | (forward-word (- (or arg 1)))) | 3538 | (forward-word (- (or arg 1)))) |
| 3529 | 3539 | ||
| 3530 | (defun mark-word (arg) | 3540 | (defun mark-word (&optional arg) |
| 3531 | "Set mark arg words away from point. | 3541 | "Set mark ARG words away from point. |
| 3532 | If this command is repeated, it marks the next ARG words after the ones | 3542 | The place mark goes is the same place \\[forward-word] would |
| 3533 | already marked." | 3543 | move to with the same argument. |
| 3534 | (interactive "p") | 3544 | If this command is repeated or mark is active in Transient Mark mode, |
| 3535 | (cond ((and (eq last-command this-command) (mark t)) | 3545 | it marks the next ARG words after the ones already marked." |
| 3546 | (interactive "P") | ||
| 3547 | (cond ((or (and (eq last-command this-command) (mark t)) | ||
| 3548 | (and transient-mark-mode mark-active)) | ||
| 3549 | (setq arg (if arg (prefix-numeric-value arg) | ||
| 3550 | (if (< (mark) (point)) -1 1))) | ||
| 3536 | (set-mark | 3551 | (set-mark |
| 3537 | (save-excursion | 3552 | (save-excursion |
| 3538 | (goto-char (mark)) | 3553 | (goto-char (mark)) |
| @@ -3541,7 +3556,7 @@ already marked." | |||
| 3541 | (t | 3556 | (t |
| 3542 | (push-mark | 3557 | (push-mark |
| 3543 | (save-excursion | 3558 | (save-excursion |
| 3544 | (forward-word arg) | 3559 | (forward-word (prefix-numeric-value arg)) |
| 3545 | (point)) | 3560 | (point)) |
| 3546 | nil t)))) | 3561 | nil t)))) |
| 3547 | 3562 | ||
| @@ -4025,8 +4040,7 @@ or go back to just one window (by deleting all but the selected window)." | |||
| 4025 | (abort-recursive-edit)) | 4040 | (abort-recursive-edit)) |
| 4026 | (current-prefix-arg | 4041 | (current-prefix-arg |
| 4027 | nil) | 4042 | nil) |
| 4028 | ((and transient-mark-mode | 4043 | ((and transient-mark-mode mark-active) |
| 4029 | mark-active) | ||
| 4030 | (deactivate-mark)) | 4044 | (deactivate-mark)) |
| 4031 | ((> (recursion-depth) 0) | 4045 | ((> (recursion-depth) 0) |
| 4032 | (exit-recursive-edit)) | 4046 | (exit-recursive-edit)) |
diff --git a/lisp/subr.el b/lisp/subr.el index 4818d37156b..edc303bee8d 100644 --- a/lisp/subr.el +++ b/lisp/subr.el | |||
| @@ -1874,6 +1874,19 @@ is allowed once again." | |||
| 1874 | ,@body) | 1874 | ,@body) |
| 1875 | (quit (setq quit-flag t) nil))) | 1875 | (quit (setq quit-flag t) nil))) |
| 1876 | 1876 | ||
| 1877 | (defmacro while-no-input (&rest body) | ||
| 1878 | "Execute BODY only as long as there's no pending input. | ||
| 1879 | If input arrives, that ends the execution of BODY, | ||
| 1880 | and `while-no-input' returns nil. If BODY finishes, | ||
| 1881 | `while-no-input' returns whatever value BODY produced." | ||
| 1882 | (declare (debug t) (indent 0)) | ||
| 1883 | (let ((catch-sym (make-symbol "input"))) | ||
| 1884 | `(with-local-quit | ||
| 1885 | (catch ',catch-sym | ||
| 1886 | (let ((throw-on-input ',catch-sym)) | ||
| 1887 | (when (sit-for 0 0 t) | ||
| 1888 | ,@body)))))) | ||
| 1889 | |||
| 1877 | (defmacro combine-after-change-calls (&rest body) | 1890 | (defmacro combine-after-change-calls (&rest body) |
| 1878 | "Execute BODY, but don't call the after-change functions till the end. | 1891 | "Execute BODY, but don't call the after-change functions till the end. |
| 1879 | If BODY makes changes in the buffer, they are recorded | 1892 | If BODY makes changes in the buffer, they are recorded |
diff --git a/lisp/term.el b/lisp/term.el index 8c624568ad0..14a567a667c 100644 --- a/lisp/term.el +++ b/lisp/term.el | |||
| @@ -1402,7 +1402,7 @@ The main purpose is to get rid of the local keymap." | |||
| 1402 | :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ | 1402 | :kl=\\EOD:kd=\\EOB:kr=\\EOC:ku=\\EOA:kN=\\E[6~:kP=\\E[5~:@7=\\E[4~:kh=\\E[1~\ |
| 1403 | :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ | 1403 | :mk=\\E[8m:cb=\\E[1K:op=\\E[39;49m:Co#8:pa#64:AB=\\E[4%%dm:AF=\\E[3%%dm:cr=^M\ |
| 1404 | :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ | 1404 | :bl=^G:do=^J:le=^H:ta=^I:se=\E[27m:ue=\E24m\ |
| 1405 | :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:" | 1405 | :kb=^?:kD=^[[3~:sc=\E7:rc=\E8:r1=\Ec:" |
| 1406 | ;;; : -undefine ic | 1406 | ;;; : -undefine ic |
| 1407 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ | 1407 | ;;; don't define :te=\\E[2J\\E[?47l\\E8:ti=\\E7\\E[?47h\ |
| 1408 | "termcap capabilities supported") | 1408 | "termcap capabilities supported") |
| @@ -2893,6 +2893,10 @@ See `term-prompt-regexp'." | |||
| 2893 | (term-goto (car term-saved-cursor) | 2893 | (term-goto (car term-saved-cursor) |
| 2894 | (cdr term-saved-cursor))) | 2894 | (cdr term-saved-cursor))) |
| 2895 | (setq term-terminal-state 0)) | 2895 | (setq term-terminal-state 0)) |
| 2896 | ((eq char ?c) ;; \Ec - Reset (terminfo: rs1) | ||
| 2897 | ;; This is used by the "clear" program. | ||
| 2898 | (setq term-terminal-state 0) | ||
| 2899 | (term-reset-terminal)) | ||
| 2896 | ;; The \E#8 reset sequence for xterm. We | 2900 | ;; The \E#8 reset sequence for xterm. We |
| 2897 | ;; probably don't need to handle it, but this | 2901 | ;; probably don't need to handle it, but this |
| 2898 | ;; is the code to parse it. | 2902 | ;; is the code to parse it. |
| @@ -3020,13 +3024,29 @@ See `term-prompt-regexp'." | |||
| 3020 | (set-marker term-home-marker (point)) | 3024 | (set-marker term-home-marker (point)) |
| 3021 | (setq term-current-row (1- term-height)))))) | 3025 | (setq term-current-row (1- term-height)))))) |
| 3022 | 3026 | ||
| 3027 | ;;; Reset the terminal, delete all the content and set the face to the | ||
| 3028 | ;;; default one. | ||
| 3029 | (defun term-reset-terminal () | ||
| 3030 | (erase-buffer) | ||
| 3031 | (setq term-current-row 1) | ||
| 3032 | (setq term-current-column 1) | ||
| 3033 | (setq term-insert-mode nil) | ||
| 3034 | (setq term-current-face nil) | ||
| 3035 | (setq term-ansi-current-underline 0) | ||
| 3036 | (setq term-ansi-current-bold 0) | ||
| 3037 | (setq term-ansi-current-reverse 0) | ||
| 3038 | (setq term-ansi-current-color 0) | ||
| 3039 | (setq term-ansi-current-invisible 0) | ||
| 3040 | (setq term-ansi-face-already-done 1) | ||
| 3041 | (setq term-ansi-current-bg-color 0)) | ||
| 3042 | |||
| 3023 | ;;; New function to deal with ansi colorized output, as you can see you can | 3043 | ;;; New function to deal with ansi colorized output, as you can see you can |
| 3024 | ;;; have any bold/underline/fg/bg/reverse combination. -mm | 3044 | ;;; have any bold/underline/fg/bg/reverse combination. -mm |
| 3025 | 3045 | ||
| 3026 | (defun term-handle-colors-array (parameter) | 3046 | (defun term-handle-colors-array (parameter) |
| 3027 | (cond | 3047 | (cond |
| 3028 | 3048 | ||
| 3029 | ;;; Bold | 3049 | ;;; Bold (terminfo: bold) |
| 3030 | ((eq parameter 1) | 3050 | ((eq parameter 1) |
| 3031 | (setq term-ansi-current-bold 1)) | 3051 | (setq term-ansi-current-bold 1)) |
| 3032 | 3052 | ||
diff --git a/lisp/term/mac-win.el b/lisp/term/mac-win.el index 5032135da21..2b5c4d2a994 100644 --- a/lisp/term/mac-win.el +++ b/lisp/term/mac-win.el | |||
| @@ -199,7 +199,7 @@ Switch to a buffer editing the last file dropped." | |||
| 199 | (let | 199 | (let |
| 200 | ((encoding-vector (make-vector 256 nil)) | 200 | ((encoding-vector (make-vector 256 nil)) |
| 201 | (i 0) | 201 | (i 0) |
| 202 | (vec ;; mac-centraleuropean (128..255) -> UCS mapping | 202 | (vec ;; mac-centraleurroman (128..255) -> UCS mapping |
| 203 | [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS | 203 | [ #x00C4 ;; 128:LATIN CAPITAL LETTER A WITH DIAERESIS |
| 204 | #x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON | 204 | #x0100 ;; 129:LATIN CAPITAL LETTER A WITH MACRON |
| 205 | #x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON | 205 | #x0101 ;; 130:LATIN SMALL LETTER A WITH MACRON |
| @@ -339,8 +339,8 @@ Switch to a buffer editing the last file dropped." | |||
| 339 | (setq i (1+ i))) | 339 | (setq i (1+ i))) |
| 340 | (setq translation-table | 340 | (setq translation-table |
| 341 | (make-translation-table-from-vector encoding-vector)) | 341 | (make-translation-table-from-vector encoding-vector)) |
| 342 | ;; (define-translation-table 'mac-centraleuropean-decoder translation-table) | 342 | ;; (define-translation-table 'mac-centraleurroman-decoder translation-table) |
| 343 | (define-translation-table 'mac-centraleuropean-encoder | 343 | (define-translation-table 'mac-centraleurroman-encoder |
| 344 | (char-table-extra-slot translation-table 0))) | 344 | (char-table-extra-slot translation-table 0))) |
| 345 | 345 | ||
| 346 | (let | 346 | (let |
| @@ -493,8 +493,8 @@ Switch to a buffer editing the last file dropped." | |||
| 493 | (defvar mac-font-encoder-list | 493 | (defvar mac-font-encoder-list |
| 494 | '(("mac-roman" mac-roman-encoder | 494 | '(("mac-roman" mac-roman-encoder |
| 495 | ccl-encode-mac-roman-font "%s") | 495 | ccl-encode-mac-roman-font "%s") |
| 496 | ("mac-centraleuropean" mac-centraleuropean-encoder | 496 | ("mac-centraleurroman" mac-centraleurroman-encoder |
| 497 | ccl-encode-mac-centraleuropean-font "%s ce") | 497 | ccl-encode-mac-centraleurroman-font "%s ce") |
| 498 | ("mac-cyrillic" mac-cyrillic-encoder | 498 | ("mac-cyrillic" mac-cyrillic-encoder |
| 499 | ccl-encode-mac-cyrillic-font "%s cy"))) | 499 | ccl-encode-mac-cyrillic-font "%s cy"))) |
| 500 | 500 | ||
| @@ -515,15 +515,15 @@ Switch to a buffer editing the last file dropped." | |||
| 515 | (if mac-encoded | 515 | (if mac-encoded |
| 516 | (aset table c mac-encoded)))))))) | 516 | (aset table c mac-encoded)))))))) |
| 517 | 517 | ||
| 518 | (define-ccl-program ccl-encode-mac-centraleuropean-font | 518 | (define-ccl-program ccl-encode-mac-centraleurroman-font |
| 519 | `(0 | 519 | `(0 |
| 520 | (if (r0 != ,(charset-id 'ascii)) | 520 | (if (r0 != ,(charset-id 'ascii)) |
| 521 | (if (r0 <= ?\x8f) | 521 | (if (r0 <= ?\x8f) |
| 522 | (translate-character mac-centraleuropean-encoder r0 r1) | 522 | (translate-character mac-centraleurroman-encoder r0 r1) |
| 523 | ((r1 <<= 7) | 523 | ((r1 <<= 7) |
| 524 | (r1 |= r2) | 524 | (r1 |= r2) |
| 525 | (translate-character mac-centraleuropean-encoder r0 r1))))) | 525 | (translate-character mac-centraleurroman-encoder r0 r1))))) |
| 526 | "CCL program for Mac Central European font") | 526 | "CCL program for Mac Central European Roman font") |
| 527 | 527 | ||
| 528 | (define-ccl-program ccl-encode-mac-cyrillic-font | 528 | (define-ccl-program ccl-encode-mac-cyrillic-font |
| 529 | `(0 | 529 | `(0 |
diff --git a/lisp/textmodes/ispell.el b/lisp/textmodes/ispell.el index f6a1c1d5cce..f3a7616bfd6 100644 --- a/lisp/textmodes/ispell.el +++ b/lisp/textmodes/ispell.el | |||
| @@ -1975,7 +1975,7 @@ SPC: Accept word this time. | |||
| 1975 | (sit-for 5) | 1975 | (sit-for 5) |
| 1976 | (kill-buffer "*Ispell Help*")) | 1976 | (kill-buffer "*Ispell Help*")) |
| 1977 | (unwind-protect | 1977 | (unwind-protect |
| 1978 | (progn | 1978 | (let ((resize-mini-windows 'grow-only)) |
| 1979 | (select-window (minibuffer-window)) | 1979 | (select-window (minibuffer-window)) |
| 1980 | (erase-buffer) | 1980 | (erase-buffer) |
| 1981 | (message nil) | 1981 | (message nil) |
diff --git a/lisp/textmodes/paragraphs.el b/lisp/textmodes/paragraphs.el index 206f7a42f78..353aa0ee8a2 100644 --- a/lisp/textmodes/paragraphs.el +++ b/lisp/textmodes/paragraphs.el | |||
| @@ -357,13 +357,15 @@ the number of paragraphs marked equals ARG. | |||
| 357 | If ARG is negative, point is put at end of this paragraph, mark is put | 357 | If ARG is negative, point is put at end of this paragraph, mark is put |
| 358 | at beginning of this or a previous paragraph. | 358 | at beginning of this or a previous paragraph. |
| 359 | 359 | ||
| 360 | If this command is repeated, it marks the next ARG paragraphs after (or | 360 | If this command is repeated or mark is active in Transient Mark mode, |
| 361 | before, if arg is negative) the ones already marked." | 361 | it marks the next ARG paragraphs after (or before, if arg is negative) |
| 362 | the ones already marked." | ||
| 362 | (interactive "p") | 363 | (interactive "p") |
| 363 | (unless arg (setq arg 1)) | 364 | (unless arg (setq arg 1)) |
| 364 | (when (zerop arg) | 365 | (when (zerop arg) |
| 365 | (error "Cannot mark zero paragraphs")) | 366 | (error "Cannot mark zero paragraphs")) |
| 366 | (cond ((and (eq last-command this-command) (mark t)) | 367 | (cond ((or (and (eq last-command this-command) (mark t)) |
| 368 | (and transient-mark-mode mark-active)) | ||
| 367 | (set-mark | 369 | (set-mark |
| 368 | (save-excursion | 370 | (save-excursion |
| 369 | (goto-char (mark)) | 371 | (goto-char (mark)) |
diff --git a/lisp/textmodes/tex-mode.el b/lisp/textmodes/tex-mode.el index f6f4c63fdc3..bac2ed6f800 100644 --- a/lisp/textmodes/tex-mode.el +++ b/lisp/textmodes/tex-mode.el | |||
| @@ -1351,7 +1351,9 @@ Mark is left at original location." | |||
| 1351 | (when (eq (char-after) ?{) | 1351 | (when (eq (char-after) ?{) |
| 1352 | (let ((newpos (point))) | 1352 | (let ((newpos (point))) |
| 1353 | (when (ignore-errors (backward-sexp 1) t) | 1353 | (when (ignore-errors (backward-sexp 1) t) |
| 1354 | (if (looking-at "\\\\end\\>") | 1354 | (if (or (looking-at "\\\\end\\>") |
| 1355 | ;; In case the \\ ends a verbatim section. | ||
| 1356 | (and (looking-at "end\\>") (eq (char-before) ?\\))) | ||
| 1355 | (tex-last-unended-begin) | 1357 | (tex-last-unended-begin) |
| 1356 | (goto-char newpos)))))))) | 1358 | (goto-char newpos)))))))) |
| 1357 | 1359 | ||
diff --git a/lisp/tooltip.el b/lisp/tooltip.el index 5bcb28dde52..2e60df02459 100644 --- a/lisp/tooltip.el +++ b/lisp/tooltip.el | |||
| @@ -1,6 +1,7 @@ | |||
| 1 | ;;; tooltip.el --- show tooltip windows | 1 | ;;; tooltip.el --- show tooltip windows |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2004 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1997, 1999, 2000, 2001, 2002, 2003, 2004 |
| 4 | ;; Free Software Foundation, Inc. | ||
| 4 | 5 | ||
| 5 | ;; Author: Gerd Moellmann <gerd@acm.org> | 6 | ;; Author: Gerd Moellmann <gerd@acm.org> |
| 6 | ;; Keywords: help c mouse tools | 7 | ;; Keywords: help c mouse tools |
| @@ -476,7 +477,25 @@ This function must return nil if it doesn't handle EVENT." | |||
| 476 | (defun tooltip-show-help-function (msg) | 477 | (defun tooltip-show-help-function (msg) |
| 477 | "Function installed as `show-help-function'. | 478 | "Function installed as `show-help-function'. |
| 478 | MSG is either a help string to display, or nil to cancel the display." | 479 | MSG is either a help string to display, or nil to cancel the display." |
| 479 | (let ((previous-help tooltip-help-message)) | 480 | (let ((previous-help tooltip-help-message) |
| 481 | mp pos) | ||
| 482 | (if (and mouse-1-click-follows-link | ||
| 483 | (stringp msg) | ||
| 484 | (save-match-data | ||
| 485 | (string-match "^mouse-2" msg)) | ||
| 486 | (setq mp (mouse-pixel-position)) | ||
| 487 | (consp (setq pos (cdr mp))) | ||
| 488 | (setq pos (posn-at-x-y (car pos) (cdr pos) (car mp))) | ||
| 489 | (windowp (posn-window pos))) | ||
| 490 | (with-current-buffer (window-buffer (posn-window pos)) | ||
| 491 | (if (mouse-on-link-p (posn-point pos)) | ||
| 492 | (setq msg (concat | ||
| 493 | (cond | ||
| 494 | ((eq mouse-1-click-follows-link 'double) "double-") | ||
| 495 | ((and (integerp mouse-1-click-follows-link) | ||
| 496 | (< mouse-1-click-follows-link 0)) "Long ") | ||
| 497 | (t "")) | ||
| 498 | "mouse-1" (substring msg 7)))))) | ||
| 480 | (setq tooltip-help-message msg) | 499 | (setq tooltip-help-message msg) |
| 481 | (cond ((null msg) | 500 | (cond ((null msg) |
| 482 | ;; Cancel display. This also cancels a delayed tip, if | 501 | ;; Cancel display. This also cancels a delayed tip, if |
diff --git a/lisp/url/ChangeLog b/lisp/url/ChangeLog index c9663baff8f..9bb5ef1c3e5 100644 --- a/lisp/url/ChangeLog +++ b/lisp/url/ChangeLog | |||
| @@ -1,3 +1,7 @@ | |||
| 1 | 2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 2 | |||
| 3 | * url-handlers.el: Don't `require' everything eagerly. | ||
| 4 | |||
| 1 | 2004-11-30 Paul Pogonyshev <pogonyshev@gmx.net> | 5 | 2004-11-30 Paul Pogonyshev <pogonyshev@gmx.net> |
| 2 | 6 | ||
| 3 | * url-http.el (url-http-handle-cookies): Bind `url-current-object' | 7 | * url-http.el (url-http-handle-cookies): Bind `url-current-object' |
| @@ -18,8 +22,7 @@ | |||
| 18 | 22 | ||
| 19 | 2004-11-12 Masatake YAMATO <jet@gyve.org> | 23 | 2004-11-12 Masatake YAMATO <jet@gyve.org> |
| 20 | 24 | ||
| 21 | * url-mailto.el (url-mailto): Fix a typo in the | 25 | * url-mailto.el (url-mailto): Fix a typo in the comment. |
| 22 | comment. | ||
| 23 | 26 | ||
| 24 | 2004-11-02 Masatake YAMATO <jet@gyve.org> | 27 | 2004-11-02 Masatake YAMATO <jet@gyve.org> |
| 25 | 28 | ||
| @@ -76,12 +79,12 @@ | |||
| 76 | 79 | ||
| 77 | * url-vars.el (url-passwd-entry-func): Var deleted. | 80 | * url-vars.el (url-passwd-entry-func): Var deleted. |
| 78 | (mm-mime-mule-charset-alist): Remove compatibility code for old Gnus. | 81 | (mm-mime-mule-charset-alist): Remove compatibility code for old Gnus. |
| 79 | (url-weekday-alist): Renamed from weekday-alist. | 82 | (url-weekday-alist): Rename from weekday-alist. |
| 80 | (url-monthabbrev-alist): Renamed from monthabbrev-alist. | 83 | (url-monthabbrev-alist): Rename from monthabbrev-alist. |
| 81 | (url-vars-unload-hook): Initialize hook var to hold the function. | 84 | (url-vars-unload-hook): Initialize hook var to hold the function. |
| 82 | 85 | ||
| 83 | * url-util.el (url-get-normalized-date): Use | 86 | * url-util.el (url-get-normalized-date): Use url-weekday-alist and |
| 84 | url-weekday-alist and url-monthabbrev-alist. | 87 | url-monthabbrev-alist. |
| 85 | 88 | ||
| 86 | * url-misc.el: Load cl at compile time. | 89 | * url-misc.el: Load cl at compile time. |
| 87 | 90 | ||
| @@ -99,8 +102,8 @@ | |||
| 99 | * url-news.el (url-snews): Use nntp-open-tls-stream if | 102 | * url-news.el (url-snews): Use nntp-open-tls-stream if |
| 100 | url-gateway-method is tls. | 103 | url-gateway-method is tls. |
| 101 | 104 | ||
| 102 | * url-ldap.el (url-ldap-certificate-formatter): Use | 105 | * url-ldap.el (url-ldap-certificate-formatter): |
| 103 | tls-certificate-information if ssl.el is not available. | 106 | Use tls-certificate-information if ssl.el is not available. |
| 104 | 107 | ||
| 105 | * url-https.el (url-https-create-secure-wrapper): Use tls if ssl | 108 | * url-https.el (url-https-create-secure-wrapper): Use tls if ssl |
| 106 | is not available. | 109 | is not available. |
diff --git a/lisp/url/url-handlers.el b/lisp/url/url-handlers.el index db961b9c27e..f90f21a3dbe 100644 --- a/lisp/url/url-handlers.el +++ b/lisp/url/url-handlers.el | |||
| @@ -25,11 +25,21 @@ | |||
| 25 | 25 | ||
| 26 | ;;; Code: | 26 | ;;; Code: |
| 27 | 27 | ||
| 28 | (require 'url) | 28 | ;; (require 'url) |
| 29 | (require 'url-parse) | 29 | (eval-when-compile (require 'url-parse)) |
| 30 | (require 'url-util) | 30 | ;; (require 'url-util) |
| 31 | (require 'mm-decode) | 31 | (eval-when-compile (require 'mm-decode)) |
| 32 | (require 'mailcap) | 32 | ;; (require 'mailcap) |
| 33 | ;; The following functions in the byte compiler's warnings are known not | ||
| 34 | ;; to cause any real problem for the following reasons: | ||
| 35 | ;; - mm-save-part-to-file, mm-destroy-parts: always used | ||
| 36 | ;; after mm-dissect-buffer and defined in the same file. | ||
| 37 | ;; The following are autoloaded instead of `require'd to avoid eagerly | ||
| 38 | ;; loading all of URL when turning on url-handler-mode in the .emacs. | ||
| 39 | (autoload 'url-retrieve-synchronously "url" "Retrieve url synchronously.") | ||
| 40 | (autoload 'url-expand-file-name "url-expand" "Convert url to a fully specified url, and canonicalize it.") | ||
| 41 | (autoload 'mm-dissect-buffer "mm-decode" "Dissect the current buffer and return a list of MIME handles.") | ||
| 42 | (autoload 'url-scheme-get-property "url-methods" "Get property of a URL SCHEME.") | ||
| 33 | 43 | ||
| 34 | (eval-when-compile | 44 | (eval-when-compile |
| 35 | (require 'cl)) | 45 | (require 'cl)) |
diff --git a/lisp/vc-svn.el b/lisp/vc-svn.el index fafb5eff7cd..cbb951d60b7 100644 --- a/lisp/vc-svn.el +++ b/lisp/vc-svn.el | |||
| @@ -447,10 +447,14 @@ and that it passes `vc-svn-global-switches' to it before FLAGS." | |||
| 447 | (vc-insert-file (expand-file-name ".svn/entries" dirname))) | 447 | (vc-insert-file (expand-file-name ".svn/entries" dirname))) |
| 448 | (goto-char (point-min)) | 448 | (goto-char (point-min)) |
| 449 | (when (re-search-forward | 449 | (when (re-search-forward |
| 450 | (concat "name=\"svn:this_dir\"[\n\t ]*" | 450 | ;; Old `svn' used name="svn:dir", newer use just name="". |
| 451 | "\\([-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | 451 | (concat "name=\"\\(?:svn:this_dir\\)?\"[\n\t ]*" |
| 452 | "\\(?:[-a-z]+=\"[^\"]*\"[\n\t ]*\\)*?" | ||
| 452 | "url=\"\\([^\"]+\\)\"") nil t) | 453 | "url=\"\\([^\"]+\\)\"") nil t) |
| 453 | (match-string 2)))) | 454 | ;; This is not a hostname but a URL. This may actually be considered |
| 455 | ;; as a feature since it allows vc-svn-stay-local to specify different | ||
| 456 | ;; behavior for different modules on the same server. | ||
| 457 | (match-string 1)))) | ||
| 454 | 458 | ||
| 455 | (defun vc-svn-parse-status (localp) | 459 | (defun vc-svn-parse-status (localp) |
| 456 | "Parse output of \"svn status\" command in the current buffer. | 460 | "Parse output of \"svn status\" command in the current buffer. |
| @@ -505,6 +509,30 @@ essential information." | |||
| 505 | (and (string-match "^[0-9]" tag) | 509 | (and (string-match "^[0-9]" tag) |
| 506 | (not (string-match "[^0-9]" tag)))) | 510 | (not (string-match "[^0-9]" tag)))) |
| 507 | 511 | ||
| 512 | ;; Support for `svn annotate' | ||
| 513 | |||
| 514 | (defun vc-svn-annotate-command (file buf &optional rev) | ||
| 515 | (vc-svn-command buf 0 file "annotate" (if rev (concat "-r" rev)))) | ||
| 516 | |||
| 517 | (defun vc-svn-annotate-time-of-rev (rev) | ||
| 518 | ;; Arbitrarily assume 10 commmits per day. | ||
| 519 | (/ (string-to-number rev) 10.0)) | ||
| 520 | |||
| 521 | (defun vc-svn-annotate-current-time () | ||
| 522 | (vc-svn-annotate-time-of-rev vc-annotate-parent-rev)) | ||
| 523 | |||
| 524 | (defconst vc-svn-annotate-re "[ \t]*\\([0-9]+\\)[ \t]+[^\t ]+ ") | ||
| 525 | |||
| 526 | (defun vc-svn-annotate-time () | ||
| 527 | (when (looking-at vc-svn-annotate-re) | ||
| 528 | (goto-char (match-end 0)) | ||
| 529 | (vc-svn-annotate-time-of-rev (match-string 1)))) | ||
| 530 | |||
| 531 | (defun vc-svn-annotate-extract-revision-at-line () | ||
| 532 | (save-excursion | ||
| 533 | (beginning-of-line) | ||
| 534 | (if (looking-at vc-svn-annotate-re) (match-string 1)))) | ||
| 535 | |||
| 508 | (provide 'vc-svn) | 536 | (provide 'vc-svn) |
| 509 | 537 | ||
| 510 | ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d | 538 | ;; arch-tag: 02f10c68-2b4d-453a-90fc-1eee6cfb268d |
diff --git a/lisp/vc.el b/lisp/vc.el index 63e9be651d9..64de0351922 100644 --- a/lisp/vc.el +++ b/lisp/vc.el | |||
| @@ -2836,7 +2836,7 @@ Uses `rcs2log' which only works for RCS and CVS." | |||
| 2836 | (pop-to-buffer | 2836 | (pop-to-buffer |
| 2837 | (set-buffer (get-buffer-create "*vc*"))) | 2837 | (set-buffer (get-buffer-create "*vc*"))) |
| 2838 | (erase-buffer) | 2838 | (erase-buffer) |
| 2839 | (insert-file tempfile) | 2839 | (insert-file-contents tempfile) |
| 2840 | "failed")) | 2840 | "failed")) |
| 2841 | (setq default-directory (file-name-directory changelog)) | 2841 | (setq default-directory (file-name-directory changelog)) |
| 2842 | (delete-file tempfile))))) | 2842 | (delete-file tempfile))))) |
diff --git a/lisp/wid-edit.el b/lisp/wid-edit.el index 4888bf478df..c782e4262b8 100644 --- a/lisp/wid-edit.el +++ b/lisp/wid-edit.el | |||
| @@ -327,6 +327,7 @@ new value.") | |||
| 327 | (let ((keymap (widget-get widget :keymap)) | 327 | (let ((keymap (widget-get widget :keymap)) |
| 328 | (face (or (widget-get widget :value-face) 'widget-field-face)) | 328 | (face (or (widget-get widget :value-face) 'widget-field-face)) |
| 329 | (help-echo (widget-get widget :help-echo)) | 329 | (help-echo (widget-get widget :help-echo)) |
| 330 | (follow-link (widget-get widget :follow-link)) | ||
| 330 | (rear-sticky | 331 | (rear-sticky |
| 331 | (or (not widget-field-add-space) (widget-get widget :size)))) | 332 | (or (not widget-field-add-space) (widget-get widget :size)))) |
| 332 | (if (functionp help-echo) | 333 | (if (functionp help-echo) |
| @@ -345,6 +346,7 @@ new value.") | |||
| 345 | ;; works in the field when, say, Custom uses `suppress-keymap'. | 346 | ;; works in the field when, say, Custom uses `suppress-keymap'. |
| 346 | (overlay-put overlay 'local-map keymap) | 347 | (overlay-put overlay 'local-map keymap) |
| 347 | (overlay-put overlay 'face face) | 348 | (overlay-put overlay 'face face) |
| 349 | (overlay-put overlay 'follow-link follow-link) | ||
| 348 | (overlay-put overlay 'help-echo help-echo)) | 350 | (overlay-put overlay 'help-echo help-echo)) |
| 349 | (setq to (1- to)) | 351 | (setq to (1- to)) |
| 350 | (setq rear-sticky t)) | 352 | (setq rear-sticky t)) |
| @@ -354,6 +356,7 @@ new value.") | |||
| 354 | (overlay-put overlay 'field widget) | 356 | (overlay-put overlay 'field widget) |
| 355 | (overlay-put overlay 'local-map keymap) | 357 | (overlay-put overlay 'local-map keymap) |
| 356 | (overlay-put overlay 'face face) | 358 | (overlay-put overlay 'face face) |
| 359 | (overlay-put overlay 'follow-link follow-link) | ||
| 357 | (overlay-put overlay 'help-echo help-echo))) | 360 | (overlay-put overlay 'help-echo help-echo))) |
| 358 | (widget-specify-secret widget)) | 361 | (widget-specify-secret widget)) |
| 359 | 362 | ||
| @@ -378,6 +381,7 @@ new value.") | |||
| 378 | (defun widget-specify-button (widget from to) | 381 | (defun widget-specify-button (widget from to) |
| 379 | "Specify button for WIDGET between FROM and TO." | 382 | "Specify button for WIDGET between FROM and TO." |
| 380 | (let ((overlay (make-overlay from to nil t nil)) | 383 | (let ((overlay (make-overlay from to nil t nil)) |
| 384 | (follow-link (widget-get widget :follow-link)) | ||
| 381 | (help-echo (widget-get widget :help-echo))) | 385 | (help-echo (widget-get widget :help-echo))) |
| 382 | (widget-put widget :button-overlay overlay) | 386 | (widget-put widget :button-overlay overlay) |
| 383 | (if (functionp help-echo) | 387 | (if (functionp help-echo) |
| @@ -389,6 +393,7 @@ new value.") | |||
| 389 | (unless (widget-get widget :suppress-face) | 393 | (unless (widget-get widget :suppress-face) |
| 390 | (overlay-put overlay 'face (widget-apply widget :button-face-get))) | 394 | (overlay-put overlay 'face (widget-apply widget :button-face-get))) |
| 391 | (overlay-put overlay 'pointer 'hand) | 395 | (overlay-put overlay 'pointer 'hand) |
| 396 | (overlay-put overlay 'follow-link follow-link) | ||
| 392 | (overlay-put overlay 'help-echo help-echo))) | 397 | (overlay-put overlay 'help-echo help-echo))) |
| 393 | 398 | ||
| 394 | (defun widget-mouse-help (window overlay point) | 399 | (defun widget-mouse-help (window overlay point) |
| @@ -1705,6 +1710,7 @@ If END is omitted, it defaults to the length of LIST." | |||
| 1705 | "An embedded link." | 1710 | "An embedded link." |
| 1706 | :button-prefix 'widget-link-prefix | 1711 | :button-prefix 'widget-link-prefix |
| 1707 | :button-suffix 'widget-link-suffix | 1712 | :button-suffix 'widget-link-suffix |
| 1713 | :follow-link "\C-m" | ||
| 1708 | :help-echo "Follow the link." | 1714 | :help-echo "Follow the link." |
| 1709 | :format "%[%t%]") | 1715 | :format "%[%t%]") |
| 1710 | 1716 | ||
diff --git a/lisp/xml.el b/lisp/xml.el index aba84d33230..daf5689c18b 100644 --- a/lisp/xml.el +++ b/lisp/xml.el | |||
| @@ -179,6 +179,8 @@ If PARSE-NS is non-nil, then QNAMES are expanded." | |||
| 179 | xml))) | 179 | xml))) |
| 180 | 180 | ||
| 181 | 181 | ||
| 182 | (defvar xml-name-re) | ||
| 183 | (defvar xml-entity-value-re) | ||
| 182 | (let* ((start-chars (concat "[:alpha:]:_")) | 184 | (let* ((start-chars (concat "[:alpha:]:_")) |
| 183 | (name-chars (concat "-[:digit:]." start-chars)) | 185 | (name-chars (concat "-[:digit:]." start-chars)) |
| 184 | ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ | 186 | ;;[3] S ::= (#x20 | #x9 | #xD | #xA)+ |
diff --git a/lispref/ChangeLog b/lispref/ChangeLog index 2760174636b..247309624de 100644 --- a/lispref/ChangeLog +++ b/lispref/ChangeLog | |||
| @@ -1,3 +1,26 @@ | |||
| 1 | 2004-12-21 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * commands.texi (Event Input Misc): Add while-no-input. | ||
| 4 | |||
| 5 | 2004-12-11 Richard M. Stallman <rms@gnu.org> | ||
| 6 | |||
| 7 | * display.texi (Line Height): Rewrite text for clarity. | ||
| 8 | |||
| 9 | 2004-12-11 Kim F. Storm <storm@cua.dk> | ||
| 10 | |||
| 11 | * display.texi (Display): Add node "Line Height" to menu. | ||
| 12 | (Line Height): New node. Move full description of line-spacing | ||
| 13 | and line-height text properties here from text.texi. | ||
| 14 | (Scroll Bars): Add vertical-scroll-bar variable. | ||
| 15 | |||
| 16 | * frames.texi (Window Frame Parameters): Remove line-height defvar. | ||
| 17 | |||
| 18 | * locals.texi (Standard Buffer-Local Variables): Fix xref for | ||
| 19 | line-spacing and vertical-scroll-bar. | ||
| 20 | |||
| 21 | * text.texi (Special Properties): Just mention line-spacing and | ||
| 22 | line-height here, add xref to new "Line Height" node. | ||
| 23 | |||
| 1 | 2004-12-09 Thien-Thi Nguyen <ttn@gnu.org> | 24 | 2004-12-09 Thien-Thi Nguyen <ttn@gnu.org> |
| 2 | 25 | ||
| 3 | * frames.texi (Window Frame Parameters): New @defvar for `line-spacing'. | 26 | * frames.texi (Window Frame Parameters): New @defvar for `line-spacing'. |
diff --git a/lispref/commands.texi b/lispref/commands.texi index 0144123ecb5..85e2953f102 100644 --- a/lispref/commands.texi +++ b/lispref/commands.texi | |||
| @@ -2388,6 +2388,18 @@ The alias @code{last-input-char} exists for compatibility with | |||
| 2388 | Emacs version 18. | 2388 | Emacs version 18. |
| 2389 | @end defvar | 2389 | @end defvar |
| 2390 | 2390 | ||
| 2391 | @defmac while-no-input body... | ||
| 2392 | This construct runs the @var{body} forms and returns the value | ||
| 2393 | of the last one---but only if no input arrives. If any input | ||
| 2394 | arrives during the execution of the @var{body} forms, it aborts | ||
| 2395 | them (working much like a quit), and the @code{while-no-input} | ||
| 2396 | form returns @code{nil}. | ||
| 2397 | |||
| 2398 | If a part of @var{body} binds @code{inhibit-quit} to non-@code{nil}, | ||
| 2399 | arrival of input during those parts won't cause an abort until | ||
| 2400 | the end of that part. | ||
| 2401 | @end defmac | ||
| 2402 | |||
| 2391 | @defun discard-input | 2403 | @defun discard-input |
| 2392 | @cindex flush input | 2404 | @cindex flush input |
| 2393 | @cindex discard input | 2405 | @cindex discard input |
diff --git a/lispref/display.texi b/lispref/display.texi index cd836023aac..04d478b9b2a 100644 --- a/lispref/display.texi +++ b/lispref/display.texi | |||
| @@ -23,6 +23,7 @@ that Emacs presents to the user. | |||
| 23 | * Temporary Displays:: Displays that go away automatically. | 23 | * Temporary Displays:: Displays that go away automatically. |
| 24 | * Overlays:: Use overlays to highlight parts of the buffer. | 24 | * Overlays:: Use overlays to highlight parts of the buffer. |
| 25 | * Width:: How wide a character or string is on the screen. | 25 | * Width:: How wide a character or string is on the screen. |
| 26 | * Line Height:: Controlling the height of lines. | ||
| 26 | * Faces:: A face defines a graphics style for text characters: | 27 | * Faces:: A face defines a graphics style for text characters: |
| 27 | font, colors, etc. | 28 | font, colors, etc. |
| 28 | * Fringes:: Controlling window fringes. | 29 | * Fringes:: Controlling window fringes. |
| @@ -1510,6 +1511,98 @@ the beginning of the result if one multi-column character in | |||
| 1510 | @end example | 1511 | @end example |
| 1511 | @end defun | 1512 | @end defun |
| 1512 | 1513 | ||
| 1514 | @node Line Height | ||
| 1515 | @section Line Height | ||
| 1516 | @cindex line height | ||
| 1517 | |||
| 1518 | The total height of each display line consists of the height of the | ||
| 1519 | contents of the line, and additional vertical line spacing below the | ||
| 1520 | display row. | ||
| 1521 | |||
| 1522 | The height of the line contents is normally determined from the | ||
| 1523 | maximum height of any character or image on that display line, | ||
| 1524 | including the final newline if there is one. (A line that is | ||
| 1525 | continued doesn't include a final newline.) In the most common case, | ||
| 1526 | the line height equals the height of the default frame font. | ||
| 1527 | |||
| 1528 | There are several ways to explicitly control or change the line | ||
| 1529 | height, either by specifying an absolute height for the display line, | ||
| 1530 | or by adding additional vertical space below one or all lines. | ||
| 1531 | |||
| 1532 | @kindex line-height @r{(text property)} | ||
| 1533 | A newline can have a @code{line-height} text or overlay property | ||
| 1534 | that controls the total height of the display line ending in that | ||
| 1535 | newline. If the property value is zero, the displayed height of the | ||
| 1536 | line is exactly what its contents need; no line-spacing is added. | ||
| 1537 | This case is useful for tiling small images or image slices without | ||
| 1538 | adding blank areas between the images. | ||
| 1539 | |||
| 1540 | If the property value is not zero, it specifies a desired height, | ||
| 1541 | @var{line-height}. There are several ways it can do this: | ||
| 1542 | |||
| 1543 | @table @code | ||
| 1544 | @item @var{integer} | ||
| 1545 | If the property is a positive integer, @var{line-height} is that integer. | ||
| 1546 | @item @var{float} | ||
| 1547 | If the property is a float, @var{float}, @var{line-height} is @var{float} | ||
| 1548 | times the frame's default line height. | ||
| 1549 | @item (@var{ratio} . @var{face}) | ||
| 1550 | If the property is a cons of the format shown, @var{line-height} is | ||
| 1551 | @var{ratio} times the height of face @var{face}. @var{ratio} can be | ||
| 1552 | any type of number. If @var{face} is @code{t}, it refers to the | ||
| 1553 | current face. | ||
| 1554 | @end table | ||
| 1555 | |||
| 1556 | Thus, any valid nonzero property value specifies a height in pixels, | ||
| 1557 | @var{line-height}, one way or another. If the line contents' height | ||
| 1558 | is less than @var{line-height}, Emacs adds extra vertical space above | ||
| 1559 | the line to achieve the total height @var{line-height}. Otherwise, | ||
| 1560 | @var{line-height} has no effect. | ||
| 1561 | |||
| 1562 | If you don't specify the @code{line-height} propery, the line's | ||
| 1563 | height consists of the contents' height plus the line spacing. | ||
| 1564 | |||
| 1565 | @vindex default-line-spacing | ||
| 1566 | You can specify the line spacing for all lines in a frame with the | ||
| 1567 | @code{line-spacing} frame parameter, @xref{Window Frame Parameters}. | ||
| 1568 | However, if the variable @code{default-line-spacing} is | ||
| 1569 | non-@code{nil}, it overrides the frame's @code{line-spacing} | ||
| 1570 | parameter. An integer value specifies the number of pixels put below | ||
| 1571 | lines on window systems. A floating point number specifies the | ||
| 1572 | spacing relative to the frame's default line height. | ||
| 1573 | |||
| 1574 | @vindex line-spacing | ||
| 1575 | You can specify the line spacing for all lines in a buffer via the | ||
| 1576 | buffer-local @code{line-spacing} variable. An integer value specifies | ||
| 1577 | the number of pixels put below lines on window systems. A floating | ||
| 1578 | point number specifies the spacing relative to the default frame line | ||
| 1579 | height. This overrides line spacings specified for the frame. | ||
| 1580 | |||
| 1581 | @kindex line-spacing @r{(text property)} | ||
| 1582 | Finally, a newline can have a @code{line-spacing} text or overlay | ||
| 1583 | property that controls the height of the display line ending with that | ||
| 1584 | newline. The property value overrides the default frame line spacing | ||
| 1585 | and the buffer local @code{line-spacing} variable. | ||
| 1586 | |||
| 1587 | One way or another, these mechanisms specify a line spacing for each | ||
| 1588 | line. Let's call the value @var{line-spacing}. | ||
| 1589 | |||
| 1590 | If the @var{line-spacing} value is a positive integer, it specifies | ||
| 1591 | the number of pixels of additional vertical space. This space appears | ||
| 1592 | below the display line contents. | ||
| 1593 | |||
| 1594 | If the @var{line-spacing} value is a floating point number or cons, | ||
| 1595 | the additional vertical space is @var{line-spacing} times the frame | ||
| 1596 | default line height. | ||
| 1597 | |||
| 1598 | @ignore @c I think we may want to delete this, so don't document it -- rms. | ||
| 1599 | If the @var{line-spacing} value is a cons @code{(total . @var{spacing})} | ||
| 1600 | where @var{spacing} is any of the forms described above, the value of | ||
| 1601 | @var{spacing} specifies the total displayed height of the line, | ||
| 1602 | regardless of the height of the characters in it. This is equivalent | ||
| 1603 | to using the @code{line-height} property. | ||
| 1604 | @end ignore | ||
| 1605 | |||
| 1513 | @node Faces | 1606 | @node Faces |
| 1514 | @section Faces | 1607 | @section Faces |
| 1515 | @cindex faces | 1608 | @cindex faces |
| @@ -2826,7 +2919,14 @@ non-@code{nil} parameter value means they do. The frame parameter | |||
| 2826 | @code{scroll-bar-width} specifies how wide they are (@code{nil} | 2919 | @code{scroll-bar-width} specifies how wide they are (@code{nil} |
| 2827 | meaning the default). @xref{Window Frame Parameters}. | 2920 | meaning the default). @xref{Window Frame Parameters}. |
| 2828 | 2921 | ||
| 2829 | You can also control this for individual windows. Call the function | 2922 | @vindex vertical-scroll-bar |
| 2923 | You can enable or disable scroll bars for a particular buffer, | ||
| 2924 | by setting the variable @code{vertical-scroll-bar}. This variable | ||
| 2925 | automatically becomes buffer-local when set. The possible values are | ||
| 2926 | @code{left}, @code{right}, @code{t}, which means to use the | ||
| 2927 | frame's default, and @code{nil} for no scroll bar. | ||
| 2928 | |||
| 2929 | You can also control this for individual windows. Call the function | ||
| 2830 | @code{set-window-scroll-bars} to specify what to do for a specific window: | 2930 | @code{set-window-scroll-bars} to specify what to do for a specific window: |
| 2831 | 2931 | ||
| 2832 | @defun set-window-scroll-bars window width &optional vertical-type horizontal-type | 2932 | @defun set-window-scroll-bars window width &optional vertical-type horizontal-type |
diff --git a/lispref/frames.texi b/lispref/frames.texi index e3e92c621e9..655232a8869 100644 --- a/lispref/frames.texi +++ b/lispref/frames.texi | |||
| @@ -605,25 +605,6 @@ it and see if it works.) | |||
| 605 | @end ignore | 605 | @end ignore |
| 606 | @end table | 606 | @end table |
| 607 | 607 | ||
| 608 | @defvar line-spacing | ||
| 609 | When this permanently buffer-local variable is non-nil, if its value is | ||
| 610 | an integer, that many pixels of extra space are put below each line. If | ||
| 611 | the value is a floating point number, compute the spacing by multiplying | ||
| 612 | the value by the default frame line height. | ||
| 613 | |||
| 614 | Note that this variable and the frame parameter @code{line-spacing} | ||
| 615 | (described above) control different things. The frame parameter is | ||
| 616 | involved in setting the frame line height (@pxref{Creating Frames}), | ||
| 617 | while the buffer-local variable is for already-created frames. | ||
| 618 | |||
| 619 | For example, if the frame parameter is nil, a variable value of 1.0 | ||
| 620 | ``double-spaces'' the display because for every line of text, there is | ||
| 621 | an additional full line of space put below it. Likewise, a value of 2.0 | ||
| 622 | ``triple-spaces'' the display, and so forth. If, on the other hand, the | ||
| 623 | frame parameter is 10, a variable value of 10 would effectively put 20 | ||
| 624 | pixels of space under the text. | ||
| 625 | @end defvar | ||
| 626 | |||
| 627 | @defvar blink-cursor-alist | 608 | @defvar blink-cursor-alist |
| 628 | This variable specifies how to blink the cursor. Each element has the | 609 | This variable specifies how to blink the cursor. Each element has the |
| 629 | form @code{(@var{on-state} . @var{off-state})}. Whenever the cursor | 610 | form @code{(@var{on-state} . @var{off-state})}. Whenever the cursor |
diff --git a/lispref/locals.texi b/lispref/locals.texi index 1530a318c56..942baa9dd1b 100644 --- a/lispref/locals.texi +++ b/lispref/locals.texi | |||
| @@ -132,7 +132,7 @@ Does not work yet. | |||
| 132 | @xref{Display Margins}. | 132 | @xref{Display Margins}. |
| 133 | 133 | ||
| 134 | @item line-spacing | 134 | @item line-spacing |
| 135 | @xref{Window Frame Parameters}. | 135 | @xref{Line Height}. |
| 136 | 136 | ||
| 137 | @item local-abbrev-table | 137 | @item local-abbrev-table |
| 138 | @xref{Abbrevs}. | 138 | @xref{Abbrevs}. |
| @@ -198,7 +198,7 @@ Used for communication between mouse commands and scroll-bar commands. | |||
| 198 | @xref{Mode Line Variables}. | 198 | @xref{Mode Line Variables}. |
| 199 | 199 | ||
| 200 | @item vertical-scroll-bar | 200 | @item vertical-scroll-bar |
| 201 | @xref{Yet to be written}. | 201 | @xref{Scroll Bars}. |
| 202 | @end table | 202 | @end table |
| 203 | 203 | ||
| 204 | @ignore | 204 | @ignore |
diff --git a/lispref/text.texi b/lispref/text.texi index 55d931699bf..1daad58ee7f 100644 --- a/lispref/text.texi +++ b/lispref/text.texi | |||
| @@ -3002,45 +3002,13 @@ for possible pointer shapes. | |||
| 3002 | A newline can have a @code{line-spacing} text or overlay property that | 3002 | A newline can have a @code{line-spacing} text or overlay property that |
| 3003 | controls the height of the display line ending with that newline. The | 3003 | controls the height of the display line ending with that newline. The |
| 3004 | property value overrides the default frame line spacing and the buffer | 3004 | property value overrides the default frame line spacing and the buffer |
| 3005 | local @code{line-spacing} variable. We will call the property value | 3005 | local @code{line-spacing} variable. @xref{Line Height}. |
| 3006 | @var{line-spacing}. | ||
| 3007 | |||
| 3008 | If @var{line-spacing} is a positive integer, the value specifies | ||
| 3009 | additional vertical space, below the display line, in pixels. | ||
| 3010 | |||
| 3011 | If @var{line-spacing} is a floating point number or cons, the | ||
| 3012 | additional vertical space is the product of @var{line-spacing} and the | ||
| 3013 | default frame line height. | ||
| 3014 | |||
| 3015 | If the @var{line-spacing} value is a cons @code{(total . | ||
| 3016 | @var{spacing})} where @var{spacing} is any of the forms described | ||
| 3017 | above, the value of @var{spacing} specifies the total displayed height | ||
| 3018 | of the line, regardless of the height of the characters in it. This | ||
| 3019 | is equivalent to using the @code{line-height} property. | ||
| 3020 | 3006 | ||
| 3021 | @item line-height | 3007 | @item line-height |
| 3022 | @kindex line-height @r{(text property)} | 3008 | @kindex line-height @r{(text property)} |
| 3023 | A newline can have a @code{line-height} text or overlay property that | 3009 | A newline can have a @code{line-height} text or overlay property that |
| 3024 | controls the total height of the display line ending in that newline. | 3010 | controls the total height of the display line ending in that newline. |
| 3025 | We will call the property value @var{line-height}. | 3011 | @xref{Line Height}. |
| 3026 | |||
| 3027 | If @var{line-height} is 0, the height of the line is determined solely | ||
| 3028 | from its contents; nothing is added. Any @code{line-spacing} property | ||
| 3029 | on this newline is ignored. This case is useful for tiling small | ||
| 3030 | images or image slices without adding blank areas between the images. | ||
| 3031 | |||
| 3032 | If @var{line-height} is a positive integer, the value specifies the | ||
| 3033 | minimum line height in pixels. The line's ascent height is | ||
| 3034 | increased as necessary to achieve the specified height. | ||
| 3035 | |||
| 3036 | If @var{line-height} is a floating point number, the minimum line | ||
| 3037 | height is the product of @var{line-height} and the default frame line | ||
| 3038 | height. | ||
| 3039 | |||
| 3040 | If @var{line-height} is a cons @code{(@var{ratio} . @var{face})}, the | ||
| 3041 | minimum line height is calculated as @var{ratio} times the height of | ||
| 3042 | face @var{face}. The @var{ratio} is an integer or a floating point | ||
| 3043 | number. If @var{face} is @code{t}, it refers to the current face. | ||
| 3044 | 3012 | ||
| 3045 | @item modification-hooks | 3013 | @item modification-hooks |
| 3046 | @cindex change hooks for a character | 3014 | @cindex change hooks for a character |
diff --git a/man/ChangeLog b/man/ChangeLog index 9672a0c2437..3b6507e6b78 100644 --- a/man/ChangeLog +++ b/man/ChangeLog | |||
| @@ -1,3 +1,57 @@ | |||
| 1 | 2004-12-20 Jay Belanger <belanger@truman.edu> | ||
| 2 | |||
| 3 | * calc.texi (Types Tutorial): Emphasized that you can't divide by | ||
| 4 | zero. | ||
| 5 | |||
| 6 | 2004-12-17 Luc Teirlinck <teirllm@auburn.edu> | ||
| 7 | |||
| 8 | * cc-mode.texi (Text Filling and Line Breaking): Put period after | ||
| 9 | @xref. | ||
| 10 | (Font Locking): Avoid @strong{Note:}. | ||
| 11 | |||
| 12 | 2004-12-17 Michael Albinus <michael.albinus@gmx.de> | ||
| 13 | |||
| 14 | Sync with Tramp 2.0.46. | ||
| 15 | |||
| 16 | * tramp.texi (bottom): Add arch-tag. It was lost, somehow. | ||
| 17 | |||
| 18 | 2004-12-16 Luc Teirlinck <teirllm@auburn.edu> | ||
| 19 | |||
| 20 | * url.texi: Correct typos. | ||
| 21 | (Retrieving URLs): @var{nil}->@code{nil}. | ||
| 22 | (HTTP language/coding, mailto): Replace "GNU Emacs Manual" with | ||
| 23 | the standard "The GNU Emacs Manual" in fifth argument of @xref's. | ||
| 24 | (Dealing with HTTP documents): @inforef->@xref. | ||
| 25 | |||
| 26 | 2004-12-15 Juri Linkov <juri@jurta.org> | ||
| 27 | |||
| 28 | * mark.texi (Transient Mark, Mark Ring): M-< and other | ||
| 29 | movement commands don't set mark in Transient Mark mode | ||
| 30 | if mark is active. | ||
| 31 | |||
| 32 | 2004-12-15 Jay Belanger <belanger@truman.edu> | ||
| 33 | |||
| 34 | * calc.texi: Consistently capitalized all mode names. | ||
| 35 | (Answers to Exercises): Mention that an answer can be a fraction | ||
| 36 | when in Fraction mode. | ||
| 37 | |||
| 38 | 2004-12-13 Jay Belanger <belanger@truman.edu> | ||
| 39 | |||
| 40 | * calc.texi: Fix some TeX definitions. | ||
| 41 | |||
| 42 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 43 | |||
| 44 | * misc.texi (FFAP): Add C-x C-r, C-x C-v, C-x C-d, | ||
| 45 | C-x 4 r, C-x 4 d, C-x 5 r, C-x 5 d. | ||
| 46 | |||
| 47 | * dired.texi (Dired Navigation): Add @r{(Dired)} to M-g. | ||
| 48 | (Misc Dired Commands): Add @r{(Dired)} to w. | ||
| 49 | |||
| 50 | 2004-12-12 Juri Linkov <juri@jurta.org> | ||
| 51 | |||
| 52 | * mark.texi (Marking Objects): Marking commands also extend the | ||
| 53 | region when mark is active in Transient Mark mode. | ||
| 54 | |||
| 1 | 2004-12-09 Luc Teirlinck <teirllm@auburn.edu> | 55 | 2004-12-09 Luc Teirlinck <teirllm@auburn.edu> |
| 2 | 56 | ||
| 3 | * reftex.texi (Imprint): Remove erroneous @value's. | 57 | * reftex.texi (Imprint): Remove erroneous @value's. |
| @@ -133,6 +187,13 @@ | |||
| 133 | to Alex Ott, Karl Fogel, Stefan Monnier, and David Kastrup for | 187 | to Alex Ott, Karl Fogel, Stefan Monnier, and David Kastrup for |
| 134 | suggestions. | 188 | suggestions. |
| 135 | 189 | ||
| 190 | 2004-12-08 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 191 | |||
| 192 | * gnus-faq.texi ([5.1]): Added missing bracket. | ||
| 193 | |||
| 194 | * gnus.texi (Filtering Spam Using The Spam ELisp Package): Index | ||
| 195 | `spam-initialize'. | ||
| 196 | |||
| 136 | 2004-11-22 Reiner Steib <Reiner.Steib@gmx.de> | 197 | 2004-11-22 Reiner Steib <Reiner.Steib@gmx.de> |
| 137 | 198 | ||
| 138 | * message.texi (Various Message Variables): Mention that all mail | 199 | * message.texi (Various Message Variables): Mention that all mail |
| @@ -140,11 +201,6 @@ | |||
| 140 | 201 | ||
| 141 | * gnus.texi (Splitting Mail): Clarify bogus group. | 202 | * gnus.texi (Splitting Mail): Clarify bogus group. |
| 142 | 203 | ||
| 143 | 2004-11-16 Reiner Steib <Reiner.Steib@gmx.de> | ||
| 144 | |||
| 145 | * gnus.texi (Filtering Spam Using The Spam ELisp Package): Index | ||
| 146 | `spam-initialize'. | ||
| 147 | |||
| 148 | 2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org> | 204 | 2004-11-02 Katsumi Yamaoka <yamaoka@jpl.org> |
| 149 | 205 | ||
| 150 | * emacs-mime.texi (Encoding Customization): Fix | 206 | * emacs-mime.texi (Encoding Customization): Fix |
diff --git a/man/calc.texi b/man/calc.texi index 027ebc7c960..8260ed10350 100644 --- a/man/calc.texi +++ b/man/calc.texi | |||
| @@ -13,28 +13,20 @@ | |||
| 13 | @c @infoline foo | 13 | @c @infoline foo |
| 14 | @c `foo' will appear only in non-TeX output | 14 | @c `foo' will appear only in non-TeX output |
| 15 | 15 | ||
| 16 | @c In TeX output, @tmath{expr} will typeset expr in math mode. | 16 | @c @expr{expr} will typeset an expression; |
| 17 | @c In any output, @expr{expr} will typeset an expression; | ||
| 18 | @c $x$ in TeX, @samp{x} otherwise. | 17 | @c $x$ in TeX, @samp{x} otherwise. |
| 19 | 18 | ||
| 20 | @iftex | 19 | @iftex |
| 21 | @macro texline{stuff} | 20 | @macro texline{stuff} |
| 22 | \stuff\ | 21 | \stuff\ |
| 23 | @end macro | 22 | @end macro |
| 24 | @macro tmath{stuff} | ||
| 25 | @tex | ||
| 26 | $\stuff\$ | ||
| 27 | @end tex | ||
| 28 | @end macro | ||
| 29 | @alias infoline=comment | 23 | @alias infoline=comment |
| 30 | @c @alias expr=math | ||
| 31 | @tex | 24 | @tex |
| 32 | \gdef\expr#1{\tex | 25 | \gdef\exprsetup{\tex \let\t\ttfont \turnoffactive} |
| 33 | \let\t\ttfont | 26 | \gdef\expr{\exprsetup$\exprfinish} |
| 34 | \turnoffactive | 27 | \gdef\exprfinish#1{#1$\endgroup} |
| 35 | $#1$ | ||
| 36 | \endgroup} | ||
| 37 | @end tex | 28 | @end tex |
| 29 | @alias mathit=expr | ||
| 38 | @macro cpi{} | 30 | @macro cpi{} |
| 39 | @math{@pi{}} | 31 | @math{@pi{}} |
| 40 | @end macro | 32 | @end macro |
| @@ -49,6 +41,7 @@ $\stuff\$ | |||
| 49 | \stuff\ | 41 | \stuff\ |
| 50 | @end macro | 42 | @end macro |
| 51 | @alias expr=samp | 43 | @alias expr=samp |
| 44 | @alias mathit=i | ||
| 52 | @macro cpi{} | 45 | @macro cpi{} |
| 53 | @expr{pi} | 46 | @expr{pi} |
| 54 | @end macro | 47 | @end macro |
| @@ -470,7 +463,7 @@ Algebraic manipulation features, including symbolic calculus. | |||
| 470 | Moving data to and from regular editing buffers. | 463 | Moving data to and from regular editing buffers. |
| 471 | 464 | ||
| 472 | @item | 465 | @item |
| 473 | ``Embedded mode'' for manipulating Calc formulas and data directly | 466 | Embedded mode for manipulating Calc formulas and data directly |
| 474 | inside any editing buffer. | 467 | inside any editing buffer. |
| 475 | 468 | ||
| 476 | @item | 469 | @item |
| @@ -624,12 +617,12 @@ then the command to operate on the numbers. | |||
| 624 | 617 | ||
| 625 | @noindent | 618 | @noindent |
| 626 | Type @kbd{2 @key{RET} 3 + Q} to compute | 619 | Type @kbd{2 @key{RET} 3 + Q} to compute |
| 627 | @texline @tmath{\sqrt{2+3} = 2.2360679775}. | 620 | @texline @math{\sqrt{2+3} = 2.2360679775}. |
| 628 | @infoline the square root of 2+3, which is 2.2360679775. | 621 | @infoline the square root of 2+3, which is 2.2360679775. |
| 629 | 622 | ||
| 630 | @noindent | 623 | @noindent |
| 631 | Type @kbd{P 2 ^} to compute | 624 | Type @kbd{P 2 ^} to compute |
| 632 | @texline @tmath{\pi^2 = 9.86960440109}. | 625 | @texline @math{\pi^2 = 9.86960440109}. |
| 633 | @infoline the value of `pi' squared, 9.86960440109. | 626 | @infoline the value of `pi' squared, 9.86960440109. |
| 634 | 627 | ||
| 635 | @noindent | 628 | @noindent |
| @@ -648,12 +641,12 @@ use the apostrophe key. | |||
| 648 | 641 | ||
| 649 | @noindent | 642 | @noindent |
| 650 | Type @kbd{' sqrt(2+3) @key{RET}} to compute | 643 | Type @kbd{' sqrt(2+3) @key{RET}} to compute |
| 651 | @texline @tmath{\sqrt{2+3}}. | 644 | @texline @math{\sqrt{2+3}}. |
| 652 | @infoline the square root of 2+3. | 645 | @infoline the square root of 2+3. |
| 653 | 646 | ||
| 654 | @noindent | 647 | @noindent |
| 655 | Type @kbd{' pi^2 @key{RET}} to enter | 648 | Type @kbd{' pi^2 @key{RET}} to enter |
| 656 | @texline @tmath{\pi^2}. | 649 | @texline @math{\pi^2}. |
| 657 | @infoline `pi' squared. | 650 | @infoline `pi' squared. |
| 658 | To evaluate this symbolic formula as a number, type @kbd{=}. | 651 | To evaluate this symbolic formula as a number, type @kbd{=}. |
| 659 | 652 | ||
| @@ -713,10 +706,10 @@ the lower-right @samp{8} and press @kbd{M-# r}. | |||
| 713 | 706 | ||
| 714 | @noindent | 707 | @noindent |
| 715 | Type @kbd{v t} to transpose this | 708 | Type @kbd{v t} to transpose this |
| 716 | @texline @tmath{3\times2} | 709 | @texline @math{3\times2} |
| 717 | @infoline 3x2 | 710 | @infoline 3x2 |
| 718 | matrix into a | 711 | matrix into a |
| 719 | @texline @tmath{2\times3} | 712 | @texline @math{2\times3} |
| 720 | @infoline 2x3 | 713 | @infoline 2x3 |
| 721 | matrix. Type @w{@kbd{v u}} to unpack the rows into two separate | 714 | matrix. Type @w{@kbd{v u}} to unpack the rows into two separate |
| 722 | vectors. Now type @w{@kbd{V R + @key{TAB} V R +}} to compute the sums | 715 | vectors. Now type @w{@kbd{V R + @key{TAB} V R +}} to compute the sums |
| @@ -773,7 +766,7 @@ To exit from Calc, press @kbd{q} or @kbd{M-# c} again. | |||
| 773 | @noindent | 766 | @noindent |
| 774 | Calc has several user interfaces that are specialized for | 767 | Calc has several user interfaces that are specialized for |
| 775 | different kinds of tasks. As well as Calc's standard interface, | 768 | different kinds of tasks. As well as Calc's standard interface, |
| 776 | there are Quick Mode, Keypad Mode, and Embedded Mode. | 769 | there are Quick mode, Keypad mode, and Embedded mode. |
| 777 | 770 | ||
| 778 | @menu | 771 | @menu |
| 779 | * Starting Calc:: | 772 | * Starting Calc:: |
| @@ -808,7 +801,7 @@ doesn't matter for @kbd{M-#}) that says which Calc interface you | |||
| 808 | want to use. | 801 | want to use. |
| 809 | 802 | ||
| 810 | To get Calc's standard interface, type @kbd{M-# c}. To get | 803 | To get Calc's standard interface, type @kbd{M-# c}. To get |
| 811 | Keypad Mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief | 804 | Keypad mode, type @kbd{M-# k}. Type @kbd{M-# ?} to get a brief |
| 812 | list of the available options, and type a second @kbd{?} to get | 805 | list of the available options, and type a second @kbd{?} to get |
| 813 | a complete list. | 806 | a complete list. |
| 814 | 807 | ||
| @@ -821,7 +814,7 @@ function key twice is just like hitting @kbd{M-# M-#}.) | |||
| 821 | 814 | ||
| 822 | If @kbd{M-#} doesn't work for you, you can always type explicit | 815 | If @kbd{M-#} doesn't work for you, you can always type explicit |
| 823 | commands like @kbd{M-x calc} (for the standard user interface) or | 816 | commands like @kbd{M-x calc} (for the standard user interface) or |
| 824 | @w{@kbd{M-x calc-keypad}} (for Keypad Mode). First type @kbd{M-x} | 817 | @w{@kbd{M-x calc-keypad}} (for Keypad mode). First type @kbd{M-x} |
| 825 | (that's Meta with the letter @kbd{x}), then, at the prompt, | 818 | (that's Meta with the letter @kbd{x}), then, at the prompt, |
| 826 | type the full command (like @kbd{calc-keypad}) and press Return. | 819 | type the full command (like @kbd{calc-keypad}) and press Return. |
| 827 | 820 | ||
| @@ -867,9 +860,9 @@ you do. | |||
| 867 | 860 | ||
| 868 | In this case, the trail shows that four numbers (17.3, 3, 2, and 4) | 861 | In this case, the trail shows that four numbers (17.3, 3, 2, and 4) |
| 869 | were first entered into the Calculator, then the 2 and 4 were | 862 | were first entered into the Calculator, then the 2 and 4 were |
| 870 | multiplied to get 8, then the 3 and 8 were subtracted to get @i{-5}. | 863 | multiplied to get 8, then the 3 and 8 were subtracted to get @mathit{-5}. |
| 871 | (The @samp{>} symbol shows that this was the most recent calculation.) | 864 | (The @samp{>} symbol shows that this was the most recent calculation.) |
| 872 | The net result is the two numbers 17.3 and @i{-5} sitting on the stack. | 865 | The net result is the two numbers 17.3 and @mathit{-5} sitting on the stack. |
| 873 | 866 | ||
| 874 | Most Calculator commands deal explicitly with the stack only, but | 867 | Most Calculator commands deal explicitly with the stack only, but |
| 875 | there is a set of commands that allow you to search back through | 868 | there is a set of commands that allow you to search back through |
| @@ -924,20 +917,20 @@ way to switch out of Calc momentarily to edit your file; type | |||
| 924 | @subsection Quick Mode (Overview) | 917 | @subsection Quick Mode (Overview) |
| 925 | 918 | ||
| 926 | @noindent | 919 | @noindent |
| 927 | @dfn{Quick Mode} is a quick way to use Calc when you don't need the | 920 | @dfn{Quick mode} is a quick way to use Calc when you don't need the |
| 928 | full complexity of the stack and trail. To use it, type @kbd{M-# q} | 921 | full complexity of the stack and trail. To use it, type @kbd{M-# q} |
| 929 | (@code{quick-calc}) in any regular editing buffer. | 922 | (@code{quick-calc}) in any regular editing buffer. |
| 930 | 923 | ||
| 931 | Quick Mode is very simple: It prompts you to type any formula in | 924 | Quick mode is very simple: It prompts you to type any formula in |
| 932 | standard algebraic notation (like @samp{4 - 2/3}) and then displays | 925 | standard algebraic notation (like @samp{4 - 2/3}) and then displays |
| 933 | the result at the bottom of the Emacs screen (@i{3.33333333333} | 926 | the result at the bottom of the Emacs screen (@mathit{3.33333333333} |
| 934 | in this case). You are then back in the same editing buffer you | 927 | in this case). You are then back in the same editing buffer you |
| 935 | were in before, ready to continue editing or to type @kbd{M-# q} | 928 | were in before, ready to continue editing or to type @kbd{M-# q} |
| 936 | again to do another quick calculation. The result of the calculation | 929 | again to do another quick calculation. The result of the calculation |
| 937 | will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command | 930 | will also be in the Emacs ``kill ring'' so that a @kbd{C-y} command |
| 938 | at this point will yank the result into your editing buffer. | 931 | at this point will yank the result into your editing buffer. |
| 939 | 932 | ||
| 940 | Calc mode settings affect Quick Mode, too, though you will have to | 933 | Calc mode settings affect Quick mode, too, though you will have to |
| 941 | go into regular Calc (with @kbd{M-# c}) to change the mode settings. | 934 | go into regular Calc (with @kbd{M-# c}) to change the mode settings. |
| 942 | 935 | ||
| 943 | @c [fix-ref Quick Calculator mode] | 936 | @c [fix-ref Quick Calculator mode] |
| @@ -947,12 +940,12 @@ go into regular Calc (with @kbd{M-# c}) to change the mode settings. | |||
| 947 | @subsection Keypad Mode (Overview) | 940 | @subsection Keypad Mode (Overview) |
| 948 | 941 | ||
| 949 | @noindent | 942 | @noindent |
| 950 | @dfn{Keypad Mode} is a mouse-based interface to the Calculator. | 943 | @dfn{Keypad mode} is a mouse-based interface to the Calculator. |
| 951 | It is designed for use with terminals that support a mouse. If you | 944 | It is designed for use with terminals that support a mouse. If you |
| 952 | don't have a mouse, you will have to operate keypad mode with your | 945 | don't have a mouse, you will have to operate Keypad mode with your |
| 953 | arrow keys (which is probably more trouble than it's worth). | 946 | arrow keys (which is probably more trouble than it's worth). |
| 954 | 947 | ||
| 955 | Type @kbd{M-# k} to turn Keypad Mode on or off. Once again you | 948 | Type @kbd{M-# k} to turn Keypad mode on or off. Once again you |
| 956 | get two new windows, this time on the righthand side of the screen | 949 | get two new windows, this time on the righthand side of the screen |
| 957 | instead of at the bottom. The upper window is the familiar Calc | 950 | instead of at the bottom. The upper window is the familiar Calc |
| 958 | Stack; the lower window is a picture of a typical calculator keypad. | 951 | Stack; the lower window is a picture of a typical calculator keypad. |
| @@ -988,12 +981,12 @@ Stack; the lower window is a picture of a typical calculator keypad. | |||
| 988 | |-----+-----+-----+-----+-----+ | 981 | |-----+-----+-----+-----+-----+ |
| 989 | @end smallexample | 982 | @end smallexample |
| 990 | 983 | ||
| 991 | Keypad Mode is much easier for beginners to learn, because there | 984 | Keypad mode is much easier for beginners to learn, because there |
| 992 | is no need to memorize lots of obscure key sequences. But not all | 985 | is no need to memorize lots of obscure key sequences. But not all |
| 993 | commands in regular Calc are available on the Keypad. You can | 986 | commands in regular Calc are available on the Keypad. You can |
| 994 | always switch the cursor into the Calc stack window to use | 987 | always switch the cursor into the Calc stack window to use |
| 995 | standard Calc commands if you need. Serious Calc users, though, | 988 | standard Calc commands if you need. Serious Calc users, though, |
| 996 | often find they prefer the standard interface over Keypad Mode. | 989 | often find they prefer the standard interface over Keypad mode. |
| 997 | 990 | ||
| 998 | To operate the Calculator, just click on the ``buttons'' of the | 991 | To operate the Calculator, just click on the ``buttons'' of the |
| 999 | keypad using your left mouse button. To enter the two numbers | 992 | keypad using your left mouse button. To enter the two numbers |
| @@ -1006,13 +999,13 @@ keypad change to show other sets of commands, such as advanced | |||
| 1006 | math functions, vector operations, and operations on binary | 999 | math functions, vector operations, and operations on binary |
| 1007 | numbers. | 1000 | numbers. |
| 1008 | 1001 | ||
| 1009 | Because Keypad Mode doesn't use the regular keyboard, Calc leaves | 1002 | Because Keypad mode doesn't use the regular keyboard, Calc leaves |
| 1010 | the cursor in your original editing buffer. You can type in | 1003 | the cursor in your original editing buffer. You can type in |
| 1011 | this buffer in the usual way while also clicking on the Calculator | 1004 | this buffer in the usual way while also clicking on the Calculator |
| 1012 | keypad. One advantage of Keypad Mode is that you don't need an | 1005 | keypad. One advantage of Keypad mode is that you don't need an |
| 1013 | explicit command to switch between editing and calculating. | 1006 | explicit command to switch between editing and calculating. |
| 1014 | 1007 | ||
| 1015 | If you press @kbd{M-# b} first, you get a full-screen Keypad Mode | 1008 | If you press @kbd{M-# b} first, you get a full-screen Keypad mode |
| 1016 | (@code{full-calc-keypad}) with three windows: The keypad in the lower | 1009 | (@code{full-calc-keypad}) with three windows: The keypad in the lower |
| 1017 | left, the stack in the lower right, and the trail on top. | 1010 | left, the stack in the lower right, and the trail on top. |
| 1018 | 1011 | ||
| @@ -1050,7 +1043,7 @@ itself. | |||
| 1050 | @subsection Embedded Mode (Overview) | 1043 | @subsection Embedded Mode (Overview) |
| 1051 | 1044 | ||
| 1052 | @noindent | 1045 | @noindent |
| 1053 | @dfn{Embedded Mode} is a way to use Calc directly from inside an | 1046 | @dfn{Embedded mode} is a way to use Calc directly from inside an |
| 1054 | editing buffer. Suppose you have a formula written as part of a | 1047 | editing buffer. Suppose you have a formula written as part of a |
| 1055 | document like this: | 1048 | document like this: |
| 1056 | 1049 | ||
| @@ -1067,7 +1060,7 @@ is | |||
| 1067 | @noindent | 1060 | @noindent |
| 1068 | and you wish to have Calc compute and format the derivative for | 1061 | and you wish to have Calc compute and format the derivative for |
| 1069 | you and store this derivative in the buffer automatically. To | 1062 | you and store this derivative in the buffer automatically. To |
| 1070 | do this with Embedded Mode, first copy the formula down to where | 1063 | do this with Embedded mode, first copy the formula down to where |
| 1071 | you want the result to be: | 1064 | you want the result to be: |
| 1072 | 1065 | ||
| 1073 | @smallexample | 1066 | @smallexample |
| @@ -1106,7 +1099,7 @@ is | |||
| 1106 | @end smallexample | 1099 | @end smallexample |
| 1107 | 1100 | ||
| 1108 | To make this look nicer, you might want to press @kbd{d =} to center | 1101 | To make this look nicer, you might want to press @kbd{d =} to center |
| 1109 | the formula, and even @kbd{d B} to use ``big'' display mode. | 1102 | the formula, and even @kbd{d B} to use Big display mode. |
| 1110 | 1103 | ||
| 1111 | @smallexample | 1104 | @smallexample |
| 1112 | @group | 1105 | @group |
| @@ -1146,7 +1139,7 @@ righthand label: Type @kbd{d @} (1) @key{RET}}. | |||
| 1146 | @end group | 1139 | @end group |
| 1147 | @end smallexample | 1140 | @end smallexample |
| 1148 | 1141 | ||
| 1149 | To leave Embedded Mode, type @kbd{M-# e} again. The mode line | 1142 | To leave Embedded mode, type @kbd{M-# e} again. The mode line |
| 1150 | and keyboard will revert to the way they were before. (If you have | 1143 | and keyboard will revert to the way they were before. (If you have |
| 1151 | actually been trying this as you read along, you'll want to press | 1144 | actually been trying this as you read along, you'll want to press |
| 1152 | @kbd{M-# 0} [with the digit zero] now to reset the modes you changed.) | 1145 | @kbd{M-# 0} [with the digit zero] now to reset the modes you changed.) |
| @@ -1161,7 +1154,7 @@ A slope of one-third corresponds to an angle of 1 degrees. | |||
| 1161 | @end smallexample | 1154 | @end smallexample |
| 1162 | 1155 | ||
| 1163 | Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable | 1156 | Place the cursor on the @samp{1}, then type @kbd{M-# w} to enable |
| 1164 | Embedded Mode on that number. Now type @kbd{3 /} (to get one-third), | 1157 | Embedded mode on that number. Now type @kbd{3 /} (to get one-third), |
| 1165 | and @kbd{I T} (the Inverse Tangent converts a slope into an angle), | 1158 | and @kbd{I T} (the Inverse Tangent converts a slope into an angle), |
| 1166 | then @w{@kbd{M-# w}} again to exit Embedded mode. | 1159 | then @w{@kbd{M-# w}} again to exit Embedded mode. |
| 1167 | 1160 | ||
| @@ -1228,7 +1221,7 @@ move it out of that window. | |||
| 1228 | Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen. | 1221 | Control whether @kbd{M-# c} and @kbd{M-# k} use the full screen. |
| 1229 | 1222 | ||
| 1230 | @item Q | 1223 | @item Q |
| 1231 | Use Quick Mode for a single short calculation. | 1224 | Use Quick mode for a single short calculation. |
| 1232 | 1225 | ||
| 1233 | @item K | 1226 | @item K |
| 1234 | Turn Calc Keypad mode on or off. | 1227 | Turn Calc Keypad mode on or off. |
| @@ -1277,7 +1270,7 @@ Yank a value from the Calculator into the current editing buffer. | |||
| 1277 | @end iftex | 1270 | @end iftex |
| 1278 | 1271 | ||
| 1279 | @noindent | 1272 | @noindent |
| 1280 | Commands for use with Embedded Mode: | 1273 | Commands for use with Embedded mode: |
| 1281 | 1274 | ||
| 1282 | @table @kbd | 1275 | @table @kbd |
| 1283 | @item A | 1276 | @item A |
| @@ -1343,7 +1336,7 @@ With any prefix argument, reset everything but the stack. | |||
| 1343 | Calc was originally started as a two-week project to occupy a lull | 1336 | Calc was originally started as a two-week project to occupy a lull |
| 1344 | in the author's schedule. Basically, a friend asked if I remembered | 1337 | in the author's schedule. Basically, a friend asked if I remembered |
| 1345 | the value of | 1338 | the value of |
| 1346 | @texline @tmath{2^{32}}. | 1339 | @texline @math{2^{32}}. |
| 1347 | @infoline @expr{2^32}. | 1340 | @infoline @expr{2^32}. |
| 1348 | I didn't offhand, but I said, ``that's easy, just call up an | 1341 | I didn't offhand, but I said, ``that's easy, just call up an |
| 1349 | @code{xcalc}.'' @code{Xcalc} duly reported that the answer to our | 1342 | @code{xcalc}.'' @code{Xcalc} duly reported that the answer to our |
| @@ -1485,9 +1478,9 @@ to skip on to the rest of this manual. | |||
| 1485 | 1478 | ||
| 1486 | @c [fix-ref Embedded Mode] | 1479 | @c [fix-ref Embedded Mode] |
| 1487 | This tutorial describes the standard user interface of Calc only. | 1480 | This tutorial describes the standard user interface of Calc only. |
| 1488 | The ``Quick Mode'' and ``Keypad Mode'' interfaces are fairly | 1481 | The Quick mode and Keypad mode interfaces are fairly |
| 1489 | self-explanatory. @xref{Embedded Mode}, for a description of | 1482 | self-explanatory. @xref{Embedded Mode}, for a description of |
| 1490 | the ``Embedded Mode'' interface. | 1483 | the Embedded mode interface. |
| 1491 | 1484 | ||
| 1492 | @ifinfo | 1485 | @ifinfo |
| 1493 | The easiest way to read this tutorial on-line is to have two windows on | 1486 | The easiest way to read this tutorial on-line is to have two windows on |
| @@ -1665,7 +1658,7 @@ multiplication.) Figure it out by hand, then try it with Calc to see | |||
| 1665 | if you're right. @xref{RPN Answer 1, 1}. (@bullet{}) | 1658 | if you're right. @xref{RPN Answer 1, 1}. (@bullet{}) |
| 1666 | 1659 | ||
| 1667 | (@bullet{}) @strong{Exercise 2.} Compute | 1660 | (@bullet{}) @strong{Exercise 2.} Compute |
| 1668 | @texline @tmath{(2\times4) + (7\times9.4) + {5\over4}} | 1661 | @texline @math{(2\times4) + (7\times9.4) + {5\over4}} |
| 1669 | @infoline @expr{2*4 + 7*9.5 + 5/4} | 1662 | @infoline @expr{2*4 + 7*9.5 + 5/4} |
| 1670 | using the stack. @xref{RPN Answer 2, 2}. (@bullet{}) | 1663 | using the stack. @xref{RPN Answer 2, 2}. (@bullet{}) |
| 1671 | 1664 | ||
| @@ -1947,8 +1940,8 @@ entire stack.) | |||
| 1947 | 1940 | ||
| 1948 | @noindent | 1941 | @noindent |
| 1949 | If you are not used to RPN notation, you may prefer to operate the | 1942 | If you are not used to RPN notation, you may prefer to operate the |
| 1950 | Calculator in ``algebraic mode,'' which is closer to the way | 1943 | Calculator in Algebraic mode, which is closer to the way |
| 1951 | non-RPN calculators work. In algebraic mode, you enter formulas | 1944 | non-RPN calculators work. In Algebraic mode, you enter formulas |
| 1952 | in traditional @expr{2+3} notation. | 1945 | in traditional @expr{2+3} notation. |
| 1953 | 1946 | ||
| 1954 | You don't really need any special ``mode'' to enter algebraic formulas. | 1947 | You don't really need any special ``mode'' to enter algebraic formulas. |
| @@ -2000,7 +1993,7 @@ $$ 2 + { 3 \times 4 \times 5 \over 6 \times 7^8 } - 9 $$ | |||
| 2000 | @end tex | 1993 | @end tex |
| 2001 | 1994 | ||
| 2002 | @noindent | 1995 | @noindent |
| 2003 | The result of this expression will be the number @i{-6.99999826533}. | 1996 | The result of this expression will be the number @mathit{-6.99999826533}. |
| 2004 | 1997 | ||
| 2005 | Calc's order of evaluation is the same as for most computer languages, | 1998 | Calc's order of evaluation is the same as for most computer languages, |
| 2006 | except that @samp{*} binds more strongly than @samp{/}, as the above | 1999 | except that @samp{*} binds more strongly than @samp{/}, as the above |
| @@ -2009,18 +2002,18 @@ can often be omitted: @samp{2 a} is the same as @samp{2*a}. | |||
| 2009 | 2002 | ||
| 2010 | Operators at the same level are evaluated from left to right, except | 2003 | Operators at the same level are evaluated from left to right, except |
| 2011 | that @samp{^} is evaluated from right to left. Thus, @samp{2-3-4} is | 2004 | that @samp{^} is evaluated from right to left. Thus, @samp{2-3-4} is |
| 2012 | equivalent to @samp{(2-3)-4} or @i{-5}, whereas @samp{2^3^4} is equivalent | 2005 | equivalent to @samp{(2-3)-4} or @mathit{-5}, whereas @samp{2^3^4} is equivalent |
| 2013 | to @samp{2^(3^4)} (a very large integer; try it!). | 2006 | to @samp{2^(3^4)} (a very large integer; try it!). |
| 2014 | 2007 | ||
| 2015 | If you tire of typing the apostrophe all the time, there is an | 2008 | If you tire of typing the apostrophe all the time, there is |
| 2016 | ``algebraic mode'' you can select in which Calc automatically senses | 2009 | Algebraic mode, where Calc automatically senses |
| 2017 | when you are about to type an algebraic expression. To enter this | 2010 | when you are about to type an algebraic expression. To enter this |
| 2018 | mode, press the two letters @w{@kbd{m a}}. (An @samp{Alg} indicator | 2011 | mode, press the two letters @w{@kbd{m a}}. (An @samp{Alg} indicator |
| 2019 | should appear in the Calc window's mode line.) | 2012 | should appear in the Calc window's mode line.) |
| 2020 | 2013 | ||
| 2021 | Press @kbd{m a}, then @kbd{2+3+4} with no apostrophe, then @key{RET}. | 2014 | Press @kbd{m a}, then @kbd{2+3+4} with no apostrophe, then @key{RET}. |
| 2022 | 2015 | ||
| 2023 | In algebraic mode, when you press any key that would normally begin | 2016 | In Algebraic mode, when you press any key that would normally begin |
| 2024 | entering a number (such as a digit, a decimal point, or the @kbd{_} | 2017 | entering a number (such as a digit, a decimal point, or the @kbd{_} |
| 2025 | key), or if you press @kbd{(} or @kbd{[}, Calc automatically begins | 2018 | key), or if you press @kbd{(} or @kbd{[}, Calc automatically begins |
| 2026 | an algebraic entry. | 2019 | an algebraic entry. |
| @@ -2035,7 +2028,7 @@ Press the apostrophe, then type @kbd{sqrt(5*2) - 3}. The result should | |||
| 2035 | be @expr{0.16227766017}. | 2028 | be @expr{0.16227766017}. |
| 2036 | 2029 | ||
| 2037 | Note that if the formula begins with a function name, you need to use | 2030 | Note that if the formula begins with a function name, you need to use |
| 2038 | the apostrophe even if you are in algebraic mode. If you type @kbd{arcsin} | 2031 | the apostrophe even if you are in Algebraic mode. If you type @kbd{arcsin} |
| 2039 | out of the blue, the @kbd{a r} will be taken as an Algebraic Rewrite | 2032 | out of the blue, the @kbd{a r} will be taken as an Algebraic Rewrite |
| 2040 | command, and the @kbd{csin} will be taken as the name of the rewrite | 2033 | command, and the @kbd{csin} will be taken as the name of the rewrite |
| 2041 | rule to use! | 2034 | rule to use! |
| @@ -2044,7 +2037,7 @@ Some people prefer to enter complex numbers and vectors in algebraic | |||
| 2044 | form because they find RPN entry with incomplete objects to be too | 2037 | form because they find RPN entry with incomplete objects to be too |
| 2045 | distracting, even though they otherwise use Calc as an RPN calculator. | 2038 | distracting, even though they otherwise use Calc as an RPN calculator. |
| 2046 | 2039 | ||
| 2047 | Still in algebraic mode, type: | 2040 | Still in Algebraic mode, type: |
| 2048 | 2041 | ||
| 2049 | @smallexample | 2042 | @smallexample |
| 2050 | @group | 2043 | @group |
| @@ -2060,15 +2053,15 @@ Algebraic mode allows us to enter complex numbers without pressing | |||
| 2060 | an apostrophe first, but it also means we need to press @key{RET} | 2053 | an apostrophe first, but it also means we need to press @key{RET} |
| 2061 | after every entry, even for a simple number like @expr{1}. | 2054 | after every entry, even for a simple number like @expr{1}. |
| 2062 | 2055 | ||
| 2063 | (You can type @kbd{C-u m a} to enable a special ``incomplete algebraic | 2056 | (You can type @kbd{C-u m a} to enable a special Incomplete Algebraic |
| 2064 | mode'' in which the @kbd{(} and @kbd{[} keys use algebraic entry even | 2057 | mode in which the @kbd{(} and @kbd{[} keys use algebraic entry even |
| 2065 | though regular numeric keys still use RPN numeric entry. There is also | 2058 | though regular numeric keys still use RPN numeric entry. There is also |
| 2066 | a ``total algebraic mode,'' started by typing @kbd{m t}, in which all | 2059 | Total Algebraic mode, started by typing @kbd{m t}, in which all |
| 2067 | normal keys begin algebraic entry. You must then use the @key{META} key | 2060 | normal keys begin algebraic entry. You must then use the @key{META} key |
| 2068 | to type Calc commands: @kbd{M-m t} to get back out of total algebraic | 2061 | to type Calc commands: @kbd{M-m t} to get back out of Total Algebraic |
| 2069 | mode, @kbd{M-q} to quit, etc.) | 2062 | mode, @kbd{M-q} to quit, etc.) |
| 2070 | 2063 | ||
| 2071 | If you're still in algebraic mode, press @kbd{m a} again to turn it off. | 2064 | If you're still in Algebraic mode, press @kbd{m a} again to turn it off. |
| 2072 | 2065 | ||
| 2073 | Actual non-RPN calculators use a mixture of algebraic and RPN styles. | 2066 | Actual non-RPN calculators use a mixture of algebraic and RPN styles. |
| 2074 | In general, operators of two numbers (like @kbd{+} and @kbd{*}) | 2067 | In general, operators of two numbers (like @kbd{+} and @kbd{*}) |
| @@ -2079,7 +2072,7 @@ accomplish this in Calc by performing your calculation as a series | |||
| 2079 | of algebraic entries, using the @kbd{$} sign to tie them together. | 2072 | of algebraic entries, using the @kbd{$} sign to tie them together. |
| 2080 | In an algebraic formula, @kbd{$} represents the number on the top | 2073 | In an algebraic formula, @kbd{$} represents the number on the top |
| 2081 | of the stack. Here, we perform the calculation | 2074 | of the stack. Here, we perform the calculation |
| 2082 | @texline @tmath{\sqrt{2\times4+1}}, | 2075 | @texline @math{\sqrt{2\times4+1}}, |
| 2083 | @infoline @expr{sqrt(2*4+1)}, | 2076 | @infoline @expr{sqrt(2*4+1)}, |
| 2084 | which on a traditional calculator would be done by pressing | 2077 | which on a traditional calculator would be done by pressing |
| 2085 | @kbd{2 * 4 + 1 =} and then the square-root key. | 2078 | @kbd{2 * 4 + 1 =} and then the square-root key. |
| @@ -2383,7 +2376,7 @@ during entry of a number or algebraic formula. | |||
| 2383 | @noindent | 2376 | @noindent |
| 2384 | Calc has many types of @dfn{modes} that affect the way it interprets | 2377 | Calc has many types of @dfn{modes} that affect the way it interprets |
| 2385 | your commands or the way it displays data. We have already seen one | 2378 | your commands or the way it displays data. We have already seen one |
| 2386 | mode, namely algebraic mode. There are many others, too; we'll | 2379 | mode, namely Algebraic mode. There are many others, too; we'll |
| 2387 | try some of the most common ones here. | 2380 | try some of the most common ones here. |
| 2388 | 2381 | ||
| 2389 | Perhaps the most fundamental mode in Calc is the current @dfn{precision}. | 2382 | Perhaps the most fundamental mode in Calc is the current @dfn{precision}. |
| @@ -2741,11 +2734,11 @@ angle is measured in degrees. For example, | |||
| 2741 | @noindent | 2734 | @noindent |
| 2742 | The shift-@kbd{S} command computes the sine of an angle. The sine | 2735 | The shift-@kbd{S} command computes the sine of an angle. The sine |
| 2743 | of 45 degrees is | 2736 | of 45 degrees is |
| 2744 | @texline @tmath{\sqrt{2}/2}; | 2737 | @texline @math{\sqrt{2}/2}; |
| 2745 | @infoline @expr{sqrt(2)/2}; | 2738 | @infoline @expr{sqrt(2)/2}; |
| 2746 | squaring this yields @expr{2/4 = 0.5}. However, there has been a slight | 2739 | squaring this yields @expr{2/4 = 0.5}. However, there has been a slight |
| 2747 | roundoff error because the representation of | 2740 | roundoff error because the representation of |
| 2748 | @texline @tmath{\sqrt{2}/2} | 2741 | @texline @math{\sqrt{2}/2} |
| 2749 | @infoline @expr{sqrt(2)/2} | 2742 | @infoline @expr{sqrt(2)/2} |
| 2750 | wasn't exact. The @kbd{c 1} command is a handy way to clean up numbers | 2743 | wasn't exact. The @kbd{c 1} command is a handy way to clean up numbers |
| 2751 | in this case; it temporarily reduces the precision by one digit while it | 2744 | in this case; it temporarily reduces the precision by one digit while it |
| @@ -2786,7 +2779,7 @@ either radians or degrees, depending on the current angular mode. | |||
| 2786 | 2779 | ||
| 2787 | @noindent | 2780 | @noindent |
| 2788 | Here we compute the Inverse Sine of | 2781 | Here we compute the Inverse Sine of |
| 2789 | @texline @tmath{\sqrt{0.5}}, | 2782 | @texline @math{\sqrt{0.5}}, |
| 2790 | @infoline @expr{sqrt(0.5)}, | 2783 | @infoline @expr{sqrt(0.5)}, |
| 2791 | first in radians, then in degrees. | 2784 | first in radians, then in degrees. |
| 2792 | 2785 | ||
| @@ -2802,7 +2795,7 @@ and vice-versa. | |||
| 2802 | @end group | 2795 | @end group |
| 2803 | @end smallexample | 2796 | @end smallexample |
| 2804 | 2797 | ||
| 2805 | Another interesting mode is @dfn{fraction mode}. Normally, | 2798 | Another interesting mode is @dfn{Fraction mode}. Normally, |
| 2806 | dividing two integers produces a floating-point result if the | 2799 | dividing two integers produces a floating-point result if the |
| 2807 | quotient can't be expressed as an exact integer. Fraction mode | 2800 | quotient can't be expressed as an exact integer. Fraction mode |
| 2808 | causes integer division to produce a fraction, i.e., a rational | 2801 | causes integer division to produce a fraction, i.e., a rational |
| @@ -2826,7 +2819,7 @@ You can enter a fraction at any time using @kbd{:} notation. | |||
| 2826 | (Calc uses @kbd{:} instead of @kbd{/} as the fraction separator | 2819 | (Calc uses @kbd{:} instead of @kbd{/} as the fraction separator |
| 2827 | because @kbd{/} is already used to divide the top two stack | 2820 | because @kbd{/} is already used to divide the top two stack |
| 2828 | elements.) Calculations involving fractions will always | 2821 | elements.) Calculations involving fractions will always |
| 2829 | produce exact fractional results; fraction mode only says | 2822 | produce exact fractional results; Fraction mode only says |
| 2830 | what to do when dividing two integers. | 2823 | what to do when dividing two integers. |
| 2831 | 2824 | ||
| 2832 | @cindex Fractions vs. floats | 2825 | @cindex Fractions vs. floats |
| @@ -2837,7 +2830,7 @@ why would you ever use floating-point numbers instead? | |||
| 2837 | 2830 | ||
| 2838 | Typing @kbd{m f} doesn't change any existing values in the stack. | 2831 | Typing @kbd{m f} doesn't change any existing values in the stack. |
| 2839 | In the above example, we had to Undo the division and do it over | 2832 | In the above example, we had to Undo the division and do it over |
| 2840 | again when we changed to fraction mode. But if you use the | 2833 | again when we changed to Fraction mode. But if you use the |
| 2841 | evaluates-to operator you can get commands like @kbd{m f} to | 2834 | evaluates-to operator you can get commands like @kbd{m f} to |
| 2842 | recompute for you. | 2835 | recompute for you. |
| 2843 | 2836 | ||
| @@ -2853,7 +2846,7 @@ recompute for you. | |||
| 2853 | @noindent | 2846 | @noindent |
| 2854 | In this example, the righthand side of the @samp{=>} operator | 2847 | In this example, the righthand side of the @samp{=>} operator |
| 2855 | on the stack is recomputed when we change the precision, then | 2848 | on the stack is recomputed when we change the precision, then |
| 2856 | again when we change to fraction mode. All @samp{=>} expressions | 2849 | again when we change to Fraction mode. All @samp{=>} expressions |
| 2857 | on the stack are recomputed every time you change any mode that | 2850 | on the stack are recomputed every time you change any mode that |
| 2858 | might affect their values. | 2851 | might affect their values. |
| 2859 | 2852 | ||
| @@ -2974,9 +2967,9 @@ logarithm). These can be modified by the @kbd{I} (inverse) and | |||
| 2974 | 2967 | ||
| 2975 | Let's compute the sine and cosine of an angle, and verify the | 2968 | Let's compute the sine and cosine of an angle, and verify the |
| 2976 | identity | 2969 | identity |
| 2977 | @texline @tmath{\sin^2x + \cos^2x = 1}. | 2970 | @texline @math{\sin^2x + \cos^2x = 1}. |
| 2978 | @infoline @expr{sin(x)^2 + cos(x)^2 = 1}. | 2971 | @infoline @expr{sin(x)^2 + cos(x)^2 = 1}. |
| 2979 | We'll arbitrarily pick @i{-64} degrees as a good value for @expr{x}. | 2972 | We'll arbitrarily pick @mathit{-64} degrees as a good value for @expr{x}. |
| 2980 | With the angular mode set to degrees (type @w{@kbd{m d}}), do: | 2973 | With the angular mode set to degrees (type @w{@kbd{m d}}), do: |
| 2981 | 2974 | ||
| 2982 | @smallexample | 2975 | @smallexample |
| @@ -2997,7 +2990,7 @@ Remember, @kbd{f h} is the @code{calc-hypot}, or square-root of sum | |||
| 2997 | of squares, command. | 2990 | of squares, command. |
| 2998 | 2991 | ||
| 2999 | Another identity is | 2992 | Another identity is |
| 3000 | @texline @tmath{\displaystyle\tan x = {\sin x \over \cos x}}. | 2993 | @texline @math{\displaystyle\tan x = {\sin x \over \cos x}}. |
| 3001 | @infoline @expr{tan(x) = sin(x) / cos(x)}. | 2994 | @infoline @expr{tan(x) = sin(x) / cos(x)}. |
| 3002 | @smallexample | 2995 | @smallexample |
| 3003 | @group | 2996 | @group |
| @@ -3012,7 +3005,7 @@ Another identity is | |||
| 3012 | 3005 | ||
| 3013 | A physical interpretation of this calculation is that if you move | 3006 | A physical interpretation of this calculation is that if you move |
| 3014 | @expr{0.89879} units downward and @expr{0.43837} units to the right, | 3007 | @expr{0.89879} units downward and @expr{0.43837} units to the right, |
| 3015 | your direction of motion is @i{-64} degrees from horizontal. Suppose | 3008 | your direction of motion is @mathit{-64} degrees from horizontal. Suppose |
| 3016 | we move in the opposite direction, up and to the left: | 3009 | we move in the opposite direction, up and to the left: |
| 3017 | 3010 | ||
| 3018 | @smallexample | 3011 | @smallexample |
| @@ -3060,7 +3053,7 @@ the top two stack elements right after the @kbd{U U}, then a pair of | |||
| 3060 | 3053 | ||
| 3061 | A similar identity is supposed to hold for hyperbolic sines and cosines, | 3054 | A similar identity is supposed to hold for hyperbolic sines and cosines, |
| 3062 | except that it is the @emph{difference} | 3055 | except that it is the @emph{difference} |
| 3063 | @texline @tmath{\cosh^2x - \sinh^2x} | 3056 | @texline @math{\cosh^2x - \sinh^2x} |
| 3064 | @infoline @expr{cosh(x)^2 - sinh(x)^2} | 3057 | @infoline @expr{cosh(x)^2 - sinh(x)^2} |
| 3065 | that always equals one. Let's try to verify this identity. | 3058 | that always equals one. Let's try to verify this identity. |
| 3066 | 3059 | ||
| @@ -3167,7 +3160,7 @@ in this case). | |||
| 3167 | 3160 | ||
| 3168 | If you take the factorial of a non-integer, Calc uses a generalized | 3161 | If you take the factorial of a non-integer, Calc uses a generalized |
| 3169 | factorial function defined in terms of Euler's Gamma function | 3162 | factorial function defined in terms of Euler's Gamma function |
| 3170 | @texline @tmath{\Gamma(n)} | 3163 | @texline @math{\Gamma(n)} |
| 3171 | @infoline @expr{gamma(n)} | 3164 | @infoline @expr{gamma(n)} |
| 3172 | (which is itself available as the @kbd{f g} command). | 3165 | (which is itself available as the @kbd{f g} command). |
| 3173 | 3166 | ||
| @@ -3184,13 +3177,13 @@ factorial function defined in terms of Euler's Gamma function | |||
| 3184 | 3177 | ||
| 3185 | @noindent | 3178 | @noindent |
| 3186 | Here we verify the identity | 3179 | Here we verify the identity |
| 3187 | @texline @tmath{n! = \Gamma(n+1)}. | 3180 | @texline @math{n! = \Gamma(n+1)}. |
| 3188 | @infoline @expr{@var{n}!@: = gamma(@var{n}+1)}. | 3181 | @infoline @expr{@var{n}!@: = gamma(@var{n}+1)}. |
| 3189 | 3182 | ||
| 3190 | The binomial coefficient @var{n}-choose-@var{m} | 3183 | The binomial coefficient @var{n}-choose-@var{m} |
| 3191 | @texline or @tmath{\displaystyle {n \choose m}} | 3184 | @texline or @math{\displaystyle {n \choose m}} |
| 3192 | is defined by | 3185 | is defined by |
| 3193 | @texline @tmath{\displaystyle {n! \over m! \, (n-m)!}} | 3186 | @texline @math{\displaystyle {n! \over m! \, (n-m)!}} |
| 3194 | @infoline @expr{n!@: / m!@: (n-m)!} | 3187 | @infoline @expr{n!@: / m!@: (n-m)!} |
| 3195 | for all reals @expr{n} and @expr{m}. The intermediate results in this | 3188 | for all reals @expr{n} and @expr{m}. The intermediate results in this |
| 3196 | formula can become quite large even if the final result is small; the | 3189 | formula can become quite large even if the final result is small; the |
| @@ -3475,7 +3468,7 @@ vector. | |||
| 3475 | 3468 | ||
| 3476 | (@bullet{}) @strong{Exercise 1.} Use @samp{*} to sum along the rows | 3469 | (@bullet{}) @strong{Exercise 1.} Use @samp{*} to sum along the rows |
| 3477 | of the above | 3470 | of the above |
| 3478 | @texline @tmath{2\times3} | 3471 | @texline @math{2\times3} |
| 3479 | @infoline 2x3 | 3472 | @infoline 2x3 |
| 3480 | matrix to get @expr{[6, 15]}. Now use @samp{*} to sum along the columns | 3473 | matrix to get @expr{[6, 15]}. Now use @samp{*} to sum along the columns |
| 3481 | to get @expr{[5, 7, 9]}. | 3474 | to get @expr{[5, 7, 9]}. |
| @@ -3626,10 +3619,10 @@ assume the vector was a row vector in order to make the dimensions | |||
| 3626 | come out right, and the answer would be incorrect. If you | 3619 | come out right, and the answer would be incorrect. If you |
| 3627 | don't feel safe letting Calc take either interpretation of your | 3620 | don't feel safe letting Calc take either interpretation of your |
| 3628 | vectors, use explicit | 3621 | vectors, use explicit |
| 3629 | @texline @tmath{N\times1} | 3622 | @texline @math{N\times1} |
| 3630 | @infoline Nx1 | 3623 | @infoline Nx1 |
| 3631 | or | 3624 | or |
| 3632 | @texline @tmath{1\times N} | 3625 | @texline @math{1\times N} |
| 3633 | @infoline 1xN | 3626 | @infoline 1xN |
| 3634 | matrices instead. In this case, you would enter the original column | 3627 | matrices instead. In this case, you would enter the original column |
| 3635 | vector as @samp{[[6], [2], [3]]} or @samp{[6; 2; 3]}. | 3628 | vector as @samp{[[6], [2], [3]]} or @samp{[6; 2; 3]}. |
| @@ -3678,7 +3671,7 @@ on the left by the transpose of @expr{A}: | |||
| 3678 | $A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}. | 3671 | $A^T A \, X = A^T B$, where $A^T$ is the transpose \samp{trn(A)}. |
| 3679 | @end tex | 3672 | @end tex |
| 3680 | Now | 3673 | Now |
| 3681 | @texline @tmath{A^T A} | 3674 | @texline @math{A^T A} |
| 3682 | @infoline @expr{trn(A)*A} | 3675 | @infoline @expr{trn(A)*A} |
| 3683 | is a square matrix so a solution is possible. It turns out that the | 3676 | is a square matrix so a solution is possible. It turns out that the |
| 3684 | @expr{X} vector you compute in this way will be a ``least-squares'' | 3677 | @expr{X} vector you compute in this way will be a ``least-squares'' |
| @@ -3774,7 +3767,7 @@ of each element. | |||
| 3774 | 3767 | ||
| 3775 | (@bullet{}) @strong{Exercise 1.} Compute a vector of powers of two | 3768 | (@bullet{}) @strong{Exercise 1.} Compute a vector of powers of two |
| 3776 | from | 3769 | from |
| 3777 | @texline @tmath{2^{-4}} | 3770 | @texline @math{2^{-4}} |
| 3778 | @infoline @expr{2^-4} | 3771 | @infoline @expr{2^-4} |
| 3779 | to @expr{2^4}. @xref{List Answer 1, 1}. (@bullet{}) | 3772 | to @expr{2^4}. @xref{List Answer 1, 1}. (@bullet{}) |
| 3780 | 3773 | ||
| @@ -3978,7 +3971,7 @@ $$ m = {N \sum x y - \sum x \sum y \over | |||
| 3978 | 3971 | ||
| 3979 | @noindent | 3972 | @noindent |
| 3980 | where | 3973 | where |
| 3981 | @texline @tmath{\sum x} | 3974 | @texline @math{\sum x} |
| 3982 | @infoline @expr{sum(x)} | 3975 | @infoline @expr{sum(x)} |
| 3983 | represents the sum of all the values of @expr{x}. While there is an | 3976 | represents the sum of all the values of @expr{x}. While there is an |
| 3984 | actual @code{sum} function in Calc, it's easier to sum a vector using a | 3977 | actual @code{sum} function in Calc, it's easier to sum a vector using a |
| @@ -4083,7 +4076,7 @@ $$ b = {\sum y - m \sum x \over N} $$ | |||
| 4083 | @end smallexample | 4076 | @end smallexample |
| 4084 | 4077 | ||
| 4085 | Let's ``plot'' this straight line approximation, | 4078 | Let's ``plot'' this straight line approximation, |
| 4086 | @texline @tmath{y \approx m x + b}, | 4079 | @texline @math{y \approx m x + b}, |
| 4087 | @infoline @expr{m x + b}, | 4080 | @infoline @expr{m x + b}, |
| 4088 | and compare it with the original data. | 4081 | and compare it with the original data. |
| 4089 | 4082 | ||
| @@ -4336,7 +4329,7 @@ command to enable multi-line display of vectors.) | |||
| 4336 | @cindex Maximizing a function over a list of values | 4329 | @cindex Maximizing a function over a list of values |
| 4337 | @c [fix-ref Numerical Solutions] | 4330 | @c [fix-ref Numerical Solutions] |
| 4338 | (@bullet{}) @strong{Exercise 8.} Compute a list of values of Bessel's | 4331 | (@bullet{}) @strong{Exercise 8.} Compute a list of values of Bessel's |
| 4339 | @texline @tmath{J_1(x)} | 4332 | @texline @math{J_1(x)} |
| 4340 | @infoline @expr{J1} | 4333 | @infoline @expr{J1} |
| 4341 | function @samp{besJ(1,x)} for @expr{x} from 0 to 5 in steps of 0.25. | 4334 | function @samp{besJ(1,x)} for @expr{x} from 0 to 5 in steps of 0.25. |
| 4342 | Find the value of @expr{x} (from among the above set of values) for | 4335 | Find the value of @expr{x} (from among the above set of values) for |
| @@ -4348,7 +4341,7 @@ of thing automatically; @pxref{Numerical Solutions}.) | |||
| 4348 | 4341 | ||
| 4349 | @cindex Digits, vectors of | 4342 | @cindex Digits, vectors of |
| 4350 | (@bullet{}) @strong{Exercise 9.} You are given an integer in the range | 4343 | (@bullet{}) @strong{Exercise 9.} You are given an integer in the range |
| 4351 | @texline @tmath{0 \le N < 10^m} | 4344 | @texline @math{0 \le N < 10^m} |
| 4352 | @infoline @expr{0 <= N < 10^m} | 4345 | @infoline @expr{0 <= N < 10^m} |
| 4353 | for @expr{m=12} (i.e., an integer of less than | 4346 | for @expr{m=12} (i.e., an integer of less than |
| 4354 | twelve digits). Convert this integer into a vector of @expr{m} | 4347 | twelve digits). Convert this integer into a vector of @expr{m} |
| @@ -4364,14 +4357,14 @@ happened? How would you do this test? @xref{List Answer 10, 10}. (@bullet{}) | |||
| 4364 | 4357 | ||
| 4365 | (@bullet{}) @strong{Exercise 11.} The area of a circle of radius one | 4358 | (@bullet{}) @strong{Exercise 11.} The area of a circle of radius one |
| 4366 | is @cpi{}. The area of the | 4359 | is @cpi{}. The area of the |
| 4367 | @texline @tmath{2\times2} | 4360 | @texline @math{2\times2} |
| 4368 | @infoline 2x2 | 4361 | @infoline 2x2 |
| 4369 | square that encloses that circle is 4. So if we throw @var{n} darts at | 4362 | square that encloses that circle is 4. So if we throw @var{n} darts at |
| 4370 | random points in the square, about @cpiover{4} of them will land inside | 4363 | random points in the square, about @cpiover{4} of them will land inside |
| 4371 | the circle. This gives us an entertaining way to estimate the value of | 4364 | the circle. This gives us an entertaining way to estimate the value of |
| 4372 | @cpi{}. The @w{@kbd{k r}} | 4365 | @cpi{}. The @w{@kbd{k r}} |
| 4373 | command picks a random number between zero and the value on the stack. | 4366 | command picks a random number between zero and the value on the stack. |
| 4374 | We could get a random floating-point number between @i{-1} and 1 by typing | 4367 | We could get a random floating-point number between @mathit{-1} and 1 by typing |
| 4375 | @w{@kbd{2.0 k r 1 -}}. Build a vector of 100 random @expr{(x,y)} points in | 4368 | @w{@kbd{2.0 k r 1 -}}. Build a vector of 100 random @expr{(x,y)} points in |
| 4376 | this square, then use vector mapping and reduction to count how many | 4369 | this square, then use vector mapping and reduction to count how many |
| 4377 | points lie inside the unit circle. Hint: Use the @kbd{v b} command. | 4370 | points lie inside the unit circle. Hint: Use the @kbd{v b} command. |
| @@ -4383,12 +4376,12 @@ another way to calculate @cpi{}. Say you have an infinite field | |||
| 4383 | of vertical lines with a spacing of one inch. Toss a one-inch matchstick | 4376 | of vertical lines with a spacing of one inch. Toss a one-inch matchstick |
| 4384 | onto the field. The probability that the matchstick will land crossing | 4377 | onto the field. The probability that the matchstick will land crossing |
| 4385 | a line turns out to be | 4378 | a line turns out to be |
| 4386 | @texline @tmath{2/\pi}. | 4379 | @texline @math{2/\pi}. |
| 4387 | @infoline @expr{2/pi}. | 4380 | @infoline @expr{2/pi}. |
| 4388 | Toss 100 matchsticks to estimate @cpi{}. (If you want still more fun, | 4381 | Toss 100 matchsticks to estimate @cpi{}. (If you want still more fun, |
| 4389 | the probability that the GCD (@w{@kbd{k g}}) of two large integers is | 4382 | the probability that the GCD (@w{@kbd{k g}}) of two large integers is |
| 4390 | one turns out to be | 4383 | one turns out to be |
| 4391 | @texline @tmath{6/\pi^2}. | 4384 | @texline @math{6/\pi^2}. |
| 4392 | @infoline @expr{6/pi^2}. | 4385 | @infoline @expr{6/pi^2}. |
| 4393 | That provides yet another way to estimate @cpi{}.) | 4386 | That provides yet another way to estimate @cpi{}.) |
| 4394 | @xref{List Answer 12, 12}. (@bullet{}) | 4387 | @xref{List Answer 12, 12}. (@bullet{}) |
| @@ -4418,7 +4411,7 @@ value and a number of steps @var{n} from the stack; it then applies the | |||
| 4418 | function you give to the starting value 0, 1, 2, up to @var{n} times | 4411 | function you give to the starting value 0, 1, 2, up to @var{n} times |
| 4419 | and returns a vector of the results. Use this command to create a | 4412 | and returns a vector of the results. Use this command to create a |
| 4420 | ``random walk'' of 50 steps. Start with the two-dimensional point | 4413 | ``random walk'' of 50 steps. Start with the two-dimensional point |
| 4421 | @expr{(0,0)}; then take one step a random distance between @i{-1} and 1 | 4414 | @expr{(0,0)}; then take one step a random distance between @mathit{-1} and 1 |
| 4422 | in both @expr{x} and @expr{y}; then take another step, and so on. Use the | 4415 | in both @expr{x} and @expr{y}; then take another step, and so on. Use the |
| 4423 | @kbd{g f} command to display this random walk. Now modify your random | 4416 | @kbd{g f} command to display this random walk. Now modify your random |
| 4424 | walk to walk a unit distance, but in a random direction, at each step. | 4417 | walk to walk a unit distance, but in a random direction, at each step. |
| @@ -4497,7 +4490,7 @@ to allow for roundoff error!) @xref{Types Answer 1, 1}. (@bullet{}) | |||
| 4497 | @end smallexample | 4490 | @end smallexample |
| 4498 | 4491 | ||
| 4499 | @noindent | 4492 | @noindent |
| 4500 | The square root of @i{-9} is by default rendered in rectangular form | 4493 | The square root of @mathit{-9} is by default rendered in rectangular form |
| 4501 | (@w{@expr{0 + 3i}}), but we can convert it to polar form (3 with a | 4494 | (@w{@expr{0 + 3i}}), but we can convert it to polar form (3 with a |
| 4502 | phase angle of 90 degrees). All the usual arithmetic and scientific | 4495 | phase angle of 90 degrees). All the usual arithmetic and scientific |
| 4503 | operations are defined on both types of complex numbers. | 4496 | operations are defined on both types of complex numbers. |
| @@ -4522,14 +4515,14 @@ algebraic entry. | |||
| 4522 | 4515 | ||
| 4523 | @noindent | 4516 | @noindent |
| 4524 | Since infinity is infinitely large, multiplying it by any finite | 4517 | Since infinity is infinitely large, multiplying it by any finite |
| 4525 | number (like @i{-17}) has no effect, except that since @i{-17} | 4518 | number (like @mathit{-17}) has no effect, except that since @mathit{-17} |
| 4526 | is negative, it changes a plus infinity to a minus infinity. | 4519 | is negative, it changes a plus infinity to a minus infinity. |
| 4527 | (``A huge positive number, multiplied by @i{-17}, yields a huge | 4520 | (``A huge positive number, multiplied by @mathit{-17}, yields a huge |
| 4528 | negative number.'') Adding any finite number to infinity also | 4521 | negative number.'') Adding any finite number to infinity also |
| 4529 | leaves it unchanged. Taking an absolute value gives us plus | 4522 | leaves it unchanged. Taking an absolute value gives us plus |
| 4530 | infinity again. Finally, we add this plus infinity to the minus | 4523 | infinity again. Finally, we add this plus infinity to the minus |
| 4531 | infinity we had earlier. If you work it out, you might expect | 4524 | infinity we had earlier. If you work it out, you might expect |
| 4532 | the answer to be @i{-72} for this. But the 72 has been completely | 4525 | the answer to be @mathit{-72} for this. But the 72 has been completely |
| 4533 | lost next to the infinities; by the time we compute @w{@samp{inf - inf}} | 4526 | lost next to the infinities; by the time we compute @w{@samp{inf - inf}} |
| 4534 | the finite difference between them, if any, is undetectable. | 4527 | the finite difference between them, if any, is undetectable. |
| 4535 | So we say the result is @dfn{indeterminate}, which Calc writes | 4528 | So we say the result is @dfn{indeterminate}, which Calc writes |
| @@ -4537,7 +4530,7 @@ with the symbol @code{nan} (for Not A Number). | |||
| 4537 | 4530 | ||
| 4538 | Dividing by zero is normally treated as an error, but you can get | 4531 | Dividing by zero is normally treated as an error, but you can get |
| 4539 | Calc to write an answer in terms of infinity by pressing @kbd{m i} | 4532 | Calc to write an answer in terms of infinity by pressing @kbd{m i} |
| 4540 | to turn on ``infinite mode.'' | 4533 | to turn on Infinite mode. |
| 4541 | 4534 | ||
| 4542 | @smallexample | 4535 | @smallexample |
| 4543 | @group | 4536 | @group |
| @@ -4686,7 +4679,7 @@ a 60% chance that the result is correct within 0.59 degrees. | |||
| 4686 | 4679 | ||
| 4687 | @cindex Torus, volume of | 4680 | @cindex Torus, volume of |
| 4688 | (@bullet{}) @strong{Exercise 7.} The volume of a torus (a donut shape) is | 4681 | (@bullet{}) @strong{Exercise 7.} The volume of a torus (a donut shape) is |
| 4689 | @texline @tmath{2 \pi^2 R r^2} | 4682 | @texline @math{2 \pi^2 R r^2} |
| 4690 | @infoline @w{@expr{2 pi^2 R r^2}} | 4683 | @infoline @w{@expr{2 pi^2 R r^2}} |
| 4691 | where @expr{R} is the radius of the circle that | 4684 | where @expr{R} is the radius of the circle that |
| 4692 | defines the center of the tube and @expr{r} is the radius of the tube | 4685 | defines the center of the tube and @expr{r} is the radius of the tube |
| @@ -4764,10 +4757,11 @@ or 24 hours. | |||
| 4764 | @end smallexample | 4757 | @end smallexample |
| 4765 | 4758 | ||
| 4766 | @noindent | 4759 | @noindent |
| 4767 | In this last step, Calc has found a new number which, when multiplied | 4760 | In this last step, Calc has divided by 5 modulo 24; i.e., it has found a |
| 4768 | by 5 modulo 24, produces the original number, 21. If @var{m} is prime | 4761 | new number which, when multiplied by 5 modulo 24, produces the original |
| 4769 | it is always possible to find such a number. For non-prime @var{m} | 4762 | number, 21. If @var{m} is prime and the divisor is not a multiple of |
| 4770 | like 24, it is only sometimes possible. | 4763 | @var{m}, it is always possible to find such a number. For non-prime |
| 4764 | @var{m} like 24, it is only sometimes possible. | ||
| 4771 | 4765 | ||
| 4772 | @smallexample | 4766 | @smallexample |
| 4773 | @group | 4767 | @group |
| @@ -4786,7 +4780,7 @@ that arises in the second one. | |||
| 4786 | @cindex Fermat, primality test of | 4780 | @cindex Fermat, primality test of |
| 4787 | (@bullet{}) @strong{Exercise 10.} A theorem of Pierre de Fermat | 4781 | (@bullet{}) @strong{Exercise 10.} A theorem of Pierre de Fermat |
| 4788 | says that | 4782 | says that |
| 4789 | @texline @w{@tmath{x^{n-1} \bmod n = 1}} | 4783 | @texline @w{@math{x^{n-1} \bmod n = 1}} |
| 4790 | @infoline @expr{x^(n-1) mod n = 1} | 4784 | @infoline @expr{x^(n-1) mod n = 1} |
| 4791 | if @expr{n} is a prime number and @expr{x} is an integer less than | 4785 | if @expr{n} is a prime number and @expr{x} is an integer less than |
| 4792 | @expr{n}. If @expr{n} is @emph{not} a prime number, this will | 4786 | @expr{n}. If @expr{n} is @emph{not} a prime number, this will |
| @@ -4814,7 +4808,7 @@ This calculation tells me it is six hours and 22 minutes until midnight. | |||
| 4814 | 4808 | ||
| 4815 | (@bullet{}) @strong{Exercise 11.} A rule of thumb is that one year | 4809 | (@bullet{}) @strong{Exercise 11.} A rule of thumb is that one year |
| 4816 | is about | 4810 | is about |
| 4817 | @texline @tmath{\pi \times 10^7} | 4811 | @texline @math{\pi \times 10^7} |
| 4818 | @infoline @w{@expr{pi * 10^7}} | 4812 | @infoline @w{@expr{pi * 10^7}} |
| 4819 | seconds. What time will it be that many seconds from right now? | 4813 | seconds. What time will it be that many seconds from right now? |
| 4820 | @xref{Types Answer 11, 11}. (@bullet{}) | 4814 | @xref{Types Answer 11, 11}. (@bullet{}) |
| @@ -4967,7 +4961,7 @@ formulas. | |||
| 4967 | @subsection Basic Algebra | 4961 | @subsection Basic Algebra |
| 4968 | 4962 | ||
| 4969 | @noindent | 4963 | @noindent |
| 4970 | If you enter a formula in algebraic mode that refers to variables, | 4964 | If you enter a formula in Algebraic mode that refers to variables, |
| 4971 | the formula itself is pushed onto the stack. You can manipulate | 4965 | the formula itself is pushed onto the stack. You can manipulate |
| 4972 | formulas as regular data objects. | 4966 | formulas as regular data objects. |
| 4973 | 4967 | ||
| @@ -5121,7 +5115,7 @@ solution by pressing @kbd{H} (the Hyperbolic flag) before @kbd{a S}. | |||
| 5121 | 5115 | ||
| 5122 | @noindent | 5116 | @noindent |
| 5123 | Calc has invented the variable @samp{s1} to represent an unknown sign; | 5117 | Calc has invented the variable @samp{s1} to represent an unknown sign; |
| 5124 | it is supposed to be either @i{+1} or @i{-1}. Here we have used | 5118 | it is supposed to be either @mathit{+1} or @mathit{-1}. Here we have used |
| 5125 | the ``let'' command to evaluate the expression when the sign is negative. | 5119 | the ``let'' command to evaluate the expression when the sign is negative. |
| 5126 | If we plugged this into our second derivative we would get the same, | 5120 | If we plugged this into our second derivative we would get the same, |
| 5127 | negative, answer, so @expr{x = -1.19023} is also a maximum. | 5121 | negative, answer, so @expr{x = -1.19023} is also a maximum. |
| @@ -5188,7 +5182,7 @@ polynomial? (The answer will be unique to within a constant | |||
| 5188 | multiple; choose the solution where the leading coefficient is one.) | 5182 | multiple; choose the solution where the leading coefficient is one.) |
| 5189 | @xref{Algebra Answer 2, 2}. (@bullet{}) | 5183 | @xref{Algebra Answer 2, 2}. (@bullet{}) |
| 5190 | 5184 | ||
| 5191 | The @kbd{m s} command enables ``symbolic mode,'' in which formulas | 5185 | The @kbd{m s} command enables Symbolic mode, in which formulas |
| 5192 | like @samp{sqrt(5)} that can't be evaluated exactly are left in | 5186 | like @samp{sqrt(5)} that can't be evaluated exactly are left in |
| 5193 | symbolic form rather than giving a floating-point approximate answer. | 5187 | symbolic form rather than giving a floating-point approximate answer. |
| 5194 | Fraction mode (@kbd{m f}) is also useful when doing algebra. | 5188 | Fraction mode (@kbd{m f}) is also useful when doing algebra. |
| @@ -5203,7 +5197,7 @@ Fraction mode (@kbd{m f}) is also useful when doing algebra. | |||
| 5203 | @end group | 5197 | @end group |
| 5204 | @end smallexample | 5198 | @end smallexample |
| 5205 | 5199 | ||
| 5206 | One more mode that makes reading formulas easier is ``Big mode.'' | 5200 | One more mode that makes reading formulas easier is Big mode. |
| 5207 | 5201 | ||
| 5208 | @smallexample | 5202 | @smallexample |
| 5209 | @group | 5203 | @group |
| @@ -5291,7 +5285,7 @@ One way to do it is again with vector mapping and reduction: | |||
| 5291 | 5285 | ||
| 5292 | (@bullet{}) @strong{Exercise 3.} Find the integral from 1 to @expr{y} | 5286 | (@bullet{}) @strong{Exercise 3.} Find the integral from 1 to @expr{y} |
| 5293 | of | 5287 | of |
| 5294 | @texline @tmath{x \sin \pi x} | 5288 | @texline @math{x \sin \pi x} |
| 5295 | @infoline @w{@expr{x sin(pi x)}} | 5289 | @infoline @w{@expr{x sin(pi x)}} |
| 5296 | (where the sine is calculated in radians). Find the values of the | 5290 | (where the sine is calculated in radians). Find the values of the |
| 5297 | integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3, | 5291 | integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3, |
| @@ -5300,7 +5294,7 @@ integral for integers @expr{y} from 1 to 5. @xref{Algebra Answer 3, | |||
| 5300 | Calc's integrator can do many simple integrals symbolically, but many | 5294 | Calc's integrator can do many simple integrals symbolically, but many |
| 5301 | others are beyond its capabilities. Suppose we wish to find the area | 5295 | others are beyond its capabilities. Suppose we wish to find the area |
| 5302 | under the curve | 5296 | under the curve |
| 5303 | @texline @tmath{\sin x \ln x} | 5297 | @texline @math{\sin x \ln x} |
| 5304 | @infoline @expr{sin(x) ln(x)} | 5298 | @infoline @expr{sin(x) ln(x)} |
| 5305 | over the same range of @expr{x}. If you entered this formula and typed | 5299 | over the same range of @expr{x}. If you entered this formula and typed |
| 5306 | @kbd{a i x @key{RET}} (don't bother to try this), Calc would work for a | 5300 | @kbd{a i x @key{RET}} (don't bother to try this), Calc would work for a |
| @@ -5351,7 +5345,7 @@ also have used plain @kbd{v x} as follows: @kbd{v x 10 @key{RET} 9 + .1 *}.) | |||
| 5351 | 5345 | ||
| 5352 | @noindent | 5346 | @noindent |
| 5353 | (If you got wildly different results, did you remember to switch | 5347 | (If you got wildly different results, did you remember to switch |
| 5354 | to radians mode?) | 5348 | to Radians mode?) |
| 5355 | 5349 | ||
| 5356 | Here we have divided the curve into ten segments of equal width; | 5350 | Here we have divided the curve into ten segments of equal width; |
| 5357 | approximating these segments as rectangular boxes (i.e., assuming | 5351 | approximating these segments as rectangular boxes (i.e., assuming |
| @@ -5442,7 +5436,7 @@ $$ h (f(a) + f(a+h) + f(a+2h) + f(a+3h) + \cdots | |||
| 5442 | @end tex | 5436 | @end tex |
| 5443 | 5437 | ||
| 5444 | Compute the integral from 1 to 2 of | 5438 | Compute the integral from 1 to 2 of |
| 5445 | @texline @tmath{\sin x \ln x} | 5439 | @texline @math{\sin x \ln x} |
| 5446 | @infoline @expr{sin(x) ln(x)} | 5440 | @infoline @expr{sin(x) ln(x)} |
| 5447 | using Simpson's rule with 10 slices. | 5441 | using Simpson's rule with 10 slices. |
| 5448 | @xref{Algebra Answer 4, 4}. (@bullet{}) | 5442 | @xref{Algebra Answer 4, 4}. (@bullet{}) |
| @@ -5607,7 +5601,7 @@ only once and stores the compiled form along with the variable. That's | |||
| 5607 | another good reason to store your rules in variables rather than | 5601 | another good reason to store your rules in variables rather than |
| 5608 | entering them on the fly. | 5602 | entering them on the fly. |
| 5609 | 5603 | ||
| 5610 | (@bullet{}) @strong{Exercise 1.} Type @kbd{m s} to get symbolic | 5604 | (@bullet{}) @strong{Exercise 1.} Type @kbd{m s} to get Symbolic |
| 5611 | mode, then enter the formula @samp{@w{(2 + sqrt(2))} / @w{(1 + sqrt(2))}}. | 5605 | mode, then enter the formula @samp{@w{(2 + sqrt(2))} / @w{(1 + sqrt(2))}}. |
| 5612 | Using a rewrite rule, simplify this formula by multiplying both | 5606 | Using a rewrite rule, simplify this formula by multiplying both |
| 5613 | sides by the conjugate @w{@samp{1 - sqrt(2)}}. The result will have | 5607 | sides by the conjugate @w{@samp{1 - sqrt(2)}}. The result will have |
| @@ -5866,11 +5860,11 @@ so that @expr{2 - 3 (x + y) + x y} is a sum of three terms.) | |||
| 5866 | @xref{Rewrites Answer 5, 5}. (@bullet{}) | 5860 | @xref{Rewrites Answer 5, 5}. (@bullet{}) |
| 5867 | 5861 | ||
| 5868 | (@bullet{}) @strong{Exercise 6.} Calc considers the form @expr{0^0} | 5862 | (@bullet{}) @strong{Exercise 6.} Calc considers the form @expr{0^0} |
| 5869 | to be ``indeterminate,'' and leaves it unevaluated (assuming infinite | 5863 | to be ``indeterminate,'' and leaves it unevaluated (assuming Infinite |
| 5870 | mode is not enabled). Some people prefer to define @expr{0^0 = 1}, | 5864 | mode is not enabled). Some people prefer to define @expr{0^0 = 1}, |
| 5871 | so that the identity @expr{x^0 = 1} can safely be used for all @expr{x}. | 5865 | so that the identity @expr{x^0 = 1} can safely be used for all @expr{x}. |
| 5872 | Find a way to make Calc follow this convention. What happens if you | 5866 | Find a way to make Calc follow this convention. What happens if you |
| 5873 | now type @kbd{m i} to turn on infinite mode? | 5867 | now type @kbd{m i} to turn on Infinite mode? |
| 5874 | @xref{Rewrites Answer 6, 6}. (@bullet{}) | 5868 | @xref{Rewrites Answer 6, 6}. (@bullet{}) |
| 5875 | 5869 | ||
| 5876 | (@bullet{}) @strong{Exercise 7.} A Taylor series for a function is an | 5870 | (@bullet{}) @strong{Exercise 7.} A Taylor series for a function is an |
| @@ -5988,7 +5982,7 @@ in @samp{a + 1} for @samp{x} in the defining formula. | |||
| 5988 | @end ignore | 5982 | @end ignore |
| 5989 | @tindex Si | 5983 | @tindex Si |
| 5990 | (@bullet{}) @strong{Exercise 1.} The ``sine integral'' function | 5984 | (@bullet{}) @strong{Exercise 1.} The ``sine integral'' function |
| 5991 | @texline @tmath{{\rm Si}(x)} | 5985 | @texline @math{{\rm Si}(x)} |
| 5992 | @infoline @expr{Si(x)} | 5986 | @infoline @expr{Si(x)} |
| 5993 | is defined as the integral of @samp{sin(t)/t} for | 5987 | is defined as the integral of @samp{sin(t)/t} for |
| 5994 | @expr{t = 0} to @expr{x} in radians. (It was invented because this | 5988 | @expr{t = 0} to @expr{x} in radians. (It was invented because this |
| @@ -6066,7 +6060,7 @@ the following functions: | |||
| 6066 | @enumerate | 6060 | @enumerate |
| 6067 | @item | 6061 | @item |
| 6068 | Compute | 6062 | Compute |
| 6069 | @texline @tmath{\displaystyle{\sin x \over x}}, | 6063 | @texline @math{\displaystyle{\sin x \over x}}, |
| 6070 | @infoline @expr{sin(x) / x}, | 6064 | @infoline @expr{sin(x) / x}, |
| 6071 | where @expr{x} is the number on the top of the stack. | 6065 | where @expr{x} is the number on the top of the stack. |
| 6072 | 6066 | ||
| @@ -6132,13 +6126,13 @@ key if you have one, makes a copy of the number in level 2.) | |||
| 6132 | @cindex Phi, golden ratio | 6126 | @cindex Phi, golden ratio |
| 6133 | A fascinating property of the Fibonacci numbers is that the @expr{n}th | 6127 | A fascinating property of the Fibonacci numbers is that the @expr{n}th |
| 6134 | Fibonacci number can be found directly by computing | 6128 | Fibonacci number can be found directly by computing |
| 6135 | @texline @tmath{\phi^n / \sqrt{5}} | 6129 | @texline @math{\phi^n / \sqrt{5}} |
| 6136 | @infoline @expr{phi^n / sqrt(5)} | 6130 | @infoline @expr{phi^n / sqrt(5)} |
| 6137 | and then rounding to the nearest integer, where | 6131 | and then rounding to the nearest integer, where |
| 6138 | @texline @tmath{\phi} (``phi''), | 6132 | @texline @math{\phi} (``phi''), |
| 6139 | @infoline @expr{phi}, | 6133 | @infoline @expr{phi}, |
| 6140 | the ``golden ratio,'' is | 6134 | the ``golden ratio,'' is |
| 6141 | @texline @tmath{(1 + \sqrt{5}) / 2}. | 6135 | @texline @math{(1 + \sqrt{5}) / 2}. |
| 6142 | @infoline @expr{(1 + sqrt(5)) / 2}. | 6136 | @infoline @expr{(1 + sqrt(5)) / 2}. |
| 6143 | (For convenience, this constant is available from the @code{phi} | 6137 | (For convenience, this constant is available from the @code{phi} |
| 6144 | variable, or the @kbd{I H P} command.) | 6138 | variable, or the @kbd{I H P} command.) |
| @@ -6155,17 +6149,17 @@ variable, or the @kbd{I H P} command.) | |||
| 6155 | @cindex Continued fractions | 6149 | @cindex Continued fractions |
| 6156 | (@bullet{}) @strong{Exercise 5.} The @dfn{continued fraction} | 6150 | (@bullet{}) @strong{Exercise 5.} The @dfn{continued fraction} |
| 6157 | representation of | 6151 | representation of |
| 6158 | @texline @tmath{\phi} | 6152 | @texline @math{\phi} |
| 6159 | @infoline @expr{phi} | 6153 | @infoline @expr{phi} |
| 6160 | is | 6154 | is |
| 6161 | @texline @tmath{1 + 1/(1 + 1/(1 + 1/( \ldots )))}. | 6155 | @texline @math{1 + 1/(1 + 1/(1 + 1/( \ldots )))}. |
| 6162 | @infoline @expr{1 + 1/(1 + 1/(1 + 1/( ...@: )))}. | 6156 | @infoline @expr{1 + 1/(1 + 1/(1 + 1/( ...@: )))}. |
| 6163 | We can compute an approximate value by carrying this however far | 6157 | We can compute an approximate value by carrying this however far |
| 6164 | and then replacing the innermost | 6158 | and then replacing the innermost |
| 6165 | @texline @tmath{1/( \ldots )} | 6159 | @texline @math{1/( \ldots )} |
| 6166 | @infoline @expr{1/( ...@: )} | 6160 | @infoline @expr{1/( ...@: )} |
| 6167 | by 1. Approximate | 6161 | by 1. Approximate |
| 6168 | @texline @tmath{\phi} | 6162 | @texline @math{\phi} |
| 6169 | @infoline @expr{phi} | 6163 | @infoline @expr{phi} |
| 6170 | using a twenty-term continued fraction. | 6164 | using a twenty-term continued fraction. |
| 6171 | @xref{Programming Answer 5, 5}. (@bullet{}) | 6165 | @xref{Programming Answer 5, 5}. (@bullet{}) |
| @@ -6265,7 +6259,7 @@ The @dfn{Bernoulli numbers} are a sequence with the interesting | |||
| 6265 | property that all of the odd Bernoulli numbers are zero, and the | 6259 | property that all of the odd Bernoulli numbers are zero, and the |
| 6266 | even ones, while difficult to compute, can be roughly approximated | 6260 | even ones, while difficult to compute, can be roughly approximated |
| 6267 | by the formula | 6261 | by the formula |
| 6268 | @texline @tmath{\displaystyle{2 n! \over (2 \pi)^n}}. | 6262 | @texline @math{\displaystyle{2 n! \over (2 \pi)^n}}. |
| 6269 | @infoline @expr{2 n!@: / (2 pi)^n}. | 6263 | @infoline @expr{2 n!@: / (2 pi)^n}. |
| 6270 | Let's write a keyboard macro to compute (approximate) Bernoulli numbers. | 6264 | Let's write a keyboard macro to compute (approximate) Bernoulli numbers. |
| 6271 | (Calc has a command, @kbd{k b}, to compute exact Bernoulli numbers, but | 6265 | (Calc has a command, @kbd{k b}, to compute exact Bernoulli numbers, but |
| @@ -6439,14 +6433,14 @@ $$ x_{\rm new} = x - {f(x) \over f'(x)} $$ | |||
| 6439 | @noindent | 6433 | @noindent |
| 6440 | where @expr{f'(x)} is the derivative of @expr{f}. The @expr{x} | 6434 | where @expr{f'(x)} is the derivative of @expr{f}. The @expr{x} |
| 6441 | values will quickly converge to a solution, i.e., eventually | 6435 | values will quickly converge to a solution, i.e., eventually |
| 6442 | @texline @tmath{x_{\rm new}} | 6436 | @texline @math{x_{\rm new}} |
| 6443 | @infoline @expr{new_x} | 6437 | @infoline @expr{new_x} |
| 6444 | and @expr{x} will be equal to within the limits | 6438 | and @expr{x} will be equal to within the limits |
| 6445 | of the current precision. Write a program which takes a formula | 6439 | of the current precision. Write a program which takes a formula |
| 6446 | involving the variable @expr{x}, and an initial guess @expr{x_0}, | 6440 | involving the variable @expr{x}, and an initial guess @expr{x_0}, |
| 6447 | on the stack, and produces a value of @expr{x} for which the formula | 6441 | on the stack, and produces a value of @expr{x} for which the formula |
| 6448 | is zero. Use it to find a solution of | 6442 | is zero. Use it to find a solution of |
| 6449 | @texline @tmath{\sin(\cos x) = 0.5} | 6443 | @texline @math{\sin(\cos x) = 0.5} |
| 6450 | @infoline @expr{sin(cos(x)) = 0.5} | 6444 | @infoline @expr{sin(cos(x)) = 0.5} |
| 6451 | near @expr{x = 4.5}. (Use angles measured in radians.) Note that | 6445 | near @expr{x = 4.5}. (Use angles measured in radians.) Note that |
| 6452 | the built-in @w{@kbd{a R}} (@code{calc-find-root}) command uses Newton's | 6446 | the built-in @w{@kbd{a R}} (@code{calc-find-root}) command uses Newton's |
| @@ -6456,10 +6450,10 @@ method when it is able. @xref{Programming Answer 8, 8}. (@bullet{}) | |||
| 6456 | @cindex Gamma constant, Euler's | 6450 | @cindex Gamma constant, Euler's |
| 6457 | @cindex Euler's gamma constant | 6451 | @cindex Euler's gamma constant |
| 6458 | (@bullet{}) @strong{Exercise 9.} The @dfn{digamma} function | 6452 | (@bullet{}) @strong{Exercise 9.} The @dfn{digamma} function |
| 6459 | @texline @tmath{\psi(z) (``psi'')} | 6453 | @texline @math{\psi(z) (``psi'')} |
| 6460 | @infoline @expr{psi(z)} | 6454 | @infoline @expr{psi(z)} |
| 6461 | is defined as the derivative of | 6455 | is defined as the derivative of |
| 6462 | @texline @tmath{\ln \Gamma(z)}. | 6456 | @texline @math{\ln \Gamma(z)}. |
| 6463 | @infoline @expr{ln(gamma(z))}. | 6457 | @infoline @expr{ln(gamma(z))}. |
| 6464 | For large values of @expr{z}, it can be approximated by the infinite sum | 6458 | For large values of @expr{z}, it can be approximated by the infinite sum |
| 6465 | 6459 | ||
| @@ -6478,7 +6472,7 @@ $$ | |||
| 6478 | 6472 | ||
| 6479 | @noindent | 6473 | @noindent |
| 6480 | where | 6474 | where |
| 6481 | @texline @tmath{\sum} | 6475 | @texline @math{\sum} |
| 6482 | @infoline @expr{sum} | 6476 | @infoline @expr{sum} |
| 6483 | represents the sum over @expr{n} from 1 to infinity | 6477 | represents the sum over @expr{n} from 1 to infinity |
| 6484 | (or to some limit high enough to give the desired accuracy), and | 6478 | (or to some limit high enough to give the desired accuracy), and |
| @@ -6486,27 +6480,27 @@ the @code{bern} function produces (exact) Bernoulli numbers. | |||
| 6486 | While this sum is not guaranteed to converge, in practice it is safe. | 6480 | While this sum is not guaranteed to converge, in practice it is safe. |
| 6487 | An interesting mathematical constant is Euler's gamma, which is equal | 6481 | An interesting mathematical constant is Euler's gamma, which is equal |
| 6488 | to about 0.5772. One way to compute it is by the formula, | 6482 | to about 0.5772. One way to compute it is by the formula, |
| 6489 | @texline @tmath{\gamma = -\psi(1)}. | 6483 | @texline @math{\gamma = -\psi(1)}. |
| 6490 | @infoline @expr{gamma = -psi(1)}. | 6484 | @infoline @expr{gamma = -psi(1)}. |
| 6491 | Unfortunately, 1 isn't a large enough argument | 6485 | Unfortunately, 1 isn't a large enough argument |
| 6492 | for the above formula to work (5 is a much safer value for @expr{z}). | 6486 | for the above formula to work (5 is a much safer value for @expr{z}). |
| 6493 | Fortunately, we can compute | 6487 | Fortunately, we can compute |
| 6494 | @texline @tmath{\psi(1)} | 6488 | @texline @math{\psi(1)} |
| 6495 | @infoline @expr{psi(1)} | 6489 | @infoline @expr{psi(1)} |
| 6496 | from | 6490 | from |
| 6497 | @texline @tmath{\psi(5)} | 6491 | @texline @math{\psi(5)} |
| 6498 | @infoline @expr{psi(5)} | 6492 | @infoline @expr{psi(5)} |
| 6499 | using the recurrence | 6493 | using the recurrence |
| 6500 | @texline @tmath{\psi(z+1) = \psi(z) + {1 \over z}}. | 6494 | @texline @math{\psi(z+1) = \psi(z) + {1 \over z}}. |
| 6501 | @infoline @expr{psi(z+1) = psi(z) + 1/z}. | 6495 | @infoline @expr{psi(z+1) = psi(z) + 1/z}. |
| 6502 | Your task: Develop a program to compute | 6496 | Your task: Develop a program to compute |
| 6503 | @texline @tmath{\psi(z)}; | 6497 | @texline @math{\psi(z)}; |
| 6504 | @infoline @expr{psi(z)}; | 6498 | @infoline @expr{psi(z)}; |
| 6505 | it should ``pump up'' @expr{z} | 6499 | it should ``pump up'' @expr{z} |
| 6506 | if necessary to be greater than 5, then use the above summation | 6500 | if necessary to be greater than 5, then use the above summation |
| 6507 | formula. Use looping commands to compute the sum. Use your function | 6501 | formula. Use looping commands to compute the sum. Use your function |
| 6508 | to compute | 6502 | to compute |
| 6509 | @texline @tmath{\gamma} | 6503 | @texline @math{\gamma} |
| 6510 | @infoline @expr{gamma} | 6504 | @infoline @expr{gamma} |
| 6511 | to twelve decimal places. (Calc has a built-in command | 6505 | to twelve decimal places. (Calc has a built-in command |
| 6512 | for Euler's constant, @kbd{I P}, which you can use to check your answer.) | 6506 | for Euler's constant, @kbd{I P}, which you can use to check your answer.) |
| @@ -6683,18 +6677,18 @@ This section includes answers to all the exercises in the Calc tutorial. | |||
| 6683 | @kbd{1 @key{RET} 2 @key{RET} 3 @key{RET} 4 + * -} | 6677 | @kbd{1 @key{RET} 2 @key{RET} 3 @key{RET} 4 + * -} |
| 6684 | 6678 | ||
| 6685 | The result is | 6679 | The result is |
| 6686 | @texline @tmath{1 - (2 \times (3 + 4)) = -13}. | 6680 | @texline @math{1 - (2 \times (3 + 4)) = -13}. |
| 6687 | @infoline @expr{1 - (2 * (3 + 4)) = -13}. | 6681 | @infoline @expr{1 - (2 * (3 + 4)) = -13}. |
| 6688 | 6682 | ||
| 6689 | @node RPN Answer 2, RPN Answer 3, RPN Answer 1, Answers to Exercises | 6683 | @node RPN Answer 2, RPN Answer 3, RPN Answer 1, Answers to Exercises |
| 6690 | @subsection RPN Tutorial Exercise 2 | 6684 | @subsection RPN Tutorial Exercise 2 |
| 6691 | 6685 | ||
| 6692 | @noindent | 6686 | @noindent |
| 6693 | @texline @tmath{2\times4 + 7\times9.5 + {5\over4} = 75.75} | 6687 | @texline @math{2\times4 + 7\times9.5 + {5\over4} = 75.75} |
| 6694 | @infoline @expr{2*4 + 7*9.5 + 5/4 = 75.75} | 6688 | @infoline @expr{2*4 + 7*9.5 + 5/4 = 75.75} |
| 6695 | 6689 | ||
| 6696 | After computing the intermediate term | 6690 | After computing the intermediate term |
| 6697 | @texline @tmath{2\times4 = 8}, | 6691 | @texline @math{2\times4 = 8}, |
| 6698 | @infoline @expr{2*4 = 8}, | 6692 | @infoline @expr{2*4 = 8}, |
| 6699 | you can leave that result on the stack while you compute the second | 6693 | you can leave that result on the stack while you compute the second |
| 6700 | term. With both of these results waiting on the stack you can then | 6694 | term. With both of these results waiting on the stack you can then |
| @@ -6845,7 +6839,7 @@ the result will be zero because Calc uses the general rule that ``zero | |||
| 6845 | times anything is zero.'' | 6839 | times anything is zero.'' |
| 6846 | 6840 | ||
| 6847 | @c [fix-ref Infinities] | 6841 | @c [fix-ref Infinities] |
| 6848 | The @kbd{m i} command enables an @dfn{infinite mode} in which @expr{1 / 0} | 6842 | The @kbd{m i} command enables an @dfn{Infinite mode} in which @expr{1 / 0} |
| 6849 | results in a special symbol that represents ``infinity.'' If you | 6843 | results in a special symbol that represents ``infinity.'' If you |
| 6850 | multiply infinity by zero, Calc uses another special new symbol to | 6844 | multiply infinity by zero, Calc uses another special new symbol to |
| 6851 | show that the answer is ``indeterminate.'' @xref{Infinities}, for | 6845 | show that the answer is ``indeterminate.'' @xref{Infinities}, for |
| @@ -7003,13 +6997,13 @@ give a floating-point result that is inaccurate even when rounded | |||
| 7003 | down to an integer. Consider @expr{123456789 / 2} when the current | 6997 | down to an integer. Consider @expr{123456789 / 2} when the current |
| 7004 | precision is 6 digits. The true answer is @expr{61728394.5}, but | 6998 | precision is 6 digits. The true answer is @expr{61728394.5}, but |
| 7005 | with a precision of 6 this will be rounded to | 6999 | with a precision of 6 this will be rounded to |
| 7006 | @texline @tmath{12345700.0/2.0 = 61728500.0}. | 7000 | @texline @math{12345700.0/2.0 = 61728500.0}. |
| 7007 | @infoline @expr{12345700.@: / 2.@: = 61728500.}. | 7001 | @infoline @expr{12345700.@: / 2.@: = 61728500.}. |
| 7008 | The result, when converted to an integer, will be off by 106. | 7002 | The result, when converted to an integer, will be off by 106. |
| 7009 | 7003 | ||
| 7010 | Here are two solutions: Raise the precision enough that the | 7004 | Here are two solutions: Raise the precision enough that the |
| 7011 | floating-point round-off error is strictly to the right of the | 7005 | floating-point round-off error is strictly to the right of the |
| 7012 | decimal point. Or, convert to fraction mode so that @expr{123456789 / 2} | 7006 | decimal point. Or, convert to Fraction mode so that @expr{123456789 / 2} |
| 7013 | produces the exact fraction @expr{123456789:2}, which can be rounded | 7007 | produces the exact fraction @expr{123456789:2}, which can be rounded |
| 7014 | down by the @kbd{F} command without ever switching to floating-point | 7008 | down by the @kbd{F} command without ever switching to floating-point |
| 7015 | format. | 7009 | format. |
| @@ -7022,9 +7016,9 @@ format. | |||
| 7022 | does a floating-point calculation instead and produces @expr{1.5}. | 7016 | does a floating-point calculation instead and produces @expr{1.5}. |
| 7023 | 7017 | ||
| 7024 | Calc will find an exact result for a logarithm if the result is an integer | 7018 | Calc will find an exact result for a logarithm if the result is an integer |
| 7025 | or the reciprocal of an integer. But there is no efficient way to search | 7019 | or (when in Fraction mode) the reciprocal of an integer. But there is |
| 7026 | the space of all possible rational numbers for an exact answer, so Calc | 7020 | no efficient way to search the space of all possible rational numbers |
| 7027 | doesn't try. | 7021 | for an exact answer, so Calc doesn't try. |
| 7028 | 7022 | ||
| 7029 | @node Vector Answer 1, Vector Answer 2, Arithmetic Answer 2, Answers to Exercises | 7023 | @node Vector Answer 1, Vector Answer 2, Arithmetic Answer 2, Answers to Exercises |
| 7030 | @subsection Vector Tutorial Exercise 1 | 7024 | @subsection Vector Tutorial Exercise 1 |
| @@ -7096,7 +7090,7 @@ matrix as usual. | |||
| 7096 | @end group | 7090 | @end group |
| 7097 | @end smallexample | 7091 | @end smallexample |
| 7098 | 7092 | ||
| 7099 | This can be made more readable using @kbd{d B} to enable ``big'' display | 7093 | This can be made more readable using @kbd{d B} to enable Big display |
| 7100 | mode: | 7094 | mode: |
| 7101 | 7095 | ||
| 7102 | @smallexample | 7096 | @smallexample |
| @@ -7107,23 +7101,23 @@ mode: | |||
| 7107 | @end group | 7101 | @end group |
| 7108 | @end smallexample | 7102 | @end smallexample |
| 7109 | 7103 | ||
| 7110 | Type @kbd{d N} to return to ``normal'' display mode afterwards. | 7104 | Type @kbd{d N} to return to Normal display mode afterwards. |
| 7111 | 7105 | ||
| 7112 | @node Matrix Answer 3, List Answer 1, Matrix Answer 2, Answers to Exercises | 7106 | @node Matrix Answer 3, List Answer 1, Matrix Answer 2, Answers to Exercises |
| 7113 | @subsection Matrix Tutorial Exercise 3 | 7107 | @subsection Matrix Tutorial Exercise 3 |
| 7114 | 7108 | ||
| 7115 | @noindent | 7109 | @noindent |
| 7116 | To solve | 7110 | To solve |
| 7117 | @texline @tmath{A^T A \, X = A^T B}, | 7111 | @texline @math{A^T A \, X = A^T B}, |
| 7118 | @infoline @expr{trn(A) * A * X = trn(A) * B}, | 7112 | @infoline @expr{trn(A) * A * X = trn(A) * B}, |
| 7119 | first we compute | 7113 | first we compute |
| 7120 | @texline @tmath{A' = A^T A} | 7114 | @texline @math{A' = A^T A} |
| 7121 | @infoline @expr{A2 = trn(A) * A} | 7115 | @infoline @expr{A2 = trn(A) * A} |
| 7122 | and | 7116 | and |
| 7123 | @texline @tmath{B' = A^T B}; | 7117 | @texline @math{B' = A^T B}; |
| 7124 | @infoline @expr{B2 = trn(A) * B}; | 7118 | @infoline @expr{B2 = trn(A) * B}; |
| 7125 | now, we have a system | 7119 | now, we have a system |
| 7126 | @texline @tmath{A' X = B'} | 7120 | @texline @math{A' X = B'} |
| 7127 | @infoline @expr{A2 * X = B2} | 7121 | @infoline @expr{A2 * X = B2} |
| 7128 | which we can solve using Calc's @samp{/} command. | 7122 | which we can solve using Calc's @samp{/} command. |
| 7129 | 7123 | ||
| @@ -7155,7 +7149,7 @@ $$ | |||
| 7155 | 7149 | ||
| 7156 | The first step is to enter the coefficient matrix. We'll store it in | 7150 | The first step is to enter the coefficient matrix. We'll store it in |
| 7157 | quick variable number 7 for later reference. Next, we compute the | 7151 | quick variable number 7 for later reference. Next, we compute the |
| 7158 | @texline @tmath{B'} | 7152 | @texline @math{B'} |
| 7159 | @infoline @expr{B2} | 7153 | @infoline @expr{B2} |
| 7160 | vector. | 7154 | vector. |
| 7161 | 7155 | ||
| @@ -7173,7 +7167,7 @@ vector. | |||
| 7173 | 7167 | ||
| 7174 | @noindent | 7168 | @noindent |
| 7175 | Now we compute the matrix | 7169 | Now we compute the matrix |
| 7176 | @texline @tmath{A'} | 7170 | @texline @math{A'} |
| 7177 | @infoline @expr{A2} | 7171 | @infoline @expr{A2} |
| 7178 | and divide. | 7172 | and divide. |
| 7179 | 7173 | ||
| @@ -7194,16 +7188,16 @@ and divide. | |||
| 7194 | round-off error.) | 7188 | round-off error.) |
| 7195 | 7189 | ||
| 7196 | Notice that the answers are similar to those for the | 7190 | Notice that the answers are similar to those for the |
| 7197 | @texline @tmath{3\times3} | 7191 | @texline @math{3\times3} |
| 7198 | @infoline 3x3 | 7192 | @infoline 3x3 |
| 7199 | system solved in the text. That's because the fourth equation that was | 7193 | system solved in the text. That's because the fourth equation that was |
| 7200 | added to the system is almost identical to the first one multiplied | 7194 | added to the system is almost identical to the first one multiplied |
| 7201 | by two. (If it were identical, we would have gotten the exact same | 7195 | by two. (If it were identical, we would have gotten the exact same |
| 7202 | answer since the | 7196 | answer since the |
| 7203 | @texline @tmath{4\times3} | 7197 | @texline @math{4\times3} |
| 7204 | @infoline 4x3 | 7198 | @infoline 4x3 |
| 7205 | system would be equivalent to the original | 7199 | system would be equivalent to the original |
| 7206 | @texline @tmath{3\times3} | 7200 | @texline @math{3\times3} |
| 7207 | @infoline 3x3 | 7201 | @infoline 3x3 |
| 7208 | system.) | 7202 | system.) |
| 7209 | 7203 | ||
| @@ -7280,7 +7274,7 @@ $$ m \times x + b \times 1 = y $$ | |||
| 7280 | @end tex | 7274 | @end tex |
| 7281 | 7275 | ||
| 7282 | Thus we want a | 7276 | Thus we want a |
| 7283 | @texline @tmath{19\times2} | 7277 | @texline @math{19\times2} |
| 7284 | @infoline 19x2 | 7278 | @infoline 19x2 |
| 7285 | matrix with our @expr{x} vector as one column and | 7279 | matrix with our @expr{x} vector as one column and |
| 7286 | ones as the other column. So, first we build the column of ones, then | 7280 | ones as the other column. So, first we build the column of ones, then |
| @@ -7299,10 +7293,10 @@ we combine the two columns to form our @expr{A} matrix. | |||
| 7299 | 7293 | ||
| 7300 | @noindent | 7294 | @noindent |
| 7301 | Now we compute | 7295 | Now we compute |
| 7302 | @texline @tmath{A^T y} | 7296 | @texline @math{A^T y} |
| 7303 | @infoline @expr{trn(A) * y} | 7297 | @infoline @expr{trn(A) * y} |
| 7304 | and | 7298 | and |
| 7305 | @texline @tmath{A^T A} | 7299 | @texline @math{A^T A} |
| 7306 | @infoline @expr{trn(A) * A} | 7300 | @infoline @expr{trn(A) * A} |
| 7307 | and divide. | 7301 | and divide. |
| 7308 | 7302 | ||
| @@ -7330,7 +7324,7 @@ and divide. | |||
| 7330 | @end smallexample | 7324 | @end smallexample |
| 7331 | 7325 | ||
| 7332 | Since we were solving equations of the form | 7326 | Since we were solving equations of the form |
| 7333 | @texline @tmath{m \times x + b \times 1 = y}, | 7327 | @texline @math{m \times x + b \times 1 = y}, |
| 7334 | @infoline @expr{m*x + b*1 = y}, | 7328 | @infoline @expr{m*x + b*1 = y}, |
| 7335 | these numbers should be @expr{m} and @expr{b}, respectively. Sure | 7329 | these numbers should be @expr{m} and @expr{b}, respectively. Sure |
| 7336 | enough, they agree exactly with the result computed using @kbd{V M} and | 7330 | enough, they agree exactly with the result computed using @kbd{V M} and |
| @@ -7393,7 +7387,7 @@ then raise the number to that power.) | |||
| 7393 | 7387 | ||
| 7394 | @noindent | 7388 | @noindent |
| 7395 | A number @expr{j} is a divisor of @expr{n} if | 7389 | A number @expr{j} is a divisor of @expr{n} if |
| 7396 | @texline @tmath{n \mathbin{\hbox{\code{\%}}} j = 0}. | 7390 | @texline @math{n \mathbin{\hbox{\code{\%}}} j = 0}. |
| 7397 | @infoline @samp{n % j = 0}. | 7391 | @infoline @samp{n % j = 0}. |
| 7398 | The first step is to get a vector that identifies the divisors. | 7392 | The first step is to get a vector that identifies the divisors. |
| 7399 | 7393 | ||
| @@ -7464,7 +7458,7 @@ zero, so adding zeros on the left and right is safe. From then on | |||
| 7464 | the job is pretty straightforward. | 7458 | the job is pretty straightforward. |
| 7465 | 7459 | ||
| 7466 | Incidentally, Calc provides the | 7460 | Incidentally, Calc provides the |
| 7467 | @texline @dfn{M@"obius} @tmath{\mu} | 7461 | @texline @dfn{M@"obius} @math{\mu} |
| 7468 | @infoline @dfn{Moebius mu} | 7462 | @infoline @dfn{Moebius mu} |
| 7469 | function which is zero if and only if its argument is square-free. It | 7463 | function which is zero if and only if its argument is square-free. It |
| 7470 | would be a much more convenient way to do the above test in practice. | 7464 | would be a much more convenient way to do the above test in practice. |
| @@ -7498,7 +7492,7 @@ The numbers down the lefthand edge of the list we desire are called | |||
| 7498 | the ``triangular numbers'' (now you know why!). The @expr{n}th | 7492 | the ``triangular numbers'' (now you know why!). The @expr{n}th |
| 7499 | triangular number is the sum of the integers from 1 to @expr{n}, and | 7493 | triangular number is the sum of the integers from 1 to @expr{n}, and |
| 7500 | can be computed directly by the formula | 7494 | can be computed directly by the formula |
| 7501 | @texline @tmath{n (n+1) \over 2}. | 7495 | @texline @math{n (n+1) \over 2}. |
| 7502 | @infoline @expr{n * (n+1) / 2}. | 7496 | @infoline @expr{n * (n+1) / 2}. |
| 7503 | 7497 | ||
| 7504 | @smallexample | 7498 | @smallexample |
| @@ -7594,7 +7588,7 @@ A way to isolate the maximum value is to compute the maximum using | |||
| 7594 | @noindent | 7588 | @noindent |
| 7595 | It's a good idea to verify, as in the last step above, that only | 7589 | It's a good idea to verify, as in the last step above, that only |
| 7596 | one value is equal to the maximum. (After all, a plot of | 7590 | one value is equal to the maximum. (After all, a plot of |
| 7597 | @texline @tmath{\sin x} | 7591 | @texline @math{\sin x} |
| 7598 | @infoline @expr{sin(x)} | 7592 | @infoline @expr{sin(x)} |
| 7599 | might have many points all equal to the maximum value, 1.) | 7593 | might have many points all equal to the maximum value, 1.) |
| 7600 | 7594 | ||
| @@ -7866,10 +7860,10 @@ This problem can be made a lot easier by taking advantage of some | |||
| 7866 | symmetries. First of all, after some thought it's clear that the | 7860 | symmetries. First of all, after some thought it's clear that the |
| 7867 | @expr{y} axis can be ignored altogether. Just pick a random @expr{x} | 7861 | @expr{y} axis can be ignored altogether. Just pick a random @expr{x} |
| 7868 | component for one end of the match, pick a random direction | 7862 | component for one end of the match, pick a random direction |
| 7869 | @texline @tmath{\theta}, | 7863 | @texline @math{\theta}, |
| 7870 | @infoline @expr{theta}, | 7864 | @infoline @expr{theta}, |
| 7871 | and see if @expr{x} and | 7865 | and see if @expr{x} and |
| 7872 | @texline @tmath{x + \cos \theta} | 7866 | @texline @math{x + \cos \theta} |
| 7873 | @infoline @expr{x + cos(theta)} | 7867 | @infoline @expr{x + cos(theta)} |
| 7874 | (which is the @expr{x} coordinate of the other endpoint) cross a line. | 7868 | (which is the @expr{x} coordinate of the other endpoint) cross a line. |
| 7875 | The lines are at integer coordinates, so this happens when the two | 7869 | The lines are at integer coordinates, so this happens when the two |
| @@ -7886,10 +7880,10 @@ coordinates 0 and 1 for the lines on either side of the leftmost | |||
| 7886 | endpoint. The rightmost endpoint will be between 0 and 1 if the | 7880 | endpoint. The rightmost endpoint will be between 0 and 1 if the |
| 7887 | match does not cross a line, or between 1 and 2 if it does. So: | 7881 | match does not cross a line, or between 1 and 2 if it does. So: |
| 7888 | Pick random @expr{x} and | 7882 | Pick random @expr{x} and |
| 7889 | @texline @tmath{\theta}, | 7883 | @texline @math{\theta}, |
| 7890 | @infoline @expr{theta}, | 7884 | @infoline @expr{theta}, |
| 7891 | compute | 7885 | compute |
| 7892 | @texline @tmath{x + \cos \theta}, | 7886 | @texline @math{x + \cos \theta}, |
| 7893 | @infoline @expr{x + cos(theta)}, | 7887 | @infoline @expr{x + cos(theta)}, |
| 7894 | and count how many of the results are greater than one. Simple! | 7888 | and count how many of the results are greater than one. Simple! |
| 7895 | 7889 | ||
| @@ -8214,7 +8208,7 @@ precision slightly and try again: | |||
| 8214 | @noindent | 8208 | @noindent |
| 8215 | Aha! It's unlikely that an irrational number would equal a fraction | 8209 | Aha! It's unlikely that an irrational number would equal a fraction |
| 8216 | this simple to within ten digits, so our original number was probably | 8210 | this simple to within ten digits, so our original number was probably |
| 8217 | @texline @tmath{\sqrt{27 \pi / 53}}. | 8211 | @texline @math{\sqrt{27 \pi / 53}}. |
| 8218 | @infoline @expr{sqrt(27 pi / 53)}. | 8212 | @infoline @expr{sqrt(27 pi / 53)}. |
| 8219 | 8213 | ||
| 8220 | Notice that we didn't need to re-round the number when we reduced the | 8214 | Notice that we didn't need to re-round the number when we reduced the |
| @@ -8254,7 +8248,7 @@ so it settles for the conservative answer @code{uinf}. | |||
| 8254 | 8248 | ||
| 8255 | @samp{ln(0) = -inf}. Here we have an infinite answer to a finite | 8249 | @samp{ln(0) = -inf}. Here we have an infinite answer to a finite |
| 8256 | input. As in the @expr{1 / 0} case, Calc will only use infinities | 8250 | input. As in the @expr{1 / 0} case, Calc will only use infinities |
| 8257 | here if you have turned on ``infinite'' mode. Otherwise, it will | 8251 | here if you have turned on Infinite mode. Otherwise, it will |
| 8258 | treat @samp{ln(0)} as an error. | 8252 | treat @samp{ln(0)} as an error. |
| 8259 | 8253 | ||
| 8260 | @node Types Answer 3, Types Answer 4, Types Answer 2, Answers to Exercises | 8254 | @node Types Answer 3, Types Answer 4, Types Answer 2, Answers to Exercises |
| @@ -8468,16 +8462,16 @@ Calc normally treats division by zero as an error, so that the formula | |||
| 8468 | @w{@samp{1 / [0 .. 10]}}, also (potentially) divides by zero because zero | 8462 | @w{@samp{1 / [0 .. 10]}}, also (potentially) divides by zero because zero |
| 8469 | is now a member of the interval. So Calc leaves this one unevaluated, too. | 8463 | is now a member of the interval. So Calc leaves this one unevaluated, too. |
| 8470 | 8464 | ||
| 8471 | If you turn on ``infinite'' mode by pressing @kbd{m i}, you will | 8465 | If you turn on Infinite mode by pressing @kbd{m i}, you will |
| 8472 | instead get the answer @samp{[0.1 .. inf]}, which includes infinity | 8466 | instead get the answer @samp{[0.1 .. inf]}, which includes infinity |
| 8473 | as a possible value. | 8467 | as a possible value. |
| 8474 | 8468 | ||
| 8475 | The fourth calculation, @samp{1 / (-10 .. 10)}, has the same problem. | 8469 | The fourth calculation, @samp{1 / (-10 .. 10)}, has the same problem. |
| 8476 | Zero is buried inside the interval, but it's still a possible value. | 8470 | Zero is buried inside the interval, but it's still a possible value. |
| 8477 | It's not hard to see that the actual result of @samp{1 / (-10 .. 10)} | 8471 | It's not hard to see that the actual result of @samp{1 / (-10 .. 10)} |
| 8478 | will be either greater than @i{0.1}, or less than @i{-0.1}. Thus | 8472 | will be either greater than @mathit{0.1}, or less than @mathit{-0.1}. Thus |
| 8479 | the interval goes from minus infinity to plus infinity, with a ``hole'' | 8473 | the interval goes from minus infinity to plus infinity, with a ``hole'' |
| 8480 | in it from @i{-0.1} to @i{0.1}. Calc doesn't have any way to | 8474 | in it from @mathit{-0.1} to @mathit{0.1}. Calc doesn't have any way to |
| 8481 | represent this, so it just reports @samp{[-inf .. inf]} as the answer. | 8475 | represent this, so it just reports @samp{[-inf .. inf]} as the answer. |
| 8482 | It may be disappointing to hear ``the answer lies somewhere between | 8476 | It may be disappointing to hear ``the answer lies somewhere between |
| 8483 | minus infinity and plus infinity, inclusive,'' but that's the best | 8477 | minus infinity and plus infinity, inclusive,'' but that's the best |
| @@ -8497,9 +8491,9 @@ that interval arithmetic can do in this case. | |||
| 8497 | @end smallexample | 8491 | @end smallexample |
| 8498 | 8492 | ||
| 8499 | @noindent | 8493 | @noindent |
| 8500 | In the first case the result says, ``if a number is between @i{-3} and | 8494 | In the first case the result says, ``if a number is between @mathit{-3} and |
| 8501 | 3, its square is between 0 and 9.'' The second case says, ``the product | 8495 | 3, its square is between 0 and 9.'' The second case says, ``the product |
| 8502 | of two numbers each between @i{-3} and 3 is between @i{-9} and 9.'' | 8496 | of two numbers each between @mathit{-3} and 3 is between @mathit{-9} and 9.'' |
| 8503 | 8497 | ||
| 8504 | An interval form is not a number; it is a symbol that can stand for | 8498 | An interval form is not a number; it is a symbol that can stand for |
| 8505 | many different numbers. Two identical-looking interval forms can stand | 8499 | many different numbers. Two identical-looking interval forms can stand |
| @@ -9131,7 +9125,7 @@ But then: | |||
| 9131 | @end group | 9125 | @end group |
| 9132 | @end smallexample | 9126 | @end smallexample |
| 9133 | 9127 | ||
| 9134 | Perhaps more surprisingly, this rule still works with infinite mode | 9128 | Perhaps more surprisingly, this rule still works with Infinite mode |
| 9135 | turned on. Calc tries @code{EvalRules} before any built-in rules for | 9129 | turned on. Calc tries @code{EvalRules} before any built-in rules for |
| 9136 | a function. This allows you to override the default behavior of any | 9130 | a function. This allows you to override the default behavior of any |
| 9137 | Calc feature: Even though Calc now wants to evaluate @expr{0^0} to | 9131 | Calc feature: Even though Calc now wants to evaluate @expr{0^0} to |
| @@ -9255,7 +9249,7 @@ algebraic entry, whichever way you prefer: | |||
| 9255 | 9249 | ||
| 9256 | @noindent | 9250 | @noindent |
| 9257 | Computing | 9251 | Computing |
| 9258 | @texline @tmath{\displaystyle{\sin x \over x}}: | 9252 | @texline @math{\displaystyle{\sin x \over x}}: |
| 9259 | @infoline @expr{sin(x) / x}: | 9253 | @infoline @expr{sin(x) / x}: |
| 9260 | 9254 | ||
| 9261 | Using the stack: @kbd{C-x ( @key{RET} S @key{TAB} / C-x )}. | 9255 | Using the stack: @kbd{C-x ( @key{RET} S @key{TAB} / C-x )}. |
| @@ -9326,7 +9320,7 @@ C-x ( ' [0, 1; 1, 1] ^ ($-1) * [1, 1] @key{RET} v u @key{DEL} C-x ) | |||
| 9326 | @noindent | 9320 | @noindent |
| 9327 | This program is quite efficient because Calc knows how to raise a | 9321 | This program is quite efficient because Calc knows how to raise a |
| 9328 | matrix (or other value) to the power @expr{n} in only | 9322 | matrix (or other value) to the power @expr{n} in only |
| 9329 | @texline @tmath{\log_2 n} | 9323 | @texline @math{\log_2 n} |
| 9330 | @infoline @expr{log(n,2)} | 9324 | @infoline @expr{log(n,2)} |
| 9331 | steps. For example, this program can compute the 1000th Fibonacci | 9325 | steps. For example, this program can compute the 1000th Fibonacci |
| 9332 | number (a 209-digit integer!) in about 10 steps; even though the | 9326 | number (a 209-digit integer!) in about 10 steps; even though the |
| @@ -9380,7 +9374,7 @@ harmonic number is 4.02. | |||
| 9380 | @noindent | 9374 | @noindent |
| 9381 | The first step is to compute the derivative @expr{f'(x)} and thus | 9375 | The first step is to compute the derivative @expr{f'(x)} and thus |
| 9382 | the formula | 9376 | the formula |
| 9383 | @texline @tmath{\displaystyle{x - {f(x) \over f'(x)}}}. | 9377 | @texline @math{\displaystyle{x - {f(x) \over f'(x)}}}. |
| 9384 | @infoline @expr{x - f(x)/f'(x)}. | 9378 | @infoline @expr{x - f(x)/f'(x)}. |
| 9385 | 9379 | ||
| 9386 | (Because this definition is long, it will be repeated in concise form | 9380 | (Because this definition is long, it will be repeated in concise form |
| @@ -9497,10 +9491,10 @@ method (among others) to look for numerical solutions to any equation. | |||
| 9497 | The first step is to adjust @expr{z} to be greater than 5. A simple | 9491 | The first step is to adjust @expr{z} to be greater than 5. A simple |
| 9498 | ``for'' loop will do the job here. If @expr{z} is less than 5, we | 9492 | ``for'' loop will do the job here. If @expr{z} is less than 5, we |
| 9499 | reduce the problem using | 9493 | reduce the problem using |
| 9500 | @texline @tmath{\psi(z) = \psi(z+1) - 1/z}. | 9494 | @texline @math{\psi(z) = \psi(z+1) - 1/z}. |
| 9501 | @infoline @expr{psi(z) = psi(z+1) - 1/z}. We go | 9495 | @infoline @expr{psi(z) = psi(z+1) - 1/z}. We go |
| 9502 | on to compute | 9496 | on to compute |
| 9503 | @texline @tmath{\psi(z+1)}, | 9497 | @texline @math{\psi(z+1)}, |
| 9504 | @infoline @expr{psi(z+1)}, | 9498 | @infoline @expr{psi(z+1)}, |
| 9505 | and remember to add back a factor of @expr{-1/z} when we're done. This | 9499 | and remember to add back a factor of @expr{-1/z} when we're done. This |
| 9506 | step is repeated until @expr{z > 5}. | 9500 | step is repeated until @expr{z > 5}. |
| @@ -9541,7 +9535,7 @@ are exactly equal, not just equal to within the current precision.) | |||
| 9541 | @end smallexample | 9535 | @end smallexample |
| 9542 | 9536 | ||
| 9543 | Now we compute the initial part of the sum: | 9537 | Now we compute the initial part of the sum: |
| 9544 | @texline @tmath{\ln z - {1 \over 2z}} | 9538 | @texline @math{\ln z - {1 \over 2z}} |
| 9545 | @infoline @expr{ln(z) - 1/2z} | 9539 | @infoline @expr{ln(z) - 1/2z} |
| 9546 | minus the adjustment factor. | 9540 | minus the adjustment factor. |
| 9547 | 9541 | ||
| @@ -9584,7 +9578,7 @@ up the value of @expr{2 n}. (Calc does have a summation command, | |||
| 9584 | @end smallexample | 9578 | @end smallexample |
| 9585 | 9579 | ||
| 9586 | This is the value of | 9580 | This is the value of |
| 9587 | @texline @tmath{-\gamma}, | 9581 | @texline @math{-\gamma}, |
| 9588 | @infoline @expr{- gamma}, | 9582 | @infoline @expr{- gamma}, |
| 9589 | with a slight bit of roundoff error. To get a full 12 digits, let's use | 9583 | with a slight bit of roundoff error. To get a full 12 digits, let's use |
| 9590 | a higher precision: | 9584 | a higher precision: |
| @@ -9619,7 +9613,7 @@ C-x ) | |||
| 9619 | @noindent | 9613 | @noindent |
| 9620 | Taking the derivative of a term of the form @expr{x^n} will produce | 9614 | Taking the derivative of a term of the form @expr{x^n} will produce |
| 9621 | a term like | 9615 | a term like |
| 9622 | @texline @tmath{n x^{n-1}}. | 9616 | @texline @math{n x^{n-1}}. |
| 9623 | @infoline @expr{n x^(n-1)}. | 9617 | @infoline @expr{n x^(n-1)}. |
| 9624 | Taking the derivative of a constant | 9618 | Taking the derivative of a constant |
| 9625 | produces zero. From this it is easy to see that the @expr{n}th | 9619 | produces zero. From this it is easy to see that the @expr{n}th |
| @@ -9896,10 +9890,10 @@ By default this creates a pair of small windows, @samp{*Calculator*} | |||
| 9896 | and @samp{*Calc Trail*}. The former displays the contents of the | 9890 | and @samp{*Calc Trail*}. The former displays the contents of the |
| 9897 | Calculator stack and is manipulated exclusively through Calc commands. | 9891 | Calculator stack and is manipulated exclusively through Calc commands. |
| 9898 | It is possible (though not usually necessary) to create several Calc | 9892 | It is possible (though not usually necessary) to create several Calc |
| 9899 | Mode buffers each of which has an independent stack, undo list, and | 9893 | mode buffers each of which has an independent stack, undo list, and |
| 9900 | mode settings. There is exactly one Calc Trail buffer; it records a | 9894 | mode settings. There is exactly one Calc Trail buffer; it records a |
| 9901 | list of the results of all calculations that have been done. The | 9895 | list of the results of all calculations that have been done. The |
| 9902 | Calc Trail buffer uses a variant of Calc Mode, so Calculator commands | 9896 | Calc Trail buffer uses a variant of Calc mode, so Calculator commands |
| 9903 | still work when the trail buffer's window is selected. It is possible | 9897 | still work when the trail buffer's window is selected. It is possible |
| 9904 | to turn the trail window off, but the @samp{*Calc Trail*} buffer itself | 9898 | to turn the trail window off, but the @samp{*Calc Trail*} buffer itself |
| 9905 | still exists and is updated silently. @xref{Trail Commands}. | 9899 | still exists and is updated silently. @xref{Trail Commands}. |
| @@ -9913,7 +9907,7 @@ still exists and is updated silently. @xref{Trail Commands}. | |||
| 9913 | In most installations, the @kbd{M-# c} key sequence is a more | 9907 | In most installations, the @kbd{M-# c} key sequence is a more |
| 9914 | convenient way to start the Calculator. Also, @kbd{M-# M-#} and | 9908 | convenient way to start the Calculator. Also, @kbd{M-# M-#} and |
| 9915 | @kbd{M-# #} are synonyms for @kbd{M-# c} unless you last used Calc | 9909 | @kbd{M-# #} are synonyms for @kbd{M-# c} unless you last used Calc |
| 9916 | in its ``keypad'' mode. | 9910 | in its Keypad mode. |
| 9917 | 9911 | ||
| 9918 | @kindex x | 9912 | @kindex x |
| 9919 | @kindex M-x | 9913 | @kindex M-x |
| @@ -9985,7 +9979,7 @@ the keys with the mouse to operate the calculator. @xref{Keypad Mode}. | |||
| 9985 | @pindex calc-quit | 9979 | @pindex calc-quit |
| 9986 | @cindex Quitting the Calculator | 9980 | @cindex Quitting the Calculator |
| 9987 | @cindex Exiting the Calculator | 9981 | @cindex Exiting the Calculator |
| 9988 | The @kbd{q} key (@code{calc-quit}) exits Calc Mode and closes the | 9982 | The @kbd{q} key (@code{calc-quit}) exits Calc mode and closes the |
| 9989 | Calculator's window(s). It does not delete the Calculator buffers. | 9983 | Calculator's window(s). It does not delete the Calculator buffers. |
| 9990 | If you type @kbd{M-x calc} again, the Calculator will reappear with the | 9984 | If you type @kbd{M-x calc} again, the Calculator will reappear with the |
| 9991 | contents of the stack intact. Typing @kbd{M-# c} or @kbd{M-# M-#} | 9985 | contents of the stack intact. Typing @kbd{M-# c} or @kbd{M-# M-#} |
| @@ -10193,7 +10187,7 @@ The first three keystrokes ``push'' the numbers 1 and 2 onto the stack. The | |||
| 10193 | @kbd{+} key always ``pops'' the top two numbers from the stack, adds them, | 10187 | @kbd{+} key always ``pops'' the top two numbers from the stack, adds them, |
| 10194 | and pushes the result (3) back onto the stack. This number is ready for | 10188 | and pushes the result (3) back onto the stack. This number is ready for |
| 10195 | further calculations: @kbd{5 -} pushes 5 onto the stack, then pops the | 10189 | further calculations: @kbd{5 -} pushes 5 onto the stack, then pops the |
| 10196 | 3 and 5, subtracts them, and pushes the result (@i{-2}). | 10190 | 3 and 5, subtracts them, and pushes the result (@mathit{-2}). |
| 10197 | 10191 | ||
| 10198 | Note that the ``top'' of the stack actually appears at the @emph{bottom} | 10192 | Note that the ``top'' of the stack actually appears at the @emph{bottom} |
| 10199 | of the buffer. A line containing a single @samp{.} character signifies | 10193 | of the buffer. A line containing a single @samp{.} character signifies |
| @@ -10256,7 +10250,7 @@ the two numbers on the top of the stack. The @kbd{n} key changes the sign | |||
| 10256 | of the number on the top of the stack or the number currently being entered. | 10250 | of the number on the top of the stack or the number currently being entered. |
| 10257 | The @kbd{_} key begins entry of a negative number or changes the sign of | 10251 | The @kbd{_} key begins entry of a negative number or changes the sign of |
| 10258 | the number currently being entered. The following sequences all enter the | 10252 | the number currently being entered. The following sequences all enter the |
| 10259 | number @i{-5} onto the stack: @kbd{0 @key{RET} 5 -}, @kbd{5 n @key{RET}}, | 10253 | number @mathit{-5} onto the stack: @kbd{0 @key{RET} 5 -}, @kbd{5 n @key{RET}}, |
| 10260 | @kbd{5 @key{RET} n}, @kbd{_ 5 @key{RET}}, @kbd{5 _ @key{RET}}. | 10254 | @kbd{5 @key{RET} n}, @kbd{_ 5 @key{RET}}, @kbd{5 _ @key{RET}}. |
| 10261 | 10255 | ||
| 10262 | Some other keys are active during numeric entry, such as @kbd{#} for | 10256 | Some other keys are active during numeric entry, such as @kbd{#} for |
| @@ -10277,7 +10271,7 @@ During numeric entry, the only editing key available is @key{DEL}. | |||
| 10277 | Calculations can also be entered in algebraic form. This is accomplished | 10271 | Calculations can also be entered in algebraic form. This is accomplished |
| 10278 | by typing the apostrophe key, @kbd{'}, followed by the expression in | 10272 | by typing the apostrophe key, @kbd{'}, followed by the expression in |
| 10279 | standard format: @kbd{@key{'} 2+3*4 @key{RET}} computes | 10273 | standard format: @kbd{@key{'} 2+3*4 @key{RET}} computes |
| 10280 | @texline @tmath{2+(3\times4) = 14} | 10274 | @texline @math{2+(3\times4) = 14} |
| 10281 | @infoline @expr{2+(3*4) = 14} | 10275 | @infoline @expr{2+(3*4) = 14} |
| 10282 | and pushes that on the stack. If you wish you can | 10276 | and pushes that on the stack. If you wish you can |
| 10283 | ignore the RPN aspect of Calc altogether and simply enter algebraic | 10277 | ignore the RPN aspect of Calc altogether and simply enter algebraic |
| @@ -10285,7 +10279,7 @@ expressions in this way. You may want to use @key{DEL} every so often to | |||
| 10285 | clear previous results off the stack. | 10279 | clear previous results off the stack. |
| 10286 | 10280 | ||
| 10287 | You can press the apostrophe key during normal numeric entry to switch | 10281 | You can press the apostrophe key during normal numeric entry to switch |
| 10288 | the half-entered number into algebraic entry mode. One reason to do this | 10282 | the half-entered number into Algebraic entry mode. One reason to do this |
| 10289 | would be to use the full Emacs cursor motion and editing keys, which are | 10283 | would be to use the full Emacs cursor motion and editing keys, which are |
| 10290 | available during algebraic entry but not during numeric entry. | 10284 | available during algebraic entry but not during numeric entry. |
| 10291 | 10285 | ||
| @@ -10296,7 +10290,7 @@ you complete your half-finished entry in a separate buffer. | |||
| 10296 | 10290 | ||
| 10297 | @kindex m a | 10291 | @kindex m a |
| 10298 | @pindex calc-algebraic-mode | 10292 | @pindex calc-algebraic-mode |
| 10299 | @cindex Algebraic mode | 10293 | @cindex Algebraic Mode |
| 10300 | If you prefer algebraic entry, you can use the command @kbd{m a} | 10294 | If you prefer algebraic entry, you can use the command @kbd{m a} |
| 10301 | (@code{calc-algebraic-mode}) to set Algebraic mode. In this mode, | 10295 | (@code{calc-algebraic-mode}) to set Algebraic mode. In this mode, |
| 10302 | digits and other keys that would normally start numeric entry instead | 10296 | digits and other keys that would normally start numeric entry instead |
| @@ -10307,7 +10301,7 @@ but you will have to press @key{RET} to terminate every number: | |||
| 10307 | @kbd{2 @key{RET} 3 @key{RET} * 4 @key{RET} +} would accomplish the same | 10301 | @kbd{2 @key{RET} 3 @key{RET} * 4 @key{RET} +} would accomplish the same |
| 10308 | thing as @kbd{2*3+4 @key{RET}}. | 10302 | thing as @kbd{2*3+4 @key{RET}}. |
| 10309 | 10303 | ||
| 10310 | @cindex Incomplete algebraic mode | 10304 | @cindex Incomplete Algebraic Mode |
| 10311 | If you give a numeric prefix argument like @kbd{C-u} to the @kbd{m a} | 10305 | If you give a numeric prefix argument like @kbd{C-u} to the @kbd{m a} |
| 10312 | command, it enables Incomplete Algebraic mode; this is like regular | 10306 | command, it enables Incomplete Algebraic mode; this is like regular |
| 10313 | Algebraic mode except that it applies to the @kbd{(} and @kbd{[} keys | 10307 | Algebraic mode except that it applies to the @kbd{(} and @kbd{[} keys |
| @@ -10315,15 +10309,15 @@ only. Numeric keys still begin a numeric entry in this mode. | |||
| 10315 | 10309 | ||
| 10316 | @kindex m t | 10310 | @kindex m t |
| 10317 | @pindex calc-total-algebraic-mode | 10311 | @pindex calc-total-algebraic-mode |
| 10318 | @cindex Total algebraic mode | 10312 | @cindex Total Algebraic Mode |
| 10319 | The @kbd{m t} (@code{calc-total-algebraic-mode}) gives you an even | 10313 | The @kbd{m t} (@code{calc-total-algebraic-mode}) gives you an even |
| 10320 | stronger algebraic-entry mode, in which @emph{all} regular letter and | 10314 | stronger algebraic-entry mode, in which @emph{all} regular letter and |
| 10321 | punctuation keys begin algebraic entry. Use this if you prefer typing | 10315 | punctuation keys begin algebraic entry. Use this if you prefer typing |
| 10322 | @w{@kbd{sqrt( )}} instead of @kbd{Q}, @w{@kbd{factor( )}} instead of | 10316 | @w{@kbd{sqrt( )}} instead of @kbd{Q}, @w{@kbd{factor( )}} instead of |
| 10323 | @kbd{a f}, and so on. To type regular Calc commands when you are in | 10317 | @kbd{a f}, and so on. To type regular Calc commands when you are in |
| 10324 | ``total'' algebraic mode, hold down the @key{META} key. Thus @kbd{M-q} | 10318 | Total Algebraic mode, hold down the @key{META} key. Thus @kbd{M-q} |
| 10325 | is the command to quit Calc, @kbd{M-p} sets the precision, and | 10319 | is the command to quit Calc, @kbd{M-p} sets the precision, and |
| 10326 | @kbd{M-m t} (or @kbd{M-m M-t}, if you prefer) turns total algebraic | 10320 | @kbd{M-m t} (or @kbd{M-m M-t}, if you prefer) turns Total Algebraic |
| 10327 | mode back off again. Meta keys also terminate algebraic entry, so | 10321 | mode back off again. Meta keys also terminate algebraic entry, so |
| 10328 | that @kbd{2+3 M-S} is equivalent to @kbd{2+3 @key{RET} M-S}. The symbol | 10322 | that @kbd{2+3 M-S} is equivalent to @kbd{2+3 @key{RET} M-S}. The symbol |
| 10329 | @samp{Alg*} will appear in the mode line whenever you are in this mode. | 10323 | @samp{Alg*} will appear in the mode line whenever you are in this mode. |
| @@ -10584,7 +10578,7 @@ that you must always press @kbd{w} yourself to see the messages). | |||
| 10584 | 10578 | ||
| 10585 | @noindent | 10579 | @noindent |
| 10586 | @pindex another-calc | 10580 | @pindex another-calc |
| 10587 | It is possible to have any number of Calc Mode buffers at once. | 10581 | It is possible to have any number of Calc mode buffers at once. |
| 10588 | Usually this is done by executing @kbd{M-x another-calc}, which | 10582 | Usually this is done by executing @kbd{M-x another-calc}, which |
| 10589 | is similar to @kbd{M-# c} except that if a @samp{*Calculator*} | 10583 | is similar to @kbd{M-# c} except that if a @samp{*Calculator*} |
| 10590 | buffer already exists, a new, independent one with a name of the | 10584 | buffer already exists, a new, independent one with a name of the |
| @@ -10687,7 +10681,7 @@ approximation. This value will not need to be recomputed ever again | |||
| 10687 | unless you raise the precision still further. Many operations such as | 10681 | unless you raise the precision still further. Many operations such as |
| 10688 | logarithms and sines make use of similarly cached values such as | 10682 | logarithms and sines make use of similarly cached values such as |
| 10689 | @cpiover{4} and | 10683 | @cpiover{4} and |
| 10690 | @texline @tmath{\ln 2}. | 10684 | @texline @math{\ln 2}. |
| 10691 | @infoline @expr{ln(2)}. | 10685 | @infoline @expr{ln(2)}. |
| 10692 | The visible effect of caching is that | 10686 | The visible effect of caching is that |
| 10693 | high-precision computations may seem to do extra work the first time. | 10687 | high-precision computations may seem to do extra work the first time. |
| @@ -10799,7 +10793,7 @@ The Calculator stores integers to arbitrary precision. Addition, | |||
| 10799 | subtraction, and multiplication of integers always yields an exact | 10793 | subtraction, and multiplication of integers always yields an exact |
| 10800 | integer result. (If the result of a division or exponentiation of | 10794 | integer result. (If the result of a division or exponentiation of |
| 10801 | integers is not an integer, it is expressed in fractional or | 10795 | integers is not an integer, it is expressed in fractional or |
| 10802 | floating-point form according to the current Fraction Mode. | 10796 | floating-point form according to the current Fraction mode. |
| 10803 | @xref{Fraction Mode}.) | 10797 | @xref{Fraction Mode}.) |
| 10804 | 10798 | ||
| 10805 | A decimal integer is represented as an optional sign followed by a | 10799 | A decimal integer is represented as an optional sign followed by a |
| @@ -10825,7 +10819,7 @@ A @dfn{fraction} is a ratio of two integers. Fractions are traditionally | |||
| 10825 | written ``2/3'' but Calc uses the notation @samp{2:3}. (The @kbd{/} key | 10819 | written ``2/3'' but Calc uses the notation @samp{2:3}. (The @kbd{/} key |
| 10826 | performs RPN division; the following two sequences push the number | 10820 | performs RPN division; the following two sequences push the number |
| 10827 | @samp{2:3} on the stack: @kbd{2 :@: 3 @key{RET}}, or @kbd{2 @key{RET} 3 /} | 10821 | @samp{2:3} on the stack: @kbd{2 :@: 3 @key{RET}}, or @kbd{2 @key{RET} 3 /} |
| 10828 | assuming Fraction Mode has been enabled.) | 10822 | assuming Fraction mode has been enabled.) |
| 10829 | When the Calculator produces a fractional result it always reduces it to | 10823 | When the Calculator produces a fractional result it always reduces it to |
| 10830 | simplest form, which may in fact be an integer. | 10824 | simplest form, which may in fact be an integer. |
| 10831 | 10825 | ||
| @@ -10846,10 +10840,10 @@ A floating-point number or @dfn{float} is a number stored in scientific | |||
| 10846 | notation. The number of significant digits in the fractional part is | 10840 | notation. The number of significant digits in the fractional part is |
| 10847 | governed by the current floating precision (@pxref{Precision}). The | 10841 | governed by the current floating precision (@pxref{Precision}). The |
| 10848 | range of acceptable values is from | 10842 | range of acceptable values is from |
| 10849 | @texline @tmath{10^{-3999999}} | 10843 | @texline @math{10^{-3999999}} |
| 10850 | @infoline @expr{10^-3999999} | 10844 | @infoline @expr{10^-3999999} |
| 10851 | (inclusive) to | 10845 | (inclusive) to |
| 10852 | @texline @tmath{10^{4000000}} | 10846 | @texline @math{10^{4000000}} |
| 10853 | @infoline @expr{10^4000000} | 10847 | @infoline @expr{10^4000000} |
| 10854 | (exclusive), plus the corresponding negative values and zero. | 10848 | (exclusive), plus the corresponding negative values and zero. |
| 10855 | 10849 | ||
| @@ -10921,16 +10915,16 @@ Rectangular complex numbers can also be displayed in @samp{@var{a}+@var{b}i} | |||
| 10921 | notation; @pxref{Complex Formats}. | 10915 | notation; @pxref{Complex Formats}. |
| 10922 | 10916 | ||
| 10923 | Polar complex numbers are displayed in the form | 10917 | Polar complex numbers are displayed in the form |
| 10924 | @texline `@t{(}@var{r}@t{;}@tmath{\theta}@t{)}' | 10918 | @texline `@t{(}@var{r}@t{;}@math{\theta}@t{)}' |
| 10925 | @infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}' | 10919 | @infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}' |
| 10926 | where @var{r} is the nonnegative magnitude and | 10920 | where @var{r} is the nonnegative magnitude and |
| 10927 | @texline @tmath{\theta} | 10921 | @texline @math{\theta} |
| 10928 | @infoline @var{theta} | 10922 | @infoline @var{theta} |
| 10929 | is the argument or phase angle. The range of | 10923 | is the argument or phase angle. The range of |
| 10930 | @texline @tmath{\theta} | 10924 | @texline @math{\theta} |
| 10931 | @infoline @var{theta} | 10925 | @infoline @var{theta} |
| 10932 | depends on the current angular mode (@pxref{Angular Modes}); it is | 10926 | depends on the current angular mode (@pxref{Angular Modes}); it is |
| 10933 | generally between @i{-180} and @i{+180} degrees or the equivalent range | 10927 | generally between @mathit{-180} and @mathit{+180} degrees or the equivalent range |
| 10934 | in radians. | 10928 | in radians. |
| 10935 | 10929 | ||
| 10936 | Complex numbers are entered in stages using incomplete objects. | 10930 | Complex numbers are entered in stages using incomplete objects. |
| @@ -10939,7 +10933,7 @@ Complex numbers are entered in stages using incomplete objects. | |||
| 10939 | Operations on rectangular complex numbers yield rectangular complex | 10933 | Operations on rectangular complex numbers yield rectangular complex |
| 10940 | results, and similarly for polar complex numbers. Where the two types | 10934 | results, and similarly for polar complex numbers. Where the two types |
| 10941 | are mixed, or where new complex numbers arise (as for the square root of | 10935 | are mixed, or where new complex numbers arise (as for the square root of |
| 10942 | a negative real), the current @dfn{Polar Mode} is used to determine the | 10936 | a negative real), the current @dfn{Polar mode} is used to determine the |
| 10943 | type. @xref{Polar Mode}. | 10937 | type. @xref{Polar Mode}. |
| 10944 | 10938 | ||
| 10945 | A complex result in which the imaginary part is zero (or the phase angle | 10939 | A complex result in which the imaginary part is zero (or the phase angle |
| @@ -10973,7 +10967,7 @@ larger, becomes arbitrarily close to zero. So you can imagine | |||
| 10973 | that if @expr{x} got ``all the way to infinity,'' then @expr{1 / x} | 10967 | that if @expr{x} got ``all the way to infinity,'' then @expr{1 / x} |
| 10974 | would go all the way to zero. Similarly, when they say that | 10968 | would go all the way to zero. Similarly, when they say that |
| 10975 | @samp{exp(inf) = inf}, they mean that | 10969 | @samp{exp(inf) = inf}, they mean that |
| 10976 | @texline @tmath{e^x} | 10970 | @texline @math{e^x} |
| 10977 | @infoline @expr{exp(x)} | 10971 | @infoline @expr{exp(x)} |
| 10978 | grows without bound as @expr{x} grows. The symbol @samp{-inf} likewise | 10972 | grows without bound as @expr{x} grows. The symbol @samp{-inf} likewise |
| 10979 | stands for an infinitely negative real value; for example, we say that | 10973 | stands for an infinitely negative real value; for example, we say that |
| @@ -11027,7 +11021,7 @@ infinity, it's just that @emph{which} number it stands for | |||
| 11027 | cannot be determined.) In Calc's notation, @samp{0 * inf = nan} | 11021 | cannot be determined.) In Calc's notation, @samp{0 * inf = nan} |
| 11028 | and @samp{inf / inf = nan}. A few other common indeterminate | 11022 | and @samp{inf / inf = nan}. A few other common indeterminate |
| 11029 | expressions are @samp{inf - inf} and @samp{inf ^ 0}. Also, | 11023 | expressions are @samp{inf - inf} and @samp{inf ^ 0}. Also, |
| 11030 | @samp{0 / 0 = nan} if you have turned on ``infinite mode'' | 11024 | @samp{0 / 0 = nan} if you have turned on Infinite mode |
| 11031 | (as described above). | 11025 | (as described above). |
| 11032 | 11026 | ||
| 11033 | Infinities are especially useful as parts of @dfn{intervals}. | 11027 | Infinities are especially useful as parts of @dfn{intervals}. |
| @@ -11070,7 +11064,7 @@ of its elements. | |||
| 11070 | @tindex vec | 11064 | @tindex vec |
| 11071 | Algebraic functions for building vectors include @samp{vec(a, b, c)} | 11065 | Algebraic functions for building vectors include @samp{vec(a, b, c)} |
| 11072 | to build @samp{[a, b, c]}, @samp{cvec(a, n, m)} to build an | 11066 | to build @samp{[a, b, c]}, @samp{cvec(a, n, m)} to build an |
| 11073 | @texline @tmath{n\times m} | 11067 | @texline @math{n\times m} |
| 11074 | @infoline @var{n}x@var{m} | 11068 | @infoline @var{n}x@var{m} |
| 11075 | matrix of @samp{a}s, and @samp{index(n)} to build a vector of integers | 11069 | matrix of @samp{a}s, and @samp{index(n)} to build a vector of integers |
| 11076 | from 1 to @samp{n}. | 11070 | from 1 to @samp{n}. |
| @@ -11201,7 +11195,7 @@ The @var{mins} value is an integer or integer-valued float between 0 and 59. | |||
| 11201 | The @var{secs} value is a real number between 0 (inclusive) and 60 | 11195 | The @var{secs} value is a real number between 0 (inclusive) and 60 |
| 11202 | (exclusive). A positive HMS form is interpreted as @var{hours} + | 11196 | (exclusive). A positive HMS form is interpreted as @var{hours} + |
| 11203 | @var{mins}/60 + @var{secs}/3600. A negative HMS form is interpreted | 11197 | @var{mins}/60 + @var{secs}/3600. A negative HMS form is interpreted |
| 11204 | as @i{- @var{hours}} @i{-} @var{mins}/60 @i{-} @var{secs}/3600. | 11198 | as @mathit{- @var{hours}} @mathit{-} @var{mins}/60 @mathit{-} @var{secs}/3600. |
| 11205 | Display format for HMS forms is quite flexible. @xref{HMS Formats}. | 11199 | Display format for HMS forms is quite flexible. @xref{HMS Formats}. |
| 11206 | 11200 | ||
| 11207 | HMS forms can be added and subtracted. When they are added to numbers, | 11201 | HMS forms can be added and subtracted. When they are added to numbers, |
| @@ -11295,12 +11289,12 @@ between, say, @samp{<12:00am Mon Jan 1, 1900>} and | |||
| 11295 | 11289 | ||
| 11296 | Calc uses the Julian calendar for all dates before the year 1752, | 11290 | Calc uses the Julian calendar for all dates before the year 1752, |
| 11297 | including dates BC when the Julian calendar technically had not | 11291 | including dates BC when the Julian calendar technically had not |
| 11298 | yet been invented. Thus the claim that day number @i{-10000} is | 11292 | yet been invented. Thus the claim that day number @mathit{-10000} is |
| 11299 | called ``August 16, 28 BC'' should be taken with a grain of salt. | 11293 | called ``August 16, 28 BC'' should be taken with a grain of salt. |
| 11300 | 11294 | ||
| 11301 | Please note that there is no ``year 0''; the day before | 11295 | Please note that there is no ``year 0''; the day before |
| 11302 | @samp{<Sat Jan 1, +1>} is @samp{<Fri Dec 31, -1>}. These are | 11296 | @samp{<Sat Jan 1, +1>} is @samp{<Fri Dec 31, -1>}. These are |
| 11303 | days 0 and @i{-1} respectively in Calc's internal numbering scheme. | 11297 | days 0 and @mathit{-1} respectively in Calc's internal numbering scheme. |
| 11304 | 11298 | ||
| 11305 | @cindex Julian day counting | 11299 | @cindex Julian day counting |
| 11306 | Another day counting system in common use is, confusingly, also | 11300 | Another day counting system in common use is, confusingly, also |
| @@ -11308,7 +11302,7 @@ called ``Julian.'' It was invented in 1583 by Joseph Justus | |||
| 11308 | Scaliger, who named it in honor of his father Julius Caesar | 11302 | Scaliger, who named it in honor of his father Julius Caesar |
| 11309 | Scaliger. For obscure reasons he chose to start his day | 11303 | Scaliger. For obscure reasons he chose to start his day |
| 11310 | numbering on Jan 1, 4713 BC at noon, which in Calc's scheme | 11304 | numbering on Jan 1, 4713 BC at noon, which in Calc's scheme |
| 11311 | is @i{-1721423.5} (recall that Calc starts at midnight instead | 11305 | is @mathit{-1721423.5} (recall that Calc starts at midnight instead |
| 11312 | of noon). Thus to convert a Calc date code obtained by | 11306 | of noon). Thus to convert a Calc date code obtained by |
| 11313 | unpacking a date form into a Julian day number, simply add | 11307 | unpacking a date form into a Julian day number, simply add |
| 11314 | 1721423.5. The Julian code for @samp{6:00am Jan 9, 1991} | 11308 | 1721423.5. The Julian code for @samp{6:00am Jan 9, 1991} |
| @@ -11341,7 +11335,7 @@ an integer multiple of) some value @var{M}. Arithmetic modulo @var{M} | |||
| 11341 | often arises in number theory. Modulo forms are written | 11335 | often arises in number theory. Modulo forms are written |
| 11342 | `@var{a} @t{mod} @var{M}', | 11336 | `@var{a} @t{mod} @var{M}', |
| 11343 | where @var{a} and @var{M} are real numbers or HMS forms, and | 11337 | where @var{a} and @var{M} are real numbers or HMS forms, and |
| 11344 | @texline @tmath{0 \le a < M}. | 11338 | @texline @math{0 \le a < M}. |
| 11345 | @infoline @expr{0 <= a < @var{M}}. | 11339 | @infoline @expr{0 <= a < @var{M}}. |
| 11346 | In many applications @expr{a} and @expr{M} will be | 11340 | In many applications @expr{a} and @expr{M} will be |
| 11347 | integers but this is not required. | 11341 | integers but this is not required. |
| @@ -11373,7 +11367,7 @@ division is left in symbolic form. Other operations, such as square | |||
| 11373 | roots, are not yet supported for modulo forms. (Note that, although | 11367 | roots, are not yet supported for modulo forms. (Note that, although |
| 11374 | @w{`@t{(}@var{a} @t{mod} @var{M}@t{)^.5}'} will compute a ``modulo square root'' | 11368 | @w{`@t{(}@var{a} @t{mod} @var{M}@t{)^.5}'} will compute a ``modulo square root'' |
| 11375 | in the sense of reducing | 11369 | in the sense of reducing |
| 11376 | @texline @tmath{\sqrt a} | 11370 | @texline @math{\sqrt a} |
| 11377 | @infoline @expr{sqrt(a)} | 11371 | @infoline @expr{sqrt(a)} |
| 11378 | modulo @expr{M}, this is not a useful definition from the | 11372 | modulo @expr{M}, this is not a useful definition from the |
| 11379 | number-theoretical point of view.) | 11373 | number-theoretical point of view.) |
| @@ -11423,12 +11417,12 @@ The algebraic function @samp{makemod(a, m)} builds the modulo form | |||
| 11423 | @cindex Standard deviations | 11417 | @cindex Standard deviations |
| 11424 | An @dfn{error form} is a number with an associated standard | 11418 | An @dfn{error form} is a number with an associated standard |
| 11425 | deviation, as in @samp{2.3 +/- 0.12}. The notation | 11419 | deviation, as in @samp{2.3 +/- 0.12}. The notation |
| 11426 | @texline `@var{x} @t{+/-} @tmath{\sigma}' | 11420 | @texline `@var{x} @t{+/-} @math{\sigma}' |
| 11427 | @infoline `@var{x} @t{+/-} sigma' | 11421 | @infoline `@var{x} @t{+/-} sigma' |
| 11428 | stands for an uncertain value which follows | 11422 | stands for an uncertain value which follows |
| 11429 | a normal or Gaussian distribution of mean @expr{x} and standard | 11423 | a normal or Gaussian distribution of mean @expr{x} and standard |
| 11430 | deviation or ``error'' | 11424 | deviation or ``error'' |
| 11431 | @texline @tmath{\sigma}. | 11425 | @texline @math{\sigma}. |
| 11432 | @infoline @expr{sigma}. | 11426 | @infoline @expr{sigma}. |
| 11433 | Both the mean and the error can be either numbers or | 11427 | Both the mean and the error can be either numbers or |
| 11434 | formulas. Generally these are real numbers but the mean may also be | 11428 | formulas. Generally these are real numbers but the mean may also be |
| @@ -11439,7 +11433,7 @@ regular number by the Calculator. | |||
| 11439 | All arithmetic and transcendental functions accept error forms as input. | 11433 | All arithmetic and transcendental functions accept error forms as input. |
| 11440 | Operations on the mean-value part work just like operations on regular | 11434 | Operations on the mean-value part work just like operations on regular |
| 11441 | numbers. The error part for any function @expr{f(x)} (such as | 11435 | numbers. The error part for any function @expr{f(x)} (such as |
| 11442 | @texline @tmath{\sin x} | 11436 | @texline @math{\sin x} |
| 11443 | @infoline @expr{sin(x)}) | 11437 | @infoline @expr{sin(x)}) |
| 11444 | is defined by the error of @expr{x} times the derivative of @expr{f} | 11438 | is defined by the error of @expr{x} times the derivative of @expr{f} |
| 11445 | evaluated at the mean value of @expr{x}. For a two-argument function | 11439 | evaluated at the mean value of @expr{x}. For a two-argument function |
| @@ -11470,34 +11464,34 @@ Consult a good text on error analysis for a discussion of the proper use | |||
| 11470 | of standard deviations. Actual errors often are neither Gaussian-distributed | 11464 | of standard deviations. Actual errors often are neither Gaussian-distributed |
| 11471 | nor uncorrelated, and the above formulas are valid only when errors | 11465 | nor uncorrelated, and the above formulas are valid only when errors |
| 11472 | are small. As an example, the error arising from | 11466 | are small. As an example, the error arising from |
| 11473 | @texline `@t{sin(}@var{x} @t{+/-} @tmath{\sigma}@t{)}' | 11467 | @texline `@t{sin(}@var{x} @t{+/-} @math{\sigma}@t{)}' |
| 11474 | @infoline `@t{sin(}@var{x} @t{+/-} @var{sigma}@t{)}' | 11468 | @infoline `@t{sin(}@var{x} @t{+/-} @var{sigma}@t{)}' |
| 11475 | is | 11469 | is |
| 11476 | @texline `@tmath{\sigma} @t{abs(cos(}@var{x}@t{))}'. | 11470 | @texline `@math{\sigma} @t{abs(cos(}@var{x}@t{))}'. |
| 11477 | @infoline `@var{sigma} @t{abs(cos(}@var{x}@t{))}'. | 11471 | @infoline `@var{sigma} @t{abs(cos(}@var{x}@t{))}'. |
| 11478 | When @expr{x} is close to zero, | 11472 | When @expr{x} is close to zero, |
| 11479 | @texline @tmath{\cos x} | 11473 | @texline @math{\cos x} |
| 11480 | @infoline @expr{cos(x)} | 11474 | @infoline @expr{cos(x)} |
| 11481 | is close to one so the error in the sine is close to | 11475 | is close to one so the error in the sine is close to |
| 11482 | @texline @tmath{\sigma}; | 11476 | @texline @math{\sigma}; |
| 11483 | @infoline @expr{sigma}; | 11477 | @infoline @expr{sigma}; |
| 11484 | this makes sense, since | 11478 | this makes sense, since |
| 11485 | @texline @tmath{\sin x} | 11479 | @texline @math{\sin x} |
| 11486 | @infoline @expr{sin(x)} | 11480 | @infoline @expr{sin(x)} |
| 11487 | is approximately @expr{x} near zero, so a given error in @expr{x} will | 11481 | is approximately @expr{x} near zero, so a given error in @expr{x} will |
| 11488 | produce about the same error in the sine. Likewise, near 90 degrees | 11482 | produce about the same error in the sine. Likewise, near 90 degrees |
| 11489 | @texline @tmath{\cos x} | 11483 | @texline @math{\cos x} |
| 11490 | @infoline @expr{cos(x)} | 11484 | @infoline @expr{cos(x)} |
| 11491 | is nearly zero and so the computed error is | 11485 | is nearly zero and so the computed error is |
| 11492 | small: The sine curve is nearly flat in that region, so an error in @expr{x} | 11486 | small: The sine curve is nearly flat in that region, so an error in @expr{x} |
| 11493 | has relatively little effect on the value of | 11487 | has relatively little effect on the value of |
| 11494 | @texline @tmath{\sin x}. | 11488 | @texline @math{\sin x}. |
| 11495 | @infoline @expr{sin(x)}. | 11489 | @infoline @expr{sin(x)}. |
| 11496 | However, consider @samp{sin(90 +/- 1000)}. The cosine of 90 is zero, so | 11490 | However, consider @samp{sin(90 +/- 1000)}. The cosine of 90 is zero, so |
| 11497 | Calc will report zero error! We get an obviously wrong result because | 11491 | Calc will report zero error! We get an obviously wrong result because |
| 11498 | we have violated the small-error approximation underlying the error | 11492 | we have violated the small-error approximation underlying the error |
| 11499 | analysis. If the error in @expr{x} had been small, the error in | 11493 | analysis. If the error in @expr{x} had been small, the error in |
| 11500 | @texline @tmath{\sin x} | 11494 | @texline @math{\sin x} |
| 11501 | @infoline @expr{sin(x)} | 11495 | @infoline @expr{sin(x)} |
| 11502 | would indeed have been negligible. | 11496 | would indeed have been negligible. |
| 11503 | 11497 | ||
| @@ -11593,10 +11587,10 @@ rather than @samp{1 ..@: 0.1e2}. Add spaces or zeros if you want to | |||
| 11593 | get the other interpretation. If you omit the lower or upper limit, | 11587 | get the other interpretation. If you omit the lower or upper limit, |
| 11594 | a default of @samp{-inf} or @samp{inf} (respectively) is furnished. | 11588 | a default of @samp{-inf} or @samp{inf} (respectively) is furnished. |
| 11595 | 11589 | ||
| 11596 | ``Infinite mode'' also affects operations on intervals | 11590 | Infinite mode also affects operations on intervals |
| 11597 | (@pxref{Infinities}). Calc will always introduce an open infinity, | 11591 | (@pxref{Infinities}). Calc will always introduce an open infinity, |
| 11598 | as in @samp{1 / (0 .. 2] = [0.5 .. inf)}. But closed infinities, | 11592 | as in @samp{1 / (0 .. 2] = [0.5 .. inf)}. But closed infinities, |
| 11599 | @w{@samp{1 / [0 .. 2] = [0.5 .. inf]}}, arise only in infinite mode; | 11593 | @w{@samp{1 / [0 .. 2] = [0.5 .. inf]}}, arise only in Infinite mode; |
| 11600 | otherwise they are left unevaluated. Note that the ``direction'' of | 11594 | otherwise they are left unevaluated. Note that the ``direction'' of |
| 11601 | a zero is not an issue in this case since the zero is always assumed | 11595 | a zero is not an issue in this case since the zero is always assumed |
| 11602 | to be continuous with the rest of the interval. For intervals that | 11596 | to be continuous with the rest of the interval. For intervals that |
| @@ -11606,11 +11600,11 @@ contain zero inside them Calc is forced to give the result, | |||
| 11606 | While it may seem that intervals and error forms are similar, they are | 11600 | While it may seem that intervals and error forms are similar, they are |
| 11607 | based on entirely different concepts of inexact quantities. An error | 11601 | based on entirely different concepts of inexact quantities. An error |
| 11608 | form | 11602 | form |
| 11609 | @texline `@var{x} @t{+/-} @tmath{\sigma}' | 11603 | @texline `@var{x} @t{+/-} @math{\sigma}' |
| 11610 | @infoline `@var{x} @t{+/-} @var{sigma}' | 11604 | @infoline `@var{x} @t{+/-} @var{sigma}' |
| 11611 | means a variable is random, and its value could | 11605 | means a variable is random, and its value could |
| 11612 | be anything but is ``probably'' within one | 11606 | be anything but is ``probably'' within one |
| 11613 | @texline @tmath{\sigma} | 11607 | @texline @math{\sigma} |
| 11614 | @infoline @var{sigma} | 11608 | @infoline @var{sigma} |
| 11615 | of the mean value @expr{x}. An interval | 11609 | of the mean value @expr{x}. An interval |
| 11616 | `@t{[}@var{a} @t{..@:} @var{b}@t{]}' means a | 11610 | `@t{[}@var{a} @t{..@:} @var{b}@t{]}' means a |
| @@ -11844,7 +11838,7 @@ the C-style ``if'' operator @samp{a?b:c} [@code{if}]; | |||
| 11844 | 11838 | ||
| 11845 | Note that, unlike in usual computer notation, multiplication binds more | 11839 | Note that, unlike in usual computer notation, multiplication binds more |
| 11846 | strongly than division: @samp{a*b/c*d} is equivalent to | 11840 | strongly than division: @samp{a*b/c*d} is equivalent to |
| 11847 | @texline @tmath{a b \over c d}. | 11841 | @texline @math{a b \over c d}. |
| 11848 | @infoline @expr{(a*b)/(c*d)}. | 11842 | @infoline @expr{(a*b)/(c*d)}. |
| 11849 | 11843 | ||
| 11850 | @cindex Multiplication, implicit | 11844 | @cindex Multiplication, implicit |
| @@ -11911,7 +11905,7 @@ Commands that interpret (``parse'') text as algebraic formulas include | |||
| 11911 | algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse | 11905 | algebraic entry (@kbd{'}), editing commands like @kbd{`} which parse |
| 11912 | the contents of the editing buffer when you finish, the @kbd{M-# g} | 11906 | the contents of the editing buffer when you finish, the @kbd{M-# g} |
| 11913 | and @w{@kbd{M-# r}} commands, the @kbd{C-y} command, the X window system | 11907 | and @w{@kbd{M-# r}} commands, the @kbd{C-y} command, the X window system |
| 11914 | ``paste'' mouse operation, and Embedded Mode. All of these operations | 11908 | ``paste'' mouse operation, and Embedded mode. All of these operations |
| 11915 | use the same rules for parsing formulas; in particular, language modes | 11909 | use the same rules for parsing formulas; in particular, language modes |
| 11916 | (@pxref{Language Modes}) affect them all in the same way. | 11910 | (@pxref{Language Modes}) affect them all in the same way. |
| 11917 | 11911 | ||
| @@ -12042,11 +12036,11 @@ intervening stack elements toward the top. @kbd{M-@key{TAB}} moves the | |||
| 12042 | element at level @var{n} up to the top. (Compare with @key{LFD}, | 12036 | element at level @var{n} up to the top. (Compare with @key{LFD}, |
| 12043 | which copies instead of moving the element in level @var{n}.) | 12037 | which copies instead of moving the element in level @var{n}.) |
| 12044 | 12038 | ||
| 12045 | With a negative argument @i{-@var{n}}, @key{TAB} rotates the stack | 12039 | With a negative argument @mathit{-@var{n}}, @key{TAB} rotates the stack |
| 12046 | to move the object in level @var{n} to the deepest place in the | 12040 | to move the object in level @var{n} to the deepest place in the |
| 12047 | stack, and the object in level @i{@var{n}+1} to the top. @kbd{M-@key{TAB}} | 12041 | stack, and the object in level @mathit{@var{n}+1} to the top. @kbd{M-@key{TAB}} |
| 12048 | rotates the deepest stack element to be in level @i{n}, also | 12042 | rotates the deepest stack element to be in level @mathit{n}, also |
| 12049 | putting the top stack element in level @i{@var{n}+1}. | 12043 | putting the top stack element in level @mathit{@var{n}+1}. |
| 12050 | 12044 | ||
| 12051 | @xref{Selecting Subformulas}, for a way to apply these commands to | 12045 | @xref{Selecting Subformulas}, for a way to apply these commands to |
| 12052 | any portion of a vector or formula on the stack. | 12046 | any portion of a vector or formula on the stack. |
| @@ -12320,7 +12314,7 @@ Otherwise, the new mode information is appended to the end of the file. | |||
| 12320 | @pindex calc-mode-record-mode | 12314 | @pindex calc-mode-record-mode |
| 12321 | The @kbd{m R} (@code{calc-mode-record-mode}) command tells Calc to | 12315 | The @kbd{m R} (@code{calc-mode-record-mode}) command tells Calc to |
| 12322 | record the new mode settings (as if by pressing @kbd{m m}) every | 12316 | record the new mode settings (as if by pressing @kbd{m m}) every |
| 12323 | time a mode setting changes. If Embedded Mode is enabled, other | 12317 | time a mode setting changes. If Embedded mode is enabled, other |
| 12324 | options are available; @pxref{Mode Settings in Embedded Mode}. | 12318 | options are available; @pxref{Mode Settings in Embedded Mode}. |
| 12325 | 12319 | ||
| 12326 | @kindex m F | 12320 | @kindex m F |
| @@ -12341,8 +12335,8 @@ inside it, @kbd{m F} will not automatically load the new file. This | |||
| 12341 | is because you are presumably switching to your @file{~/.emacs} file, | 12335 | is because you are presumably switching to your @file{~/.emacs} file, |
| 12342 | which may contain other things you don't want to reread. You can give | 12336 | which may contain other things you don't want to reread. You can give |
| 12343 | a numeric prefix argument of 1 to @kbd{m F} to force it to read the | 12337 | a numeric prefix argument of 1 to @kbd{m F} to force it to read the |
| 12344 | file no matter what its name. Conversely, an argument of @i{-1} tells | 12338 | file no matter what its name. Conversely, an argument of @mathit{-1} tells |
| 12345 | @kbd{m F} @emph{not} to read the new file. An argument of 2 or @i{-2} | 12339 | @kbd{m F} @emph{not} to read the new file. An argument of 2 or @mathit{-2} |
| 12346 | tells @kbd{m F} not to reset the modes to their defaults beforehand, | 12340 | tells @kbd{m F} not to reset the modes to their defaults beforehand, |
| 12347 | which is useful if you intend your new file to have a variant of the | 12341 | which is useful if you intend your new file to have a variant of the |
| 12348 | modes present in the file you were using before. | 12342 | modes present in the file you were using before. |
| @@ -12447,7 +12441,7 @@ Hyperbolic Flag, which transforms @code{calc-sin} into @code{calc-sinh}. | |||
| 12447 | If both of these flags are set at once, the effect will be | 12441 | If both of these flags are set at once, the effect will be |
| 12448 | @code{calc-arcsinh}. (The Hyperbolic flag is also used by some | 12442 | @code{calc-arcsinh}. (The Hyperbolic flag is also used by some |
| 12449 | non-trigonometric commands; for example @kbd{H L} computes a base-10, | 12443 | non-trigonometric commands; for example @kbd{H L} computes a base-10, |
| 12450 | instead of base-@i{e}, logarithm.) | 12444 | instead of base-@mathit{e}, logarithm.) |
| 12451 | 12445 | ||
| 12452 | Command names like @code{calc-arcsin} are provided for completeness, and | 12446 | Command names like @code{calc-arcsin} are provided for completeness, and |
| 12453 | may be executed with @kbd{x} or @kbd{M-x}. Their effect is simply to | 12447 | may be executed with @kbd{x} or @kbd{M-x}. Their effect is simply to |
| @@ -12501,7 +12495,7 @@ Functions that compute angles produce a number in radians, a number in | |||
| 12501 | degrees, or an HMS form depending on the current angular mode. If the | 12495 | degrees, or an HMS form depending on the current angular mode. If the |
| 12502 | result is a complex number and the current mode is HMS, the number is | 12496 | result is a complex number and the current mode is HMS, the number is |
| 12503 | instead expressed in degrees. (Complex-number calculations would | 12497 | instead expressed in degrees. (Complex-number calculations would |
| 12504 | normally be done in radians mode, though. Complex numbers are converted | 12498 | normally be done in Radians mode, though. Complex numbers are converted |
| 12505 | to degrees by calculating the complex result in radians and then | 12499 | to degrees by calculating the complex result in radians and then |
| 12506 | multiplying by 180 over @cpi{}.) | 12500 | multiplying by 180 over @cpi{}.) |
| 12507 | 12501 | ||
| @@ -12514,7 +12508,7 @@ multiplying by 180 over @cpi{}.) | |||
| 12514 | The @kbd{m r} (@code{calc-radians-mode}), @kbd{m d} (@code{calc-degrees-mode}), | 12508 | The @kbd{m r} (@code{calc-radians-mode}), @kbd{m d} (@code{calc-degrees-mode}), |
| 12515 | and @kbd{m h} (@code{calc-hms-mode}) commands control the angular mode. | 12509 | and @kbd{m h} (@code{calc-hms-mode}) commands control the angular mode. |
| 12516 | The current angular mode is displayed on the Emacs mode line. | 12510 | The current angular mode is displayed on the Emacs mode line. |
| 12517 | The default angular mode is degrees. | 12511 | The default angular mode is Degrees. |
| 12518 | 12512 | ||
| 12519 | @node Polar Mode, Fraction Mode, Angular Modes, Calculation Modes | 12513 | @node Polar Mode, Fraction Mode, Angular Modes, Calculation Modes |
| 12520 | @subsection Polar Mode | 12514 | @subsection Polar Mode |
| @@ -12530,7 +12524,7 @@ number, or by entering @kbd{( 2 @key{SPC} 3 )}. | |||
| 12530 | @kindex m p | 12524 | @kindex m p |
| 12531 | @pindex calc-polar-mode | 12525 | @pindex calc-polar-mode |
| 12532 | The @kbd{m p} (@code{calc-polar-mode}) command toggles complex-number | 12526 | The @kbd{m p} (@code{calc-polar-mode}) command toggles complex-number |
| 12533 | preference between rectangular and polar forms. In polar mode, all | 12527 | preference between rectangular and polar forms. In Polar mode, all |
| 12534 | of the above example situations would produce polar complex numbers. | 12528 | of the above example situations would produce polar complex numbers. |
| 12535 | 12529 | ||
| 12536 | @node Fraction Mode, Infinite Mode, Polar Mode, Calculation Modes | 12530 | @node Fraction Mode, Infinite Mode, Polar Mode, Calculation Modes |
| @@ -12550,8 +12544,8 @@ even though @kbd{6 @key{RET} 4 /} produces @expr{1.5}. | |||
| 12550 | To set the Calculator to produce fractional results for normal integer | 12544 | To set the Calculator to produce fractional results for normal integer |
| 12551 | divisions, use the @kbd{m f} (@code{calc-frac-mode}) command. | 12545 | divisions, use the @kbd{m f} (@code{calc-frac-mode}) command. |
| 12552 | For example, @expr{8/4} produces @expr{2} in either mode, | 12546 | For example, @expr{8/4} produces @expr{2} in either mode, |
| 12553 | but @expr{6/4} produces @expr{3:2} in Fraction Mode, @expr{1.5} in | 12547 | but @expr{6/4} produces @expr{3:2} in Fraction mode, @expr{1.5} in |
| 12554 | Float Mode. | 12548 | Float mode. |
| 12555 | 12549 | ||
| 12556 | At any time you can use @kbd{c f} (@code{calc-float}) to convert a | 12550 | At any time you can use @kbd{c f} (@code{calc-float}) to convert a |
| 12557 | fraction to a float, or @kbd{c F} (@code{calc-fraction}) to convert a | 12551 | fraction to a float, or @kbd{c F} (@code{calc-fraction}) to convert a |
| @@ -12574,25 +12568,25 @@ on and off. When the mode is off, infinities do not arise except | |||
| 12574 | in calculations that already had infinities as inputs. (One exception | 12568 | in calculations that already had infinities as inputs. (One exception |
| 12575 | is that infinite open intervals like @samp{[0 .. inf)} can be | 12569 | is that infinite open intervals like @samp{[0 .. inf)} can be |
| 12576 | generated; however, intervals closed at infinity (@samp{[0 .. inf]}) | 12570 | generated; however, intervals closed at infinity (@samp{[0 .. inf]}) |
| 12577 | will not be generated when infinite mode is off.) | 12571 | will not be generated when Infinite mode is off.) |
| 12578 | 12572 | ||
| 12579 | With infinite mode turned on, @samp{1 / 0} will generate @code{uinf}, | 12573 | With Infinite mode turned on, @samp{1 / 0} will generate @code{uinf}, |
| 12580 | an undirected infinity. @xref{Infinities}, for a discussion of the | 12574 | an undirected infinity. @xref{Infinities}, for a discussion of the |
| 12581 | difference between @code{inf} and @code{uinf}. Also, @expr{0 / 0} | 12575 | difference between @code{inf} and @code{uinf}. Also, @expr{0 / 0} |
| 12582 | evaluates to @code{nan}, the ``indeterminate'' symbol. Various other | 12576 | evaluates to @code{nan}, the ``indeterminate'' symbol. Various other |
| 12583 | functions can also return infinities in this mode; for example, | 12577 | functions can also return infinities in this mode; for example, |
| 12584 | @samp{ln(0) = -inf}, and @samp{gamma(-7) = uinf}. Once again, | 12578 | @samp{ln(0) = -inf}, and @samp{gamma(-7) = uinf}. Once again, |
| 12585 | note that @samp{exp(inf) = inf} regardless of infinite mode because | 12579 | note that @samp{exp(inf) = inf} regardless of Infinite mode because |
| 12586 | this calculation has infinity as an input. | 12580 | this calculation has infinity as an input. |
| 12587 | 12581 | ||
| 12588 | @cindex Positive infinite mode | 12582 | @cindex Positive Infinite mode |
| 12589 | The @kbd{m i} command with a numeric prefix argument of zero, | 12583 | The @kbd{m i} command with a numeric prefix argument of zero, |
| 12590 | i.e., @kbd{C-u 0 m i}, turns on a ``positive infinite mode'' in | 12584 | i.e., @kbd{C-u 0 m i}, turns on a Positive Infinite mode in |
| 12591 | which zero is treated as positive instead of being directionless. | 12585 | which zero is treated as positive instead of being directionless. |
| 12592 | Thus, @samp{1 / 0 = inf} and @samp{-1 / 0 = -inf} in this mode. | 12586 | Thus, @samp{1 / 0 = inf} and @samp{-1 / 0 = -inf} in this mode. |
| 12593 | Note that zero never actually has a sign in Calc; there are no | 12587 | Note that zero never actually has a sign in Calc; there are no |
| 12594 | separate representations for @i{+0} and @i{-0}. Positive | 12588 | separate representations for @mathit{+0} and @mathit{-0}. Positive |
| 12595 | infinite mode merely changes the interpretation given to the | 12589 | Infinite mode merely changes the interpretation given to the |
| 12596 | single symbol, @samp{0}. One consequence of this is that, while | 12590 | single symbol, @samp{0}. One consequence of this is that, while |
| 12597 | you might expect @samp{1 / -0 = -inf}, actually @samp{1 / -0} | 12591 | you might expect @samp{1 / -0 = -inf}, actually @samp{1 / -0} |
| 12598 | is equivalent to @samp{1 / 0}, which is equal to positive @code{inf}. | 12592 | is equivalent to @samp{1 / 0}, which is equal to positive @code{inf}. |
| @@ -12611,7 +12605,7 @@ number or a symbolic expression if the argument is an expression: | |||
| 12611 | 12605 | ||
| 12612 | @kindex m s | 12606 | @kindex m s |
| 12613 | @pindex calc-symbolic-mode | 12607 | @pindex calc-symbolic-mode |
| 12614 | In @dfn{symbolic mode}, controlled by the @kbd{m s} (@code{calc-symbolic-mode}) | 12608 | In @dfn{Symbolic mode}, controlled by the @kbd{m s} (@code{calc-symbolic-mode}) |
| 12615 | command, functions which would produce inexact, irrational results are | 12609 | command, functions which would produce inexact, irrational results are |
| 12616 | left in symbolic form. Thus @kbd{16 Q} pushes 4, but @kbd{2 Q} pushes | 12610 | left in symbolic form. Thus @kbd{16 Q} pushes 4, but @kbd{2 Q} pushes |
| 12617 | @samp{sqrt(2)}. | 12611 | @samp{sqrt(2)}. |
| @@ -12638,12 +12632,12 @@ variables.) | |||
| 12638 | @cindex Scalar mode | 12632 | @cindex Scalar mode |
| 12639 | Calc sometimes makes assumptions during algebraic manipulation that | 12633 | Calc sometimes makes assumptions during algebraic manipulation that |
| 12640 | are awkward or incorrect when vectors and matrices are involved. | 12634 | are awkward or incorrect when vectors and matrices are involved. |
| 12641 | Calc has two modes, @dfn{matrix mode} and @dfn{scalar mode}, which | 12635 | Calc has two modes, @dfn{Matrix mode} and @dfn{Scalar mode}, which |
| 12642 | modify its behavior around vectors in useful ways. | 12636 | modify its behavior around vectors in useful ways. |
| 12643 | 12637 | ||
| 12644 | @kindex m v | 12638 | @kindex m v |
| 12645 | @pindex calc-matrix-mode | 12639 | @pindex calc-matrix-mode |
| 12646 | Press @kbd{m v} (@code{calc-matrix-mode}) once to enter matrix mode. | 12640 | Press @kbd{m v} (@code{calc-matrix-mode}) once to enter Matrix mode. |
| 12647 | In this mode, all objects are assumed to be matrices unless provably | 12641 | In this mode, all objects are assumed to be matrices unless provably |
| 12648 | otherwise. One major effect is that Calc will no longer consider | 12642 | otherwise. One major effect is that Calc will no longer consider |
| 12649 | multiplication to be commutative. (Recall that in matrix arithmetic, | 12643 | multiplication to be commutative. (Recall that in matrix arithmetic, |
| @@ -12662,18 +12656,18 @@ a true identity matrix of the appropriate size. On the other hand, | |||
| 12662 | if it is combined with a scalar (as in @samp{idn(1) + 2}), Calc | 12656 | if it is combined with a scalar (as in @samp{idn(1) + 2}), Calc |
| 12663 | will assume it really was a scalar after all and produce, e.g., 3. | 12657 | will assume it really was a scalar after all and produce, e.g., 3. |
| 12664 | 12658 | ||
| 12665 | Press @kbd{m v} a second time to get scalar mode. Here, objects are | 12659 | Press @kbd{m v} a second time to get Scalar mode. Here, objects are |
| 12666 | assumed @emph{not} to be vectors or matrices unless provably so. | 12660 | assumed @emph{not} to be vectors or matrices unless provably so. |
| 12667 | For example, normally adding a variable to a vector, as in | 12661 | For example, normally adding a variable to a vector, as in |
| 12668 | @samp{[x, y, z] + a}, will leave the sum in symbolic form because | 12662 | @samp{[x, y, z] + a}, will leave the sum in symbolic form because |
| 12669 | as far as Calc knows, @samp{a} could represent either a number or | 12663 | as far as Calc knows, @samp{a} could represent either a number or |
| 12670 | another 3-vector. In scalar mode, @samp{a} is assumed to be a | 12664 | another 3-vector. In Scalar mode, @samp{a} is assumed to be a |
| 12671 | non-vector, and the addition is evaluated to @samp{[x+a, y+a, z+a]}. | 12665 | non-vector, and the addition is evaluated to @samp{[x+a, y+a, z+a]}. |
| 12672 | 12666 | ||
| 12673 | Press @kbd{m v} a third time to return to the normal mode of operation. | 12667 | Press @kbd{m v} a third time to return to the normal mode of operation. |
| 12674 | 12668 | ||
| 12675 | If you press @kbd{m v} with a numeric prefix argument @var{n}, you | 12669 | If you press @kbd{m v} with a numeric prefix argument @var{n}, you |
| 12676 | get a special ``dimensioned matrix mode'' in which matrices of | 12670 | get a special ``dimensioned'' Matrix mode in which matrices of |
| 12677 | unknown size are assumed to be @var{n}x@var{n} square matrices. | 12671 | unknown size are assumed to be @var{n}x@var{n} square matrices. |
| 12678 | Then, the function call @samp{idn(1)} will expand into an actual | 12672 | Then, the function call @samp{idn(1)} will expand into an actual |
| 12679 | matrix rather than representing a ``generic'' matrix. | 12673 | matrix rather than representing a ``generic'' matrix. |
| @@ -12694,11 +12688,11 @@ for @samp{[x, y, z] + [1, 2, 3]}, but that's because you have broken | |||
| 12694 | your earlier promise to Calc that @samp{a} would be scalar. | 12688 | your earlier promise to Calc that @samp{a} would be scalar. |
| 12695 | 12689 | ||
| 12696 | Another way to mix scalars and matrices is to use selections | 12690 | Another way to mix scalars and matrices is to use selections |
| 12697 | (@pxref{Selecting Subformulas}). Use matrix mode when operating on | 12691 | (@pxref{Selecting Subformulas}). Use Matrix mode when operating on |
| 12698 | your formula normally; then, to apply scalar mode to a certain part | 12692 | your formula normally; then, to apply Scalar mode to a certain part |
| 12699 | of the formula without affecting the rest just select that part, | 12693 | of the formula without affecting the rest just select that part, |
| 12700 | change into scalar mode and press @kbd{=} to resimplify the part | 12694 | change into Scalar mode and press @kbd{=} to resimplify the part |
| 12701 | under this mode, then change back to matrix mode before deselecting. | 12695 | under this mode, then change back to Matrix mode before deselecting. |
| 12702 | 12696 | ||
| 12703 | @node Automatic Recomputation, Working Message, Matrix Mode, Calculation Modes | 12697 | @node Automatic Recomputation, Working Message, Matrix Mode, Calculation Modes |
| 12704 | @subsection Automatic Recomputation | 12698 | @subsection Automatic Recomputation |
| @@ -12714,7 +12708,7 @@ are changed. @xref{Evaluates-To Operator}. | |||
| 12714 | The @kbd{m C} (@code{calc-auto-recompute}) command turns this | 12708 | The @kbd{m C} (@code{calc-auto-recompute}) command turns this |
| 12715 | automatic recomputation on and off. If you turn it off, Calc will | 12709 | automatic recomputation on and off. If you turn it off, Calc will |
| 12716 | not update @samp{=>} operators on the stack (nor those in the | 12710 | not update @samp{=>} operators on the stack (nor those in the |
| 12717 | attached Embedded Mode buffer, if there is one). They will not | 12711 | attached Embedded mode buffer, if there is one). They will not |
| 12718 | be updated unless you explicitly do so by pressing @kbd{=} or until | 12712 | be updated unless you explicitly do so by pressing @kbd{=} or until |
| 12719 | you press @kbd{m C} to turn recomputation back on. (While automatic | 12713 | you press @kbd{m C} to turn recomputation back on. (While automatic |
| 12720 | recomputation is off, you can think of @kbd{m C m C} as a command | 12714 | recomputation is off, you can think of @kbd{m C m C} as a command |
| @@ -12835,7 +12829,7 @@ A common technique is to set the simplification mode down to the lowest | |||
| 12835 | amount of simplification you will allow to be applied automatically, then | 12829 | amount of simplification you will allow to be applied automatically, then |
| 12836 | use manual commands like @kbd{a s} and @kbd{c c} (@code{calc-clean}) to | 12830 | use manual commands like @kbd{a s} and @kbd{c c} (@code{calc-clean}) to |
| 12837 | perform higher types of simplifications on demand. @xref{Algebraic | 12831 | perform higher types of simplifications on demand. @xref{Algebraic |
| 12838 | Definitions}, for another sample use of no-simplification mode. | 12832 | Definitions}, for another sample use of No-Simplification mode. |
| 12839 | 12833 | ||
| 12840 | @node Declarations, Display Modes, Simplification Modes, Mode Settings | 12834 | @node Declarations, Display Modes, Simplification Modes, Mode Settings |
| 12841 | @section Declarations | 12835 | @section Declarations |
| @@ -12982,7 +12976,7 @@ Numbers. (Real or complex.) | |||
| 12982 | Calc uses this information to determine when certain simplifications | 12976 | Calc uses this information to determine when certain simplifications |
| 12983 | of formulas are safe. For example, @samp{(x^y)^z} cannot be | 12977 | of formulas are safe. For example, @samp{(x^y)^z} cannot be |
| 12984 | simplified to @samp{x^(y z)} in general; for example, | 12978 | simplified to @samp{x^(y z)} in general; for example, |
| 12985 | @samp{((-3)^2)^1:2} is 3, but @samp{(-3)^(2*1:2) = (-3)^1} is @i{-3}. | 12979 | @samp{((-3)^2)^1:2} is 3, but @samp{(-3)^(2*1:2) = (-3)^1} is @mathit{-3}. |
| 12986 | However, this simplification @emph{is} safe if @code{z} is known | 12980 | However, this simplification @emph{is} safe if @code{z} is known |
| 12987 | to be an integer, or if @code{x} is known to be a nonnegative | 12981 | to be an integer, or if @code{x} is known to be a nonnegative |
| 12988 | real number. If you have given declarations that allow Calc to | 12982 | real number. If you have given declarations that allow Calc to |
| @@ -13082,8 +13076,8 @@ and @code{y} are known to be vectors or matrices. (Calc currently | |||
| 13082 | never distinguishes between @code{vector} and @code{matrix} | 13076 | never distinguishes between @code{vector} and @code{matrix} |
| 13083 | declarations.) | 13077 | declarations.) |
| 13084 | 13078 | ||
| 13085 | @xref{Matrix Mode}, for a discussion of ``matrix mode'' and | 13079 | @xref{Matrix Mode}, for a discussion of Matrix mode and |
| 13086 | ``scalar mode,'' which are similar to declaring @samp{[All, matrix]} | 13080 | Scalar mode, which are similar to declaring @samp{[All, matrix]} |
| 13087 | or @samp{[All, scalar]} but much more convenient. | 13081 | or @samp{[All, scalar]} but much more convenient. |
| 13088 | 13082 | ||
| 13089 | One more type symbol that is recognized is used with the @kbd{H a d} | 13083 | One more type symbol that is recognized is used with the @kbd{H a d} |
| @@ -13095,7 +13089,7 @@ The value is a constant with respect to other variables. | |||
| 13095 | @end table | 13089 | @end table |
| 13096 | 13090 | ||
| 13097 | Calc does not check the declarations for a variable when you store | 13091 | Calc does not check the declarations for a variable when you store |
| 13098 | a value in it. However, storing @i{-3.5} in a variable that has | 13092 | a value in it. However, storing @mathit{-3.5} in a variable that has |
| 13099 | been declared @code{pos}, @code{int}, or @code{matrix} may have | 13093 | been declared @code{pos}, @code{int}, or @code{matrix} may have |
| 13100 | unexpected effects; Calc may evaluate @samp{sqrt(x^2)} to @expr{3.5} | 13094 | unexpected effects; Calc may evaluate @samp{sqrt(x^2)} to @expr{3.5} |
| 13101 | if it substitutes the value first, or to @expr{-3.5} if @code{x} | 13095 | if it substitutes the value first, or to @expr{-3.5} if @code{x} |
| @@ -13235,8 +13229,8 @@ remains unevaluated. | |||
| 13235 | @tindex dscalar | 13229 | @tindex dscalar |
| 13236 | The @code{dscalar} function returns 1 if its argument is provably | 13230 | The @code{dscalar} function returns 1 if its argument is provably |
| 13237 | scalar, or 0 if its argument is provably non-scalar. It is left | 13231 | scalar, or 0 if its argument is provably non-scalar. It is left |
| 13238 | unevaluated if this cannot be determined. (If matrix mode or scalar | 13232 | unevaluated if this cannot be determined. (If Matrix mode or Scalar |
| 13239 | mode are in effect, this function returns 1 or 0, respectively, | 13233 | mode is in effect, this function returns 1 or 0, respectively, |
| 13240 | if it has no other information.) When Calc interprets a condition | 13234 | if it has no other information.) When Calc interprets a condition |
| 13241 | (say, in a rewrite rule) it considers an unevaluated formula to be | 13235 | (say, in a rewrite rule) it considers an unevaluated formula to be |
| 13242 | ``false.'' Thus, @samp{dscalar(a)} is ``true'' only if @code{a} is | 13236 | ``false.'' Thus, @samp{dscalar(a)} is ``true'' only if @code{a} is |
| @@ -13330,7 +13324,7 @@ command causes integers to be padded out with leading zeros according to the | |||
| 13330 | current binary word size. (@xref{Binary Functions}, for a discussion of | 13324 | current binary word size. (@xref{Binary Functions}, for a discussion of |
| 13331 | word size.) If the absolute value of the word size is @expr{w}, all integers | 13325 | word size.) If the absolute value of the word size is @expr{w}, all integers |
| 13332 | are displayed with at least enough digits to represent | 13326 | are displayed with at least enough digits to represent |
| 13333 | @texline @tmath{2^w-1} | 13327 | @texline @math{2^w-1} |
| 13334 | @infoline @expr{(2^w)-1} | 13328 | @infoline @expr{(2^w)-1} |
| 13335 | in the current radix. (Larger integers will still be displayed in their | 13329 | in the current radix. (Larger integers will still be displayed in their |
| 13336 | entirety.) | 13330 | entirety.) |
| @@ -13345,7 +13339,7 @@ entirety.) | |||
| 13345 | @cindex Digit grouping | 13339 | @cindex Digit grouping |
| 13346 | Long numbers can be hard to read if they have too many digits. For | 13340 | Long numbers can be hard to read if they have too many digits. For |
| 13347 | example, the factorial of 30 is 33 digits long! Press @kbd{d g} | 13341 | example, the factorial of 30 is 33 digits long! Press @kbd{d g} |
| 13348 | (@code{calc-group-digits}) to enable @dfn{grouping} mode, in which digits | 13342 | (@code{calc-group-digits}) to enable @dfn{Grouping} mode, in which digits |
| 13349 | are displayed in clumps of 3 or 4 (depending on the current radix) | 13343 | are displayed in clumps of 3 or 4 (depending on the current radix) |
| 13350 | separated by commas. | 13344 | separated by commas. |
| 13351 | 13345 | ||
| @@ -13891,7 +13885,7 @@ line at a time (or several lines with a prefix argument). | |||
| 13891 | Values on the stack are normally left-justified in the window. You can | 13885 | Values on the stack are normally left-justified in the window. You can |
| 13892 | control this arrangement by typing @kbd{d <} (@code{calc-left-justify}), | 13886 | control this arrangement by typing @kbd{d <} (@code{calc-left-justify}), |
| 13893 | @kbd{d >} (@code{calc-right-justify}), or @kbd{d =} | 13887 | @kbd{d >} (@code{calc-right-justify}), or @kbd{d =} |
| 13894 | (@code{calc-center-justify}). For example, in right-justification mode, | 13888 | (@code{calc-center-justify}). For example, in Right-Justification mode, |
| 13895 | stack entries are displayed flush-right against the right edge of the | 13889 | stack entries are displayed flush-right against the right edge of the |
| 13896 | window. | 13890 | window. |
| 13897 | 13891 | ||
| @@ -13912,20 +13906,20 @@ breaking lines are given below. Notice that the interaction between | |||
| 13912 | origin and line width is slightly different in each justification | 13906 | origin and line width is slightly different in each justification |
| 13913 | mode. | 13907 | mode. |
| 13914 | 13908 | ||
| 13915 | In left-justified mode, the line is indented by a number of spaces | 13909 | In Left-Justified mode, the line is indented by a number of spaces |
| 13916 | given by the origin (default zero). If the result is longer than the | 13910 | given by the origin (default zero). If the result is longer than the |
| 13917 | maximum line width, if given, or too wide to fit in the Calc window | 13911 | maximum line width, if given, or too wide to fit in the Calc window |
| 13918 | otherwise, then it is broken into lines which will fit; each broken | 13912 | otherwise, then it is broken into lines which will fit; each broken |
| 13919 | line is indented to the origin. | 13913 | line is indented to the origin. |
| 13920 | 13914 | ||
| 13921 | In right-justified mode, lines are shifted right so that the rightmost | 13915 | In Right-Justified mode, lines are shifted right so that the rightmost |
| 13922 | character is just before the origin, or just before the current | 13916 | character is just before the origin, or just before the current |
| 13923 | window width if no origin was specified. If the line is too long | 13917 | window width if no origin was specified. If the line is too long |
| 13924 | for this, then it is broken; the current line width is used, if | 13918 | for this, then it is broken; the current line width is used, if |
| 13925 | specified, or else the origin is used as a width if that is | 13919 | specified, or else the origin is used as a width if that is |
| 13926 | specified, or else the line is broken to fit in the window. | 13920 | specified, or else the line is broken to fit in the window. |
| 13927 | 13921 | ||
| 13928 | In centering mode, the origin is the column number of the center of | 13922 | In Centering mode, the origin is the column number of the center of |
| 13929 | each stack entry. If a line width is specified, lines will not be | 13923 | each stack entry. If a line width is specified, lines will not be |
| 13930 | allowed to go past that width; Calc will either indent less or | 13924 | allowed to go past that width; Calc will either indent less or |
| 13931 | break the lines if necessary. If no origin is specified, half the | 13925 | break the lines if necessary. If no origin is specified, half the |
| @@ -13960,13 +13954,13 @@ Give a blank string (with @kbd{d @{ @key{RET}}) to turn the label off. | |||
| 13960 | The @kbd{d @}} (@code{calc-right-label}) command similarly adds a | 13954 | The @kbd{d @}} (@code{calc-right-label}) command similarly adds a |
| 13961 | label on the righthand side. It does not affect positioning of | 13955 | label on the righthand side. It does not affect positioning of |
| 13962 | the stack entries unless they are right-justified. Also, if both | 13956 | the stack entries unless they are right-justified. Also, if both |
| 13963 | a line width and an origin are given in right-justified mode, the | 13957 | a line width and an origin are given in Right-Justified mode, the |
| 13964 | stack entry is justified to the origin and the righthand label is | 13958 | stack entry is justified to the origin and the righthand label is |
| 13965 | justified to the line width. | 13959 | justified to the line width. |
| 13966 | 13960 | ||
| 13967 | One application of labels would be to add equation numbers to | 13961 | One application of labels would be to add equation numbers to |
| 13968 | formulas you are manipulating in Calc and then copying into a | 13962 | formulas you are manipulating in Calc and then copying into a |
| 13969 | document (possibly using Embedded Mode). The equations would | 13963 | document (possibly using Embedded mode). The equations would |
| 13970 | typically be centered, and the equation numbers would be on the | 13964 | typically be centered, and the equation numbers would be on the |
| 13971 | left or right as you prefer. | 13965 | left or right as you prefer. |
| 13972 | 13966 | ||
| @@ -14068,7 +14062,7 @@ such as powers, quotients, and square roots: | |||
| 14068 | @noindent | 14062 | @noindent |
| 14069 | in place of @samp{sqrt((a+1)/b + c^2)}. | 14063 | in place of @samp{sqrt((a+1)/b + c^2)}. |
| 14070 | 14064 | ||
| 14071 | Subscripts like @samp{a_i} are displayed as actual subscripts in ``big'' | 14065 | Subscripts like @samp{a_i} are displayed as actual subscripts in Big |
| 14072 | mode. Double subscripts, @samp{a_i_j} (@samp{subscr(subscr(a, i), j)}) | 14066 | mode. Double subscripts, @samp{a_i_j} (@samp{subscr(subscr(a, i), j)}) |
| 14073 | are displayed as @samp{a} with subscripts separated by commas: | 14067 | are displayed as @samp{a} with subscripts separated by commas: |
| 14074 | @samp{i, j}. They must still be entered in the usual underscore | 14068 | @samp{i, j}. They must still be entered in the usual underscore |
| @@ -14141,12 +14135,12 @@ In C mode, vectors and matrices use curly braces instead of brackets. | |||
| 14141 | Octal and hexadecimal values are written with leading @samp{0} or @samp{0x} | 14135 | Octal and hexadecimal values are written with leading @samp{0} or @samp{0x} |
| 14142 | rather than using the @samp{#} symbol. Array subscripting is | 14136 | rather than using the @samp{#} symbol. Array subscripting is |
| 14143 | translated into @code{subscr} calls, so that @samp{a[i]} in C | 14137 | translated into @code{subscr} calls, so that @samp{a[i]} in C |
| 14144 | mode is the same as @samp{a_i} in normal mode. Assignments | 14138 | mode is the same as @samp{a_i} in Normal mode. Assignments |
| 14145 | turn into the @code{assign} function, which Calc normally displays | 14139 | turn into the @code{assign} function, which Calc normally displays |
| 14146 | using the @samp{:=} symbol. | 14140 | using the @samp{:=} symbol. |
| 14147 | 14141 | ||
| 14148 | The variables @code{var-pi} and @code{var-e} would be displayed @samp{pi} | 14142 | The variables @code{var-pi} and @code{var-e} would be displayed @samp{pi} |
| 14149 | and @samp{e} in normal mode, but in C mode they are displayed as | 14143 | and @samp{e} in Normal mode, but in C mode they are displayed as |
| 14150 | @samp{M_PI} and @samp{M_E}, corresponding to the names of constants | 14144 | @samp{M_PI} and @samp{M_E}, corresponding to the names of constants |
| 14151 | typically provided in the @file{<math.h>} header. Functions whose | 14145 | typically provided in the @file{<math.h>} header. Functions whose |
| 14152 | names are different in C are translated automatically for entry and | 14146 | names are different in C are translated automatically for entry and |
| @@ -14188,7 +14182,7 @@ function!). | |||
| 14188 | 14182 | ||
| 14189 | Underscores are allowed in variable and function names in all of these | 14183 | Underscores are allowed in variable and function names in all of these |
| 14190 | language modes. The underscore here is equivalent to the @samp{#} in | 14184 | language modes. The underscore here is equivalent to the @samp{#} in |
| 14191 | normal mode, or to hyphens in the underlying Emacs Lisp variable names. | 14185 | Normal mode, or to hyphens in the underlying Emacs Lisp variable names. |
| 14192 | 14186 | ||
| 14193 | FORTRAN and Pascal modes normally do not adjust the case of letters in | 14187 | FORTRAN and Pascal modes normally do not adjust the case of letters in |
| 14194 | formulas. Most built-in Calc names use lower-case letters. If you use a | 14188 | formulas. Most built-in Calc names use lower-case letters. If you use a |
| @@ -14231,10 +14225,10 @@ special names (like @code{\sin}) will use curly braces instead of | |||
| 14231 | parentheses for very simple arguments. During input, curly braces and | 14225 | parentheses for very simple arguments. During input, curly braces and |
| 14232 | parentheses work equally well for grouping, but when the document is | 14226 | parentheses work equally well for grouping, but when the document is |
| 14233 | formatted the curly braces will be invisible. Thus the printed result is | 14227 | formatted the curly braces will be invisible. Thus the printed result is |
| 14234 | @texline @tmath{\sin{2 x}} | 14228 | @texline @math{\sin{2 x}} |
| 14235 | @infoline @expr{sin 2x} | 14229 | @infoline @expr{sin 2x} |
| 14236 | but | 14230 | but |
| 14237 | @texline @tmath{\sin(2 + x)}. | 14231 | @texline @math{\sin(2 + x)}. |
| 14238 | @infoline @expr{sin(2 + x)}. | 14232 | @infoline @expr{sin(2 + x)}. |
| 14239 | 14233 | ||
| 14240 | Function and variable names not treated specially by @TeX{} are simply | 14234 | Function and variable names not treated specially by @TeX{} are simply |
| @@ -14830,7 +14824,7 @@ object. | |||
| 14830 | @tindex choriz | 14824 | @tindex choriz |
| 14831 | The @code{choriz} function takes a vector of objects and composes | 14825 | The @code{choriz} function takes a vector of objects and composes |
| 14832 | them horizontally. For example, @samp{choriz([17, a b/c, d])} formats | 14826 | them horizontally. For example, @samp{choriz([17, a b/c, d])} formats |
| 14833 | as @w{@samp{17a b / cd}} in normal language mode, or as | 14827 | as @w{@samp{17a b / cd}} in Normal language mode, or as |
| 14834 | 14828 | ||
| 14835 | @example | 14829 | @example |
| 14836 | @group | 14830 | @group |
| @@ -15093,7 +15087,7 @@ then return a certain measurement of the composition as an integer. | |||
| 15093 | @tindex cwidth | 15087 | @tindex cwidth |
| 15094 | The @code{cwidth} function measures the width, in characters, of a | 15088 | The @code{cwidth} function measures the width, in characters, of a |
| 15095 | composition. For example, @samp{cwidth(a + b)} is 5, and | 15089 | composition. For example, @samp{cwidth(a + b)} is 5, and |
| 15096 | @samp{cwidth(a / b)} is 5 in normal mode, 1 in Big mode, and 11 in | 15090 | @samp{cwidth(a / b)} is 5 in Normal mode, 1 in Big mode, and 11 in |
| 15097 | @TeX{} mode (for @samp{@{a \over b@}}). The argument may involve | 15091 | @TeX{} mode (for @samp{@{a \over b@}}). The argument may involve |
| 15098 | the composition functions described in this section. | 15092 | the composition functions described in this section. |
| 15099 | 15093 | ||
| @@ -15269,7 +15263,7 @@ unrelated to the syntax tables described in the Emacs manual.) | |||
| 15269 | @pindex calc-edit-user-syntax | 15263 | @pindex calc-edit-user-syntax |
| 15270 | The @kbd{Z S} (@code{calc-edit-user-syntax}) command edits the | 15264 | The @kbd{Z S} (@code{calc-edit-user-syntax}) command edits the |
| 15271 | syntax table for the current language mode. If you want your | 15265 | syntax table for the current language mode. If you want your |
| 15272 | syntax to work in any language, define it in the normal language | 15266 | syntax to work in any language, define it in the Normal language |
| 15273 | mode. Type @kbd{M-# M-#} to finish editing the syntax table, or | 15267 | mode. Type @kbd{M-# M-#} to finish editing the syntax table, or |
| 15274 | @kbd{M-# x} to cancel the edit. The @kbd{m m} command saves all | 15268 | @kbd{M-# x} to cancel the edit. The @kbd{m m} command saves all |
| 15275 | the syntax tables along with the other mode settings; | 15269 | the syntax tables along with the other mode settings; |
| @@ -15300,7 +15294,7 @@ zero or more expressions separated by commas, and @samp{)}.'' | |||
| 15300 | A @dfn{syntax table} is a list of user-defined @dfn{syntax rules}, | 15294 | A @dfn{syntax table} is a list of user-defined @dfn{syntax rules}, |
| 15301 | which allow you to specify new patterns to define your own | 15295 | which allow you to specify new patterns to define your own |
| 15302 | favorite input notations. Calc's parser always checks the syntax | 15296 | favorite input notations. Calc's parser always checks the syntax |
| 15303 | table for the current language mode, then the table for the normal | 15297 | table for the current language mode, then the table for the Normal |
| 15304 | language mode, before it uses its built-in rules to parse an | 15298 | language mode, before it uses its built-in rules to parse an |
| 15305 | algebraic formula you have entered. Each syntax rule should go on | 15299 | algebraic formula you have entered. Each syntax rule should go on |
| 15306 | its own line; it consists of a @dfn{pattern}, a @samp{:=} symbol, | 15300 | its own line; it consists of a @dfn{pattern}, a @samp{:=} symbol, |
| @@ -15655,7 +15649,7 @@ In this approach, we allow @samp{#2} to equal the whole expression | |||
| 15655 | @samp{i=1..10}. Then, we use @code{matches} to break it apart into | 15649 | @samp{i=1..10}. Then, we use @code{matches} to break it apart into |
| 15656 | its components. If the expression turns out not to match the pattern, | 15650 | its components. If the expression turns out not to match the pattern, |
| 15657 | the syntax rule will fail. Note that @kbd{Z S} always uses Calc's | 15651 | the syntax rule will fail. Note that @kbd{Z S} always uses Calc's |
| 15658 | normal language mode for editing expressions in syntax rules, so we | 15652 | Normal language mode for editing expressions in syntax rules, so we |
| 15659 | must use regular Calc notation for the interval @samp{[b..c]} that | 15653 | must use regular Calc notation for the interval @samp{[b..c]} that |
| 15660 | will correspond to the Maple mode interval @samp{1..10}. | 15654 | will correspond to the Maple mode interval @samp{1..10}. |
| 15661 | 15655 | ||
| @@ -15728,19 +15722,19 @@ Polar mode. Value is 0 (rectangular) or 1 (polar); default is 0. | |||
| 15728 | Command is @kbd{m p}. | 15722 | Command is @kbd{m p}. |
| 15729 | 15723 | ||
| 15730 | @item | 15724 | @item |
| 15731 | Matrix/scalar mode. Default value is @i{-1}. Value is 0 for scalar | 15725 | Matrix/Scalar mode. Default value is @mathit{-1}. Value is 0 for Scalar |
| 15732 | mode, @i{-2} for matrix mode, or @var{N} for | 15726 | mode, @mathit{-2} for Matrix mode, or @var{N} for |
| 15733 | @texline @tmath{N\times N} | 15727 | @texline @math{N\times N} |
| 15734 | @infoline @var{N}x@var{N} | 15728 | @infoline @var{N}x@var{N} |
| 15735 | matrix mode. Command is @kbd{m v}. | 15729 | Matrix mode. Command is @kbd{m v}. |
| 15736 | 15730 | ||
| 15737 | @item | 15731 | @item |
| 15738 | Simplification mode. Default is 1. Value is @i{-1} for off (@kbd{m O}), | 15732 | Simplification mode. Default is 1. Value is @mathit{-1} for off (@kbd{m O}), |
| 15739 | 0 for @kbd{m N}, 2 for @kbd{m B}, 3 for @kbd{m A}, 4 for @kbd{m E}, | 15733 | 0 for @kbd{m N}, 2 for @kbd{m B}, 3 for @kbd{m A}, 4 for @kbd{m E}, |
| 15740 | or 5 for @w{@kbd{m U}}. The @kbd{m D} command accepts these prefixes. | 15734 | or 5 for @w{@kbd{m U}}. The @kbd{m D} command accepts these prefixes. |
| 15741 | 15735 | ||
| 15742 | @item | 15736 | @item |
| 15743 | Infinite mode. Default is @i{-1} (off). Value is 1 if the mode is on, | 15737 | Infinite mode. Default is @mathit{-1} (off). Value is 1 if the mode is on, |
| 15744 | or 0 if the mode is on with positive zeros. Command is @kbd{m i}. | 15738 | or 0 if the mode is on with positive zeros. Command is @kbd{m i}. |
| 15745 | @end enumerate | 15739 | @end enumerate |
| 15746 | 15740 | ||
| @@ -15767,7 +15761,7 @@ programming commands. @xref{Conditionals in Macros}.) | |||
| 15767 | @cindex Mode line indicators | 15761 | @cindex Mode line indicators |
| 15768 | This section is a summary of all symbols that can appear on the | 15762 | This section is a summary of all symbols that can appear on the |
| 15769 | Calc mode line, the highlighted bar that appears under the Calc | 15763 | Calc mode line, the highlighted bar that appears under the Calc |
| 15770 | stack window (or under an editing window in Embedded Mode). | 15764 | stack window (or under an editing window in Embedded mode). |
| 15771 | 15765 | ||
| 15772 | The basic mode line format is: | 15766 | The basic mode line format is: |
| 15773 | 15767 | ||
| @@ -15779,7 +15773,7 @@ The @samp{%%} is the Emacs symbol for ``read-only''; it shows that | |||
| 15779 | regular Emacs commands are not allowed to edit the stack buffer | 15773 | regular Emacs commands are not allowed to edit the stack buffer |
| 15780 | as if it were text. | 15774 | as if it were text. |
| 15781 | 15775 | ||
| 15782 | The word @samp{Calc:} changes to @samp{CalcEmbed:} if Embedded Mode | 15776 | The word @samp{Calc:} changes to @samp{CalcEmbed:} if Embedded mode |
| 15783 | is enabled. The words after this describe the various Calc modes | 15777 | is enabled. The words after this describe the various Calc modes |
| 15784 | that are in effect. | 15778 | that are in effect. |
| 15785 | 15779 | ||
| @@ -15807,7 +15801,7 @@ Symbolic mode (@kbd{m s}; @pxref{Symbolic Mode}). | |||
| 15807 | Matrix mode (@kbd{m v}; @pxref{Matrix Mode}). | 15801 | Matrix mode (@kbd{m v}; @pxref{Matrix Mode}). |
| 15808 | 15802 | ||
| 15809 | @item Matrix@var{n} | 15803 | @item Matrix@var{n} |
| 15810 | Dimensioned matrix mode (@kbd{C-u @var{n} m v}). | 15804 | Dimensioned Matrix mode (@kbd{C-u @var{n} m v}). |
| 15811 | 15805 | ||
| 15812 | @item Scalar | 15806 | @item Scalar |
| 15813 | Scalar mode (@kbd{m v}; @pxref{Matrix Mode}). | 15807 | Scalar mode (@kbd{m v}; @pxref{Matrix Mode}). |
| @@ -15822,7 +15816,7 @@ Fraction mode (@kbd{m f}; @pxref{Fraction Mode}). | |||
| 15822 | Infinite mode (@kbd{m i}; @pxref{Infinite Mode}). | 15816 | Infinite mode (@kbd{m i}; @pxref{Infinite Mode}). |
| 15823 | 15817 | ||
| 15824 | @item +Inf | 15818 | @item +Inf |
| 15825 | Positive infinite mode (@kbd{C-u 0 m i}). | 15819 | Positive Infinite mode (@kbd{C-u 0 m i}). |
| 15826 | 15820 | ||
| 15827 | @item NoSimp | 15821 | @item NoSimp |
| 15828 | Default simplifications off (@kbd{m O}; @pxref{Simplification Modes}). | 15822 | Default simplifications off (@kbd{m O}; @pxref{Simplification Modes}). |
| @@ -16030,14 +16024,14 @@ to every element of a vector. | |||
| 16030 | 16024 | ||
| 16031 | If either argument of @kbd{+} is a complex number, the result will in general | 16025 | If either argument of @kbd{+} is a complex number, the result will in general |
| 16032 | be complex. If one argument is in rectangular form and the other polar, | 16026 | be complex. If one argument is in rectangular form and the other polar, |
| 16033 | the current Polar Mode determines the form of the result. If Symbolic | 16027 | the current Polar mode determines the form of the result. If Symbolic |
| 16034 | Mode is enabled, the sum may be left as a formula if the necessary | 16028 | mode is enabled, the sum may be left as a formula if the necessary |
| 16035 | conversions for polar addition are non-trivial. | 16029 | conversions for polar addition are non-trivial. |
| 16036 | 16030 | ||
| 16037 | If both arguments of @kbd{+} are HMS forms, the forms are added according to | 16031 | If both arguments of @kbd{+} are HMS forms, the forms are added according to |
| 16038 | the usual conventions of hours-minutes-seconds notation. If one argument | 16032 | the usual conventions of hours-minutes-seconds notation. If one argument |
| 16039 | is an HMS form and the other is a number, that number is converted from | 16033 | is an HMS form and the other is a number, that number is converted from |
| 16040 | degrees or radians (depending on the current Angular Mode) to HMS format | 16034 | degrees or radians (depending on the current Angular mode) to HMS format |
| 16041 | and then the two HMS forms are added. | 16035 | and then the two HMS forms are added. |
| 16042 | 16036 | ||
| 16043 | If one argument of @kbd{+} is a date form, the other can be either a | 16037 | If one argument of @kbd{+} is a date form, the other can be either a |
| @@ -16081,7 +16075,7 @@ infinite in different directions the result is @code{nan}. | |||
| 16081 | @tindex - | 16075 | @tindex - |
| 16082 | The @kbd{-} (@code{calc-minus}) command subtracts two values. The top | 16076 | The @kbd{-} (@code{calc-minus}) command subtracts two values. The top |
| 16083 | number on the stack is subtracted from the one behind it, so that the | 16077 | number on the stack is subtracted from the one behind it, so that the |
| 16084 | computation @kbd{5 @key{RET} 2 -} produces 3, not @i{-3}. All options | 16078 | computation @kbd{5 @key{RET} 2 -} produces 3, not @mathit{-3}. All options |
| 16085 | available for @kbd{+} are available for @kbd{-} as well. | 16079 | available for @kbd{+} are available for @kbd{-} as well. |
| 16086 | 16080 | ||
| 16087 | @kindex * | 16081 | @kindex * |
| @@ -16189,7 +16183,7 @@ must be positive real number. | |||
| 16189 | @tindex fdiv | 16183 | @tindex fdiv |
| 16190 | The @kbd{:} (@code{calc-fdiv}) command [@code{fdiv} function in a formula] | 16184 | The @kbd{:} (@code{calc-fdiv}) command [@code{fdiv} function in a formula] |
| 16191 | divides the two integers on the top of the stack to produce a fractional | 16185 | divides the two integers on the top of the stack to produce a fractional |
| 16192 | result. This is a convenient shorthand for enabling Fraction Mode (with | 16186 | result. This is a convenient shorthand for enabling Fraction mode (with |
| 16193 | @kbd{m f}) temporarily and using @samp{/}. Note that during numeric entry | 16187 | @kbd{m f}) temporarily and using @samp{/}. Note that during numeric entry |
| 16194 | the @kbd{:} key is interpreted as a fraction separator, so to divide 8 by 6 | 16188 | the @kbd{:} key is interpreted as a fraction separator, so to divide 8 by 6 |
| 16195 | you would have to type @kbd{8 @key{RET} 6 @key{RET} :}. (Of course, in | 16189 | you would have to type @kbd{8 @key{RET} 6 @key{RET} :}. (Of course, in |
| @@ -16225,7 +16219,7 @@ absolute value squared of a number, vector or matrix, or error form. | |||
| 16225 | @pindex calc-sign | 16219 | @pindex calc-sign |
| 16226 | @tindex sign | 16220 | @tindex sign |
| 16227 | The @kbd{f s} (@code{calc-sign}) [@code{sign}] command returns 1 if its | 16221 | The @kbd{f s} (@code{calc-sign}) [@code{sign}] command returns 1 if its |
| 16228 | argument is positive, @i{-1} if its argument is negative, or 0 if its | 16222 | argument is positive, @mathit{-1} if its argument is negative, or 0 if its |
| 16229 | argument is zero. In algebraic form, you can also write @samp{sign(a,x)} | 16223 | argument is zero. In algebraic form, you can also write @samp{sign(a,x)} |
| 16230 | which evaluates to @samp{x * sign(a)}, i.e., either @samp{x}, @samp{-x}, or | 16224 | which evaluates to @samp{x * sign(a)}, i.e., either @samp{x}, @samp{-x}, or |
| 16231 | zero depending on the sign of @samp{a}. | 16225 | zero depending on the sign of @samp{a}. |
| @@ -16243,7 +16237,7 @@ matrix, it computes the inverse of that matrix. | |||
| 16243 | @tindex sqrt | 16237 | @tindex sqrt |
| 16244 | The @kbd{Q} (@code{calc-sqrt}) [@code{sqrt}] command computes the square | 16238 | The @kbd{Q} (@code{calc-sqrt}) [@code{sqrt}] command computes the square |
| 16245 | root of a number. For a negative real argument, the result will be a | 16239 | root of a number. For a negative real argument, the result will be a |
| 16246 | complex number whose form is determined by the current Polar Mode. | 16240 | complex number whose form is determined by the current Polar mode. |
| 16247 | 16241 | ||
| 16248 | @kindex f h | 16242 | @kindex f h |
| 16249 | @pindex calc-hypot | 16243 | @pindex calc-hypot |
| @@ -16288,7 +16282,7 @@ The @kbd{f M} (@code{calc-mant-part}) [@code{mant}] function extracts | |||
| 16288 | the ``mantissa'' part @expr{m} of its floating-point argument; @kbd{f X} | 16282 | the ``mantissa'' part @expr{m} of its floating-point argument; @kbd{f X} |
| 16289 | (@code{calc-xpon-part}) [@code{xpon}] extracts the ``exponent'' part | 16283 | (@code{calc-xpon-part}) [@code{xpon}] extracts the ``exponent'' part |
| 16290 | @expr{e}. The original number is equal to | 16284 | @expr{e}. The original number is equal to |
| 16291 | @texline @tmath{m \times 10^e}, | 16285 | @texline @math{m \times 10^e}, |
| 16292 | @infoline @expr{m * 10^e}, | 16286 | @infoline @expr{m * 10^e}, |
| 16293 | where @expr{m} is in the interval @samp{[1.0 ..@: 10.0)} except that | 16287 | where @expr{m} is in the interval @samp{[1.0 ..@: 10.0)} except that |
| 16294 | @expr{m=e=0} if the original number is zero. For integers | 16288 | @expr{m=e=0} if the original number is zero. For integers |
| @@ -16305,7 +16299,7 @@ The @kbd{f S} (@code{calc-scale-float}) [@code{scf}] function scales a number | |||
| 16305 | by a given power of ten. Thus, @samp{scf(mant(x), xpon(x)) = x} for any | 16299 | by a given power of ten. Thus, @samp{scf(mant(x), xpon(x)) = x} for any |
| 16306 | real @samp{x}. The second argument must be an integer, but the first | 16300 | real @samp{x}. The second argument must be an integer, but the first |
| 16307 | may actually be any numeric value. For example, @samp{scf(5,-2) = 0.05} | 16301 | may actually be any numeric value. For example, @samp{scf(5,-2) = 0.05} |
| 16308 | or @samp{1:20} depending on the current Fraction Mode. | 16302 | or @samp{1:20} depending on the current Fraction mode. |
| 16309 | 16303 | ||
| 16310 | @kindex f [ | 16304 | @kindex f [ |
| 16311 | @kindex f ] | 16305 | @kindex f ] |
| @@ -16321,7 +16315,7 @@ For example, incrementing @samp{12.3456} when the current precision | |||
| 16321 | is 6 digits yields @samp{12.3457}. If the current precision had been | 16315 | is 6 digits yields @samp{12.3457}. If the current precision had been |
| 16322 | 8 digits, the result would have been @samp{12.345601}. Incrementing | 16316 | 8 digits, the result would have been @samp{12.345601}. Incrementing |
| 16323 | @samp{0.0} produces | 16317 | @samp{0.0} produces |
| 16324 | @texline @tmath{10^{-p}}, | 16318 | @texline @math{10^{-p}}, |
| 16325 | @infoline @expr{10^-p}, | 16319 | @infoline @expr{10^-p}, |
| 16326 | where @expr{p} is the current | 16320 | where @expr{p} is the current |
| 16327 | precision. These operations are defined only on integers and floats. | 16321 | precision. These operations are defined only on integers and floats. |
| @@ -16362,7 +16356,7 @@ expressed as an integer-valued floating-point number. | |||
| 16362 | The @kbd{F} (@code{calc-floor}) [@code{floor} or @code{ffloor}] command | 16356 | The @kbd{F} (@code{calc-floor}) [@code{floor} or @code{ffloor}] command |
| 16363 | truncates a real number to the next lower integer, i.e., toward minus | 16357 | truncates a real number to the next lower integer, i.e., toward minus |
| 16364 | infinity. Thus @kbd{3.6 F} produces 3, but @kbd{_3.6 F} produces | 16358 | infinity. Thus @kbd{3.6 F} produces 3, but @kbd{_3.6 F} produces |
| 16365 | @i{-4}. | 16359 | @mathit{-4}. |
| 16366 | 16360 | ||
| 16367 | @kindex I F | 16361 | @kindex I F |
| 16368 | @pindex calc-ceiling | 16362 | @pindex calc-ceiling |
| @@ -16374,7 +16368,7 @@ infinity. Thus @kbd{3.6 F} produces 3, but @kbd{_3.6 F} produces | |||
| 16374 | @kindex H I F | 16368 | @kindex H I F |
| 16375 | The @kbd{I F} (@code{calc-ceiling}) [@code{ceil} or @code{fceil}] | 16369 | The @kbd{I F} (@code{calc-ceiling}) [@code{ceil} or @code{fceil}] |
| 16376 | command truncates toward positive infinity. Thus @kbd{3.6 I F} produces | 16370 | command truncates toward positive infinity. Thus @kbd{3.6 I F} produces |
| 16377 | 4, and @kbd{_3.6 I F} produces @i{-3}. | 16371 | 4, and @kbd{_3.6 I F} produces @mathit{-3}. |
| 16378 | 16372 | ||
| 16379 | @kindex R | 16373 | @kindex R |
| 16380 | @pindex calc-round | 16374 | @pindex calc-round |
| @@ -16388,7 +16382,7 @@ The @kbd{R} (@code{calc-round}) [@code{round} or @code{fround}] command | |||
| 16388 | rounds to the nearest integer. When the fractional part is .5 exactly, | 16382 | rounds to the nearest integer. When the fractional part is .5 exactly, |
| 16389 | this command rounds away from zero. (All other rounding in the | 16383 | this command rounds away from zero. (All other rounding in the |
| 16390 | Calculator uses this convention as well.) Thus @kbd{3.5 R} produces 4 | 16384 | Calculator uses this convention as well.) Thus @kbd{3.5 R} produces 4 |
| 16391 | but @kbd{3.4 R} produces 3; @kbd{_3.5 R} produces @i{-4}. | 16385 | but @kbd{3.4 R} produces 3; @kbd{_3.5 R} produces @mathit{-4}. |
| 16392 | 16386 | ||
| 16393 | @kindex I R | 16387 | @kindex I R |
| 16394 | @pindex calc-trunc | 16388 | @pindex calc-trunc |
| @@ -16401,7 +16395,7 @@ but @kbd{3.4 R} produces 3; @kbd{_3.5 R} produces @i{-4}. | |||
| 16401 | The @kbd{I R} (@code{calc-trunc}) [@code{trunc} or @code{ftrunc}] | 16395 | The @kbd{I R} (@code{calc-trunc}) [@code{trunc} or @code{ftrunc}] |
| 16402 | command truncates toward zero. In other words, it ``chops off'' | 16396 | command truncates toward zero. In other words, it ``chops off'' |
| 16403 | everything after the decimal point. Thus @kbd{3.6 I R} produces 3 and | 16397 | everything after the decimal point. Thus @kbd{3.6 I R} produces 3 and |
| 16404 | @kbd{_3.6 I R} produces @i{-3}. | 16398 | @kbd{_3.6 I R} produces @mathit{-3}. |
| 16405 | 16399 | ||
| 16406 | These functions may not be applied meaningfully to error forms, but they | 16400 | These functions may not be applied meaningfully to error forms, but they |
| 16407 | do work for intervals. As a convenience, applying @code{floor} to a | 16401 | do work for intervals. As a convenience, applying @code{floor} to a |
| @@ -16479,17 +16473,17 @@ this command replaces each element by its complex conjugate. | |||
| 16479 | The @kbd{G} (@code{calc-argument}) [@code{arg}] command computes the | 16473 | The @kbd{G} (@code{calc-argument}) [@code{arg}] command computes the |
| 16480 | ``argument'' or polar angle of a complex number. For a number in polar | 16474 | ``argument'' or polar angle of a complex number. For a number in polar |
| 16481 | notation, this is simply the second component of the pair | 16475 | notation, this is simply the second component of the pair |
| 16482 | @texline `@t{(}@var{r}@t{;}@tmath{\theta}@t{)}'. | 16476 | @texline `@t{(}@var{r}@t{;}@math{\theta}@t{)}'. |
| 16483 | @infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}'. | 16477 | @infoline `@t{(}@var{r}@t{;}@var{theta}@t{)}'. |
| 16484 | The result is expressed according to the current angular mode and will | 16478 | The result is expressed according to the current angular mode and will |
| 16485 | be in the range @i{-180} degrees (exclusive) to @i{+180} degrees | 16479 | be in the range @mathit{-180} degrees (exclusive) to @mathit{+180} degrees |
| 16486 | (inclusive), or the equivalent range in radians. | 16480 | (inclusive), or the equivalent range in radians. |
| 16487 | 16481 | ||
| 16488 | @pindex calc-imaginary | 16482 | @pindex calc-imaginary |
| 16489 | The @code{calc-imaginary} command multiplies the number on the | 16483 | The @code{calc-imaginary} command multiplies the number on the |
| 16490 | top of the stack by the imaginary number @expr{i = (0,1)}. This | 16484 | top of the stack by the imaginary number @expr{i = (0,1)}. This |
| 16491 | command is not normally bound to a key in Calc, but it is available | 16485 | command is not normally bound to a key in Calc, but it is available |
| 16492 | on the @key{IMAG} button in Keypad Mode. | 16486 | on the @key{IMAG} button in Keypad mode. |
| 16493 | 16487 | ||
| 16494 | @kindex f r | 16488 | @kindex f r |
| 16495 | @pindex calc-re | 16489 | @pindex calc-re |
| @@ -16513,8 +16507,8 @@ or matrix argument, these functions operate element-wise. | |||
| 16513 | @pindex calc-pack | 16507 | @pindex calc-pack |
| 16514 | The @kbd{v p} (@code{calc-pack}) command can pack the top two numbers on | 16508 | The @kbd{v p} (@code{calc-pack}) command can pack the top two numbers on |
| 16515 | the stack into a composite object such as a complex number. With | 16509 | the stack into a composite object such as a complex number. With |
| 16516 | a prefix argument of @i{-1}, it produces a rectangular complex number; | 16510 | a prefix argument of @mathit{-1}, it produces a rectangular complex number; |
| 16517 | with an argument of @i{-2}, it produces a polar complex number. | 16511 | with an argument of @mathit{-2}, it produces a polar complex number. |
| 16518 | (Also, @pxref{Building Vectors}.) | 16512 | (Also, @pxref{Building Vectors}.) |
| 16519 | 16513 | ||
| 16520 | @ignore | 16514 | @ignore |
| @@ -16638,7 +16632,7 @@ already a polar complex number, it uses @code{rect} instead. The | |||
| 16638 | The @kbd{c c} (@code{calc-clean}) [@code{pclean}] command ``cleans'' the | 16632 | The @kbd{c c} (@code{calc-clean}) [@code{pclean}] command ``cleans'' the |
| 16639 | number on the top of the stack. Floating point numbers are re-rounded | 16633 | number on the top of the stack. Floating point numbers are re-rounded |
| 16640 | according to the current precision. Polar numbers whose angular | 16634 | according to the current precision. Polar numbers whose angular |
| 16641 | components have strayed from the @i{-180} to @i{+180} degree range | 16635 | components have strayed from the @mathit{-180} to @mathit{+180} degree range |
| 16642 | are normalized. (Note that results will be undesirable if the current | 16636 | are normalized. (Note that results will be undesirable if the current |
| 16643 | angular mode is different from the one under which the number was | 16637 | angular mode is different from the one under which the number was |
| 16644 | produced!) Integers and fractions are generally unaffected by this | 16638 | produced!) Integers and fractions are generally unaffected by this |
| @@ -16894,8 +16888,8 @@ of the input date form are lost. With a numeric prefix argument | |||
| 16894 | @var{n} in the range from 1 to 366, @kbd{t Y} computes the | 16888 | @var{n} in the range from 1 to 366, @kbd{t Y} computes the |
| 16895 | @var{n}th day of the year (366 is treated as 365 in non-leap | 16889 | @var{n}th day of the year (366 is treated as 365 in non-leap |
| 16896 | years). A prefix argument of 0 computes the last day of the | 16890 | years). A prefix argument of 0 computes the last day of the |
| 16897 | year (December 31). A negative prefix argument from @i{-1} to | 16891 | year (December 31). A negative prefix argument from @mathit{-1} to |
| 16898 | @i{-12} computes the first day of the @var{n}th month of the year. | 16892 | @mathit{-12} computes the first day of the @var{n}th month of the year. |
| 16899 | 16893 | ||
| 16900 | @kindex t W | 16894 | @kindex t W |
| 16901 | @pindex calc-new-week | 16895 | @pindex calc-new-week |
| @@ -17264,7 +17258,7 @@ The Lisp variable @code{math-daylight-savings-hook} holds the | |||
| 17264 | name of a function that is used to compute the daylight savings | 17258 | name of a function that is used to compute the daylight savings |
| 17265 | adjustment for a given date. The default is | 17259 | adjustment for a given date. The default is |
| 17266 | @code{math-std-daylight-savings}, which computes an adjustment | 17260 | @code{math-std-daylight-savings}, which computes an adjustment |
| 17267 | (either 0 or @i{-1}) using the North American rules given above. | 17261 | (either 0 or @mathit{-1}) using the North American rules given above. |
| 17268 | 17262 | ||
| 17269 | The daylight savings hook function is called with four arguments: | 17263 | The daylight savings hook function is called with four arguments: |
| 17270 | The date, as a floating-point number in standard Calc format; | 17264 | The date, as a floating-point number in standard Calc format; |
| @@ -17312,7 +17306,7 @@ daylight savings hook: | |||
| 17312 | @noindent | 17306 | @noindent |
| 17313 | The @code{bump} parameter is equal to zero when Calc is converting | 17307 | The @code{bump} parameter is equal to zero when Calc is converting |
| 17314 | from a date form in a generalized time zone into a GMT date value. | 17308 | from a date form in a generalized time zone into a GMT date value. |
| 17315 | It is @i{-1} when Calc is converting in the other direction. The | 17309 | It is @mathit{-1} when Calc is converting in the other direction. The |
| 17316 | adjustments shown above ensure that the conversion behaves correctly | 17310 | adjustments shown above ensure that the conversion behaves correctly |
| 17317 | and reasonably around the 2 a.m.@: transition in each direction. | 17311 | and reasonably around the 2 a.m.@: transition in each direction. |
| 17318 | 17312 | ||
| @@ -17768,7 +17762,7 @@ formulas below for symbolic arguments only when you use the @kbd{a "} | |||
| 17768 | integrals or solving equations involving the functions. | 17762 | integrals or solving equations involving the functions. |
| 17769 | 17763 | ||
| 17770 | @ifinfo | 17764 | @ifinfo |
| 17771 | These formulas are shown using the conventions of ``Big'' display | 17765 | These formulas are shown using the conventions of Big display |
| 17772 | mode (@kbd{d B}); for example, the formula for @code{fv} written | 17766 | mode (@kbd{d B}); for example, the formula for @code{fv} written |
| 17773 | linearly is @samp{pmt * ((1 + rate)^n) - 1) / rate}. | 17767 | linearly is @samp{pmt * ((1 + rate)^n) - 1) / rate}. |
| 17774 | 17768 | ||
| @@ -17939,10 +17933,10 @@ particular, negative arguments are converted to positive integers modulo | |||
| 17939 | 17933 | ||
| 17940 | If the word size is negative, binary operations produce 2's complement | 17934 | If the word size is negative, binary operations produce 2's complement |
| 17941 | integers from | 17935 | integers from |
| 17942 | @texline @tmath{-2^{-w-1}} | 17936 | @texline @math{-2^{-w-1}} |
| 17943 | @infoline @expr{-(2^(-w-1))} | 17937 | @infoline @expr{-(2^(-w-1))} |
| 17944 | to | 17938 | to |
| 17945 | @texline @tmath{2^{-w-1}-1} | 17939 | @texline @math{2^{-w-1}-1} |
| 17946 | @infoline @expr{2^(-w-1)-1} | 17940 | @infoline @expr{2^(-w-1)-1} |
| 17947 | inclusive. Either mode accepts inputs in any range; the sign of | 17941 | inclusive. Either mode accepts inputs in any range; the sign of |
| 17948 | @expr{w} affects only the results produced. | 17942 | @expr{w} affects only the results produced. |
| @@ -17958,7 +17952,7 @@ addition do not use the current word size, since integer addition | |||
| 17958 | generally is not ``binary.'' (However, @pxref{Simplification Modes}, | 17952 | generally is not ``binary.'' (However, @pxref{Simplification Modes}, |
| 17959 | @code{calc-bin-simplify-mode}.) For example, with a word size of 8 | 17953 | @code{calc-bin-simplify-mode}.) For example, with a word size of 8 |
| 17960 | bits @kbd{b c} converts a number to the range 0 to 255; with a word | 17954 | bits @kbd{b c} converts a number to the range 0 to 255; with a word |
| 17961 | size of @i{-8} @kbd{b c} converts to the range @i{-128} to 127. | 17955 | size of @mathit{-8} @kbd{b c} converts to the range @mathit{-128} to 127. |
| 17962 | 17956 | ||
| 17963 | @kindex b w | 17957 | @kindex b w |
| 17964 | @pindex calc-word-size | 17958 | @pindex calc-word-size |
| @@ -17974,7 +17968,7 @@ When the binary operations are written in symbolic form, they take an | |||
| 17974 | optional second (or third) word-size parameter. When a formula like | 17968 | optional second (or third) word-size parameter. When a formula like |
| 17975 | @samp{and(a,b)} is finally evaluated, the word size current at that time | 17969 | @samp{and(a,b)} is finally evaluated, the word size current at that time |
| 17976 | will be used, but when @samp{and(a,b,-8)} is evaluated, a word size of | 17970 | will be used, but when @samp{and(a,b,-8)} is evaluated, a word size of |
| 17977 | @i{-8} will always be used. A symbolic binary function will be left | 17971 | @mathit{-8} will always be used. A symbolic binary function will be left |
| 17978 | in symbolic form unless the all of its argument(s) are integers or | 17972 | in symbolic form unless the all of its argument(s) are integers or |
| 17979 | integer-valued floats. | 17973 | integer-valued floats. |
| 17980 | 17974 | ||
| @@ -18126,11 +18120,11 @@ One miscellaneous command is shift-@kbd{P} (@code{calc-pi}), which pushes | |||
| 18126 | the value of @cpi{} (at the current precision) onto the stack. With the | 18120 | the value of @cpi{} (at the current precision) onto the stack. With the |
| 18127 | Hyperbolic flag, it pushes the value @expr{e}, the base of natural logarithms. | 18121 | Hyperbolic flag, it pushes the value @expr{e}, the base of natural logarithms. |
| 18128 | With the Inverse flag, it pushes Euler's constant | 18122 | With the Inverse flag, it pushes Euler's constant |
| 18129 | @texline @tmath{\gamma} | 18123 | @texline @math{\gamma} |
| 18130 | @infoline @expr{gamma} | 18124 | @infoline @expr{gamma} |
| 18131 | (about 0.5772). With both Inverse and Hyperbolic, it | 18125 | (about 0.5772). With both Inverse and Hyperbolic, it |
| 18132 | pushes the ``golden ratio'' | 18126 | pushes the ``golden ratio'' |
| 18133 | @texline @tmath{\phi} | 18127 | @texline @math{\phi} |
| 18134 | @infoline @expr{phi} | 18128 | @infoline @expr{phi} |
| 18135 | (about 1.618). (At present, Euler's constant is not available | 18129 | (about 1.618). (At present, Euler's constant is not available |
| 18136 | to unlimited precision; Calc knows only the first 100 digits.) | 18130 | to unlimited precision; Calc knows only the first 100 digits.) |
| @@ -18210,7 +18204,7 @@ The @kbd{H L} (@code{calc-log10}) [@code{log10}] command computes the common | |||
| 18210 | it raises ten to a given power.) Note that the common logarithm of a | 18204 | it raises ten to a given power.) Note that the common logarithm of a |
| 18211 | complex number is computed by taking the natural logarithm and dividing | 18205 | complex number is computed by taking the natural logarithm and dividing |
| 18212 | by | 18206 | by |
| 18213 | @texline @tmath{\ln10}. | 18207 | @texline @math{\ln10}. |
| 18214 | @infoline @expr{ln(10)}. | 18208 | @infoline @expr{ln(10)}. |
| 18215 | 18209 | ||
| 18216 | @kindex B | 18210 | @kindex B |
| @@ -18220,11 +18214,11 @@ by | |||
| 18220 | @tindex alog | 18214 | @tindex alog |
| 18221 | The @kbd{B} (@code{calc-log}) [@code{log}] command computes a logarithm | 18215 | The @kbd{B} (@code{calc-log}) [@code{log}] command computes a logarithm |
| 18222 | to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since | 18216 | to any base. For example, @kbd{1024 @key{RET} 2 B} produces 10, since |
| 18223 | @texline @tmath{2^{10} = 1024}. | 18217 | @texline @math{2^{10} = 1024}. |
| 18224 | @infoline @expr{2^10 = 1024}. | 18218 | @infoline @expr{2^10 = 1024}. |
| 18225 | In certain cases like @samp{log(3,9)}, the result | 18219 | In certain cases like @samp{log(3,9)}, the result |
| 18226 | will be either @expr{1:2} or @expr{0.5} depending on the current Fraction | 18220 | will be either @expr{1:2} or @expr{0.5} depending on the current Fraction |
| 18227 | Mode setting. With the Inverse flag [@code{alog}], this command is | 18221 | mode setting. With the Inverse flag [@code{alog}], this command is |
| 18228 | similar to @kbd{^} except that the order of the arguments is reversed. | 18222 | similar to @kbd{^} except that the order of the arguments is reversed. |
| 18229 | 18223 | ||
| 18230 | @kindex f I | 18224 | @kindex f I |
| @@ -18242,11 +18236,11 @@ integer arithmetic is used; otherwise, this is equivalent to | |||
| 18242 | @pindex calc-expm1 | 18236 | @pindex calc-expm1 |
| 18243 | @tindex expm1 | 18237 | @tindex expm1 |
| 18244 | The @kbd{f E} (@code{calc-expm1}) [@code{expm1}] command computes | 18238 | The @kbd{f E} (@code{calc-expm1}) [@code{expm1}] command computes |
| 18245 | @texline @tmath{e^x - 1}, | 18239 | @texline @math{e^x - 1}, |
| 18246 | @infoline @expr{exp(x)-1}, | 18240 | @infoline @expr{exp(x)-1}, |
| 18247 | but using an algorithm that produces a more accurate | 18241 | but using an algorithm that produces a more accurate |
| 18248 | answer when the result is close to zero, i.e., when | 18242 | answer when the result is close to zero, i.e., when |
| 18249 | @texline @tmath{e^x} | 18243 | @texline @math{e^x} |
| 18250 | @infoline @expr{exp(x)} | 18244 | @infoline @expr{exp(x)} |
| 18251 | is close to one. | 18245 | is close to one. |
| 18252 | 18246 | ||
| @@ -18254,7 +18248,7 @@ is close to one. | |||
| 18254 | @pindex calc-lnp1 | 18248 | @pindex calc-lnp1 |
| 18255 | @tindex lnp1 | 18249 | @tindex lnp1 |
| 18256 | The @kbd{f L} (@code{calc-lnp1}) [@code{lnp1}] command computes | 18250 | The @kbd{f L} (@code{calc-lnp1}) [@code{lnp1}] command computes |
| 18257 | @texline @tmath{\ln(x+1)}, | 18251 | @texline @math{\ln(x+1)}, |
| 18258 | @infoline @expr{ln(x+1)}, | 18252 | @infoline @expr{ln(x+1)}, |
| 18259 | producing a more accurate answer when @expr{x} is close to zero. | 18253 | producing a more accurate answer when @expr{x} is close to zero. |
| 18260 | 18254 | ||
| @@ -18280,7 +18274,7 @@ of the current angular mode. @xref{Basic Operations on Units}. | |||
| 18280 | Also, the symbolic variable @code{pi} is not ordinarily recognized in | 18274 | Also, the symbolic variable @code{pi} is not ordinarily recognized in |
| 18281 | arguments to trigonometric functions, as in @samp{sin(3 pi / 4)}, but | 18275 | arguments to trigonometric functions, as in @samp{sin(3 pi / 4)}, but |
| 18282 | the @kbd{a s} (@code{calc-simplify}) command recognizes many such | 18276 | the @kbd{a s} (@code{calc-simplify}) command recognizes many such |
| 18283 | formulas when the current angular mode is radians @emph{and} symbolic | 18277 | formulas when the current angular mode is Radians @emph{and} Symbolic |
| 18284 | mode is enabled; this example would be replaced by @samp{sqrt(2) / 2}. | 18278 | mode is enabled; this example would be replaced by @samp{sqrt(2) / 2}. |
| 18285 | @xref{Symbolic Mode}. Beware, this simplification occurs even if you | 18279 | @xref{Symbolic Mode}. Beware, this simplification occurs even if you |
| 18286 | have stored a different value in the variable @samp{pi}; this is one | 18280 | have stored a different value in the variable @samp{pi}; this is one |
| @@ -18289,7 +18283,7 @@ the form @expr{x} plus a multiple of @cpiover{2} are also simplified. | |||
| 18289 | Calc includes similar formulas for @code{cos} and @code{tan}. | 18283 | Calc includes similar formulas for @code{cos} and @code{tan}. |
| 18290 | 18284 | ||
| 18291 | The @kbd{a s} command knows all angles which are integer multiples of | 18285 | The @kbd{a s} command knows all angles which are integer multiples of |
| 18292 | @cpiover{12}, @cpiover{10}, or @cpiover{8} radians. In degrees mode, | 18286 | @cpiover{12}, @cpiover{10}, or @cpiover{8} radians. In Degrees mode, |
| 18293 | analogous simplifications occur for integer multiples of 15 or 18 | 18287 | analogous simplifications occur for integer multiples of 15 or 18 |
| 18294 | degrees, and for arguments plus multiples of 90 degrees. | 18288 | degrees, and for arguments plus multiples of 90 degrees. |
| 18295 | 18289 | ||
| @@ -18388,10 +18382,10 @@ variants of these functions. | |||
| 18388 | @tindex arctan2 | 18382 | @tindex arctan2 |
| 18389 | The @kbd{f T} (@code{calc-arctan2}) [@code{arctan2}] command takes two | 18383 | The @kbd{f T} (@code{calc-arctan2}) [@code{arctan2}] command takes two |
| 18390 | numbers from the stack and computes the arc tangent of their ratio. The | 18384 | numbers from the stack and computes the arc tangent of their ratio. The |
| 18391 | result is in the full range from @i{-180} (exclusive) to @i{+180} | 18385 | result is in the full range from @mathit{-180} (exclusive) to @mathit{+180} |
| 18392 | (inclusive) degrees, or the analogous range in radians. A similar | 18386 | (inclusive) degrees, or the analogous range in radians. A similar |
| 18393 | result would be obtained with @kbd{/} followed by @kbd{I T}, but the | 18387 | result would be obtained with @kbd{/} followed by @kbd{I T}, but the |
| 18394 | value would only be in the range from @i{-90} to @i{+90} degrees | 18388 | value would only be in the range from @mathit{-90} to @mathit{+90} degrees |
| 18395 | since the division loses information about the signs of the two | 18389 | since the division loses information about the signs of the two |
| 18396 | components, and an error might result from an explicit division by zero | 18390 | components, and an error might result from an explicit division by zero |
| 18397 | which @code{arctan2} would avoid. By (arbitrary) definition, | 18391 | which @code{arctan2} would avoid. By (arbitrary) definition, |
| @@ -18440,7 +18434,7 @@ gamma function. For positive integer arguments, this is related to the | |||
| 18440 | factorial function: @samp{gamma(n+1) = fact(n)}. For general complex | 18434 | factorial function: @samp{gamma(n+1) = fact(n)}. For general complex |
| 18441 | arguments the gamma function can be defined by the following definite | 18435 | arguments the gamma function can be defined by the following definite |
| 18442 | integral: | 18436 | integral: |
| 18443 | @texline @tmath{\Gamma(a) = \int_0^\infty t^{a-1} e^t dt}. | 18437 | @texline @math{\Gamma(a) = \int_0^\infty t^{a-1} e^t dt}. |
| 18444 | @infoline @expr{gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)}. | 18438 | @infoline @expr{gamma(a) = integ(t^(a-1) exp(t), t, 0, inf)}. |
| 18445 | (The actual implementation uses far more efficient computational methods.) | 18439 | (The actual implementation uses far more efficient computational methods.) |
| 18446 | 18440 | ||
| @@ -18474,7 +18468,7 @@ integral: | |||
| 18474 | The @kbd{f G} (@code{calc-inc-gamma}) [@code{gammaP}] command computes | 18468 | The @kbd{f G} (@code{calc-inc-gamma}) [@code{gammaP}] command computes |
| 18475 | the incomplete gamma function, denoted @samp{P(a,x)}. This is defined by | 18469 | the incomplete gamma function, denoted @samp{P(a,x)}. This is defined by |
| 18476 | the integral, | 18470 | the integral, |
| 18477 | @texline @tmath{P(a,x) = \left( \int_0^x t^{a-1} e^t dt \right) / \Gamma(a)}. | 18471 | @texline @math{P(a,x) = \left( \int_0^x t^{a-1} e^t dt \right) / \Gamma(a)}. |
| 18478 | @infoline @expr{gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)}. | 18472 | @infoline @expr{gammaP(a,x) = integ(t^(a-1) exp(t), t, 0, x) / gamma(a)}. |
| 18479 | This implies that @samp{gammaP(a,inf) = 1} for any @expr{a} (see the | 18473 | This implies that @samp{gammaP(a,inf) = 1} for any @expr{a} (see the |
| 18480 | definition of the normal gamma function). | 18474 | definition of the normal gamma function). |
| @@ -18507,10 +18501,10 @@ You can obtain these using the \kbd{H f G} [\code{gammag}] and | |||
| 18507 | @tindex beta | 18501 | @tindex beta |
| 18508 | The @kbd{f b} (@code{calc-beta}) [@code{beta}] command computes the | 18502 | The @kbd{f b} (@code{calc-beta}) [@code{beta}] command computes the |
| 18509 | Euler beta function, which is defined in terms of the gamma function as | 18503 | Euler beta function, which is defined in terms of the gamma function as |
| 18510 | @texline @tmath{B(a,b) = \Gamma(a) \Gamma(b) / \Gamma(a+b)}, | 18504 | @texline @math{B(a,b) = \Gamma(a) \Gamma(b) / \Gamma(a+b)}, |
| 18511 | @infoline @expr{beta(a,b) = gamma(a) gamma(b) / gamma(a+b)}, | 18505 | @infoline @expr{beta(a,b) = gamma(a) gamma(b) / gamma(a+b)}, |
| 18512 | or by | 18506 | or by |
| 18513 | @texline @tmath{B(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1} dt}. | 18507 | @texline @math{B(a,b) = \int_0^1 t^{a-1} (1-t)^{b-1} dt}. |
| 18514 | @infoline @expr{beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)}. | 18508 | @infoline @expr{beta(a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, 1)}. |
| 18515 | 18509 | ||
| 18516 | @kindex f B | 18510 | @kindex f B |
| @@ -18520,7 +18514,7 @@ or by | |||
| 18520 | @tindex betaB | 18514 | @tindex betaB |
| 18521 | The @kbd{f B} (@code{calc-inc-beta}) [@code{betaI}] command computes | 18515 | The @kbd{f B} (@code{calc-inc-beta}) [@code{betaI}] command computes |
| 18522 | the incomplete beta function @expr{I(x,a,b)}. It is defined by | 18516 | the incomplete beta function @expr{I(x,a,b)}. It is defined by |
| 18523 | @texline @tmath{I(x,a,b) = \left( \int_0^x t^{a-1} (1-t)^{b-1} dt \right) / B(a,b)}. | 18517 | @texline @math{I(x,a,b) = \left( \int_0^x t^{a-1} (1-t)^{b-1} dt \right) / B(a,b)}. |
| 18524 | @infoline @expr{betaI(x,a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, x) / beta(a,b)}. | 18518 | @infoline @expr{betaI(x,a,b) = integ(t^(a-1) (1-t)^(b-1), t, 0, x) / beta(a,b)}. |
| 18525 | Once again, the @kbd{H} (hyperbolic) prefix gives the corresponding | 18519 | Once again, the @kbd{H} (hyperbolic) prefix gives the corresponding |
| 18526 | un-normalized version [@code{betaB}]. | 18520 | un-normalized version [@code{betaB}]. |
| @@ -18532,11 +18526,11 @@ un-normalized version [@code{betaB}]. | |||
| 18532 | @tindex erfc | 18526 | @tindex erfc |
| 18533 | The @kbd{f e} (@code{calc-erf}) [@code{erf}] command computes the | 18527 | The @kbd{f e} (@code{calc-erf}) [@code{erf}] command computes the |
| 18534 | error function | 18528 | error function |
| 18535 | @texline @tmath{\hbox{erf}(x) = {2 \over \sqrt{\pi}} \int_0^x e^{-t^2} dt}. | 18529 | @texline @math{\hbox{erf}(x) = {2 \over \sqrt{\pi}} \int_0^x e^{-t^2} dt}. |
| 18536 | @infoline @expr{erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)}. | 18530 | @infoline @expr{erf(x) = 2 integ(exp(-(t^2)), t, 0, x) / sqrt(pi)}. |
| 18537 | The complementary error function @kbd{I f e} (@code{calc-erfc}) [@code{erfc}] | 18531 | The complementary error function @kbd{I f e} (@code{calc-erfc}) [@code{erfc}] |
| 18538 | is the corresponding integral from @samp{x} to infinity; the sum | 18532 | is the corresponding integral from @samp{x} to infinity; the sum |
| 18539 | @texline @tmath{\hbox{erf}(x) + \hbox{erfc}(x) = 1}. | 18533 | @texline @math{\hbox{erf}(x) + \hbox{erfc}(x) = 1}. |
| 18540 | @infoline @expr{erf(x) + erfc(x) = 1}. | 18534 | @infoline @expr{erf(x) + erfc(x) = 1}. |
| 18541 | 18535 | ||
| 18542 | @kindex f j | 18536 | @kindex f j |
| @@ -18612,17 +18606,17 @@ occurrence of @code{eps} may stand for a different small value. | |||
| 18612 | 18606 | ||
| 18613 | For @samp{z1^z2}: This is defined by @samp{exp(ln(z1)*z2)}. | 18607 | For @samp{z1^z2}: This is defined by @samp{exp(ln(z1)*z2)}. |
| 18614 | One interesting consequence of this is that @samp{(-8)^1:3} does | 18608 | One interesting consequence of this is that @samp{(-8)^1:3} does |
| 18615 | not evaluate to @i{-2} as you might expect, but to the complex | 18609 | not evaluate to @mathit{-2} as you might expect, but to the complex |
| 18616 | number @expr{(1., 1.732)}. Both of these are valid cube roots | 18610 | number @expr{(1., 1.732)}. Both of these are valid cube roots |
| 18617 | of @i{-8} (as is @expr{(1., -1.732)}); Calc chooses a perhaps | 18611 | of @mathit{-8} (as is @expr{(1., -1.732)}); Calc chooses a perhaps |
| 18618 | less-obvious root for the sake of mathematical consistency. | 18612 | less-obvious root for the sake of mathematical consistency. |
| 18619 | 18613 | ||
| 18620 | For @samp{arcsin(z)}: This is defined by @samp{-i*ln(i*z + sqrt(1-z^2))}. | 18614 | For @samp{arcsin(z)}: This is defined by @samp{-i*ln(i*z + sqrt(1-z^2))}. |
| 18621 | The branch cuts are on the real axis, less than @i{-1} and greater than 1. | 18615 | The branch cuts are on the real axis, less than @mathit{-1} and greater than 1. |
| 18622 | 18616 | ||
| 18623 | For @samp{arccos(z)}: This is defined by @samp{-i*ln(z + i*sqrt(1-z^2))}, | 18617 | For @samp{arccos(z)}: This is defined by @samp{-i*ln(z + i*sqrt(1-z^2))}, |
| 18624 | or equivalently by @samp{pi/2 - arcsin(z)}. The branch cuts are on | 18618 | or equivalently by @samp{pi/2 - arcsin(z)}. The branch cuts are on |
| 18625 | the real axis, less than @i{-1} and greater than 1. | 18619 | the real axis, less than @mathit{-1} and greater than 1. |
| 18626 | 18620 | ||
| 18627 | For @samp{arctan(z)}: This is defined by | 18621 | For @samp{arctan(z)}: This is defined by |
| 18628 | @samp{(ln(1+i*z) - ln(1-i*z)) / (2*i)}. The branch cuts are on the | 18622 | @samp{(ln(1+i*z) - ln(1-i*z)) / (2*i)}. The branch cuts are on the |
| @@ -18637,10 +18631,10 @@ For @samp{arccosh(z)}: This is defined by | |||
| 18637 | real axis less than 1. | 18631 | real axis less than 1. |
| 18638 | 18632 | ||
| 18639 | For @samp{arctanh(z)}: This is defined by @samp{(ln(1+z) - ln(1-z)) / 2}. | 18633 | For @samp{arctanh(z)}: This is defined by @samp{(ln(1+z) - ln(1-z)) / 2}. |
| 18640 | The branch cuts are on the real axis, less than @i{-1} and greater than 1. | 18634 | The branch cuts are on the real axis, less than @mathit{-1} and greater than 1. |
| 18641 | 18635 | ||
| 18642 | The following tables for @code{arcsin}, @code{arccos}, and | 18636 | The following tables for @code{arcsin}, @code{arccos}, and |
| 18643 | @code{arctan} assume the current angular mode is radians. The | 18637 | @code{arctan} assume the current angular mode is Radians. The |
| 18644 | hyperbolic functions operate independently of the angular mode. | 18638 | hyperbolic functions operate independently of the angular mode. |
| 18645 | 18639 | ||
| 18646 | @smallexample | 18640 | @smallexample |
| @@ -18710,7 +18704,7 @@ random numbers of various sorts. | |||
| 18710 | 18704 | ||
| 18711 | Given a positive numeric prefix argument @expr{M}, it produces a random | 18705 | Given a positive numeric prefix argument @expr{M}, it produces a random |
| 18712 | integer @expr{N} in the range | 18706 | integer @expr{N} in the range |
| 18713 | @texline @tmath{0 \le N < M}. | 18707 | @texline @math{0 \le N < M}. |
| 18714 | @infoline @expr{0 <= N < M}. | 18708 | @infoline @expr{0 <= N < M}. |
| 18715 | Each of the @expr{M} values appears with equal probability. | 18709 | Each of the @expr{M} values appears with equal probability. |
| 18716 | 18710 | ||
| @@ -18720,15 +18714,15 @@ the result is a random integer less than @expr{M}. However, note that | |||
| 18720 | while numeric prefix arguments are limited to six digits or so, an @expr{M} | 18714 | while numeric prefix arguments are limited to six digits or so, an @expr{M} |
| 18721 | taken from the stack can be arbitrarily large. If @expr{M} is negative, | 18715 | taken from the stack can be arbitrarily large. If @expr{M} is negative, |
| 18722 | the result is a random integer in the range | 18716 | the result is a random integer in the range |
| 18723 | @texline @tmath{M < N \le 0}. | 18717 | @texline @math{M < N \le 0}. |
| 18724 | @infoline @expr{M < N <= 0}. | 18718 | @infoline @expr{M < N <= 0}. |
| 18725 | 18719 | ||
| 18726 | If the value on the stack is a floating-point number @expr{M}, the result | 18720 | If the value on the stack is a floating-point number @expr{M}, the result |
| 18727 | is a random floating-point number @expr{N} in the range | 18721 | is a random floating-point number @expr{N} in the range |
| 18728 | @texline @tmath{0 \le N < M} | 18722 | @texline @math{0 \le N < M} |
| 18729 | @infoline @expr{0 <= N < M} | 18723 | @infoline @expr{0 <= N < M} |
| 18730 | or | 18724 | or |
| 18731 | @texline @tmath{M < N \le 0}, | 18725 | @texline @math{M < N \le 0}, |
| 18732 | @infoline @expr{M < N <= 0}, | 18726 | @infoline @expr{M < N <= 0}, |
| 18733 | according to the sign of @expr{M}. | 18727 | according to the sign of @expr{M}. |
| 18734 | 18728 | ||
| @@ -18738,14 +18732,14 @@ of one. The algorithm used generates random numbers in pairs; thus, | |||
| 18738 | every other call to this function will be especially fast. | 18732 | every other call to this function will be especially fast. |
| 18739 | 18733 | ||
| 18740 | If @expr{M} is an error form | 18734 | If @expr{M} is an error form |
| 18741 | @texline @tmath{m} @code{+/-} @tmath{\sigma} | 18735 | @texline @math{m} @code{+/-} @math{\sigma} |
| 18742 | @infoline @samp{m +/- s} | 18736 | @infoline @samp{m +/- s} |
| 18743 | where @var{m} and | 18737 | where @var{m} and |
| 18744 | @texline @tmath{\sigma} | 18738 | @texline @math{\sigma} |
| 18745 | @infoline @var{s} | 18739 | @infoline @var{s} |
| 18746 | are both real numbers, the result uses a Gaussian distribution with mean | 18740 | are both real numbers, the result uses a Gaussian distribution with mean |
| 18747 | @var{m} and standard deviation | 18741 | @var{m} and standard deviation |
| 18748 | @texline @tmath{\sigma}. | 18742 | @texline @math{\sigma}. |
| 18749 | @var{s}. | 18743 | @var{s}. |
| 18750 | 18744 | ||
| 18751 | If @expr{M} is an interval form, the lower and upper bounds specify the | 18745 | If @expr{M} is an interval form, the lower and upper bounds specify the |
| @@ -18858,7 +18852,7 @@ generators that are typically used to implement @code{random}. | |||
| 18858 | If @code{RandSeed} contains an integer, Calc uses this integer to | 18852 | If @code{RandSeed} contains an integer, Calc uses this integer to |
| 18859 | seed an ``additive congruential'' method (Knuth's algorithm 3.2.2A, | 18853 | seed an ``additive congruential'' method (Knuth's algorithm 3.2.2A, |
| 18860 | computing | 18854 | computing |
| 18861 | @texline @tmath{X_{n-55} - X_{n-24}}. | 18855 | @texline @math{X_{n-55} - X_{n-24}}. |
| 18862 | @infoline @expr{X_n-55 - X_n-24}). | 18856 | @infoline @expr{X_n-55 - X_n-24}). |
| 18863 | This method expands the seed | 18857 | This method expands the seed |
| 18864 | value into a large table which is maintained internally; the variable | 18858 | value into a large table which is maintained internally; the variable |
| @@ -18894,20 +18888,20 @@ value. | |||
| 18894 | 18888 | ||
| 18895 | To create a random floating-point number with precision @var{p}, Calc | 18889 | To create a random floating-point number with precision @var{p}, Calc |
| 18896 | simply creates a random @var{p}-digit integer and multiplies by | 18890 | simply creates a random @var{p}-digit integer and multiplies by |
| 18897 | @texline @tmath{10^{-p}}. | 18891 | @texline @math{10^{-p}}. |
| 18898 | @infoline @expr{10^-p}. | 18892 | @infoline @expr{10^-p}. |
| 18899 | The resulting random numbers should be very clean, but note | 18893 | The resulting random numbers should be very clean, but note |
| 18900 | that relatively small numbers will have few significant random digits. | 18894 | that relatively small numbers will have few significant random digits. |
| 18901 | In other words, with a precision of 12, you will occasionally get | 18895 | In other words, with a precision of 12, you will occasionally get |
| 18902 | numbers on the order of | 18896 | numbers on the order of |
| 18903 | @texline @tmath{10^{-9}} | 18897 | @texline @math{10^{-9}} |
| 18904 | @infoline @expr{10^-9} | 18898 | @infoline @expr{10^-9} |
| 18905 | or | 18899 | or |
| 18906 | @texline @tmath{10^{-10}}, | 18900 | @texline @math{10^{-10}}, |
| 18907 | @infoline @expr{10^-10}, | 18901 | @infoline @expr{10^-10}, |
| 18908 | but those numbers will only have two or three random digits since they | 18902 | but those numbers will only have two or three random digits since they |
| 18909 | correspond to small integers times | 18903 | correspond to small integers times |
| 18910 | @texline @tmath{10^{-12}}. | 18904 | @texline @math{10^{-12}}. |
| 18911 | @infoline @expr{10^-12}. | 18905 | @infoline @expr{10^-12}. |
| 18912 | 18906 | ||
| 18913 | To create a random integer in the interval @samp{[0 .. @var{m})}, Calc | 18907 | To create a random integer in the interval @samp{[0 .. @var{m})}, Calc |
| @@ -18958,7 +18952,7 @@ numbers. | |||
| 18958 | The @kbd{k E} (@code{calc-extended-gcd}) [@code{egcd}] command computes | 18952 | The @kbd{k E} (@code{calc-extended-gcd}) [@code{egcd}] command computes |
| 18959 | the GCD of two integers @expr{x} and @expr{y} and returns a vector | 18953 | the GCD of two integers @expr{x} and @expr{y} and returns a vector |
| 18960 | @expr{[g, a, b]} where | 18954 | @expr{[g, a, b]} where |
| 18961 | @texline @tmath{g = \gcd(x,y) = a x + b y}. | 18955 | @texline @math{g = \gcd(x,y) = a x + b y}. |
| 18962 | @infoline @expr{g = gcd(x,y) = a x + b y}. | 18956 | @infoline @expr{g = gcd(x,y) = a x + b y}. |
| 18963 | 18957 | ||
| 18964 | @kindex ! | 18958 | @kindex ! |
| @@ -19002,7 +18996,7 @@ on the top of the stack and @expr{N} is second-to-top. If both arguments | |||
| 19002 | are integers, the result is an exact integer. Otherwise, the result is a | 18996 | are integers, the result is an exact integer. Otherwise, the result is a |
| 19003 | floating-point approximation. The binomial coefficient is defined for all | 18997 | floating-point approximation. The binomial coefficient is defined for all |
| 19004 | real numbers by | 18998 | real numbers by |
| 19005 | @texline @tmath{N! \over M! (N-M)!\,}. | 18999 | @texline @math{N! \over M! (N-M)!\,}. |
| 19006 | @infoline @expr{N! / M! (N-M)!}. | 19000 | @infoline @expr{N! / M! (N-M)!}. |
| 19007 | 19001 | ||
| 19008 | @kindex H k c | 19002 | @kindex H k c |
| @@ -19045,11 +19039,11 @@ functions. | |||
| 19045 | @tindex stir2 | 19039 | @tindex stir2 |
| 19046 | The @kbd{k s} (@code{calc-stirling-number}) [@code{stir1}] command | 19040 | The @kbd{k s} (@code{calc-stirling-number}) [@code{stir1}] command |
| 19047 | computes a Stirling number of the first | 19041 | computes a Stirling number of the first |
| 19048 | @texline kind@tie{}@tmath{n \brack m}, | 19042 | @texline kind@tie{}@math{n \brack m}, |
| 19049 | @infoline kind, | 19043 | @infoline kind, |
| 19050 | given two integers @expr{n} and @expr{m} on the stack. The @kbd{H k s} | 19044 | given two integers @expr{n} and @expr{m} on the stack. The @kbd{H k s} |
| 19051 | [@code{stir2}] command computes a Stirling number of the second | 19045 | [@code{stir2}] command computes a Stirling number of the second |
| 19052 | @texline kind@tie{}@tmath{n \brace m}. | 19046 | @texline kind@tie{}@math{n \brace m}. |
| 19053 | @infoline kind. | 19047 | @infoline kind. |
| 19054 | These are the number of @expr{m}-cycle permutations of @expr{n} objects, | 19048 | These are the number of @expr{m}-cycle permutations of @expr{n} objects, |
| 19055 | and the number of ways to partition @expr{n} objects into @expr{m} | 19049 | and the number of ways to partition @expr{n} objects into @expr{m} |
| @@ -19093,8 +19087,8 @@ result is a vector of the prime factors in increasing order. For larger | |||
| 19093 | inputs, prime factors above 5000 may not be found, in which case the | 19087 | inputs, prime factors above 5000 may not be found, in which case the |
| 19094 | last number in the vector will be an unfactored integer greater than 25 | 19088 | last number in the vector will be an unfactored integer greater than 25 |
| 19095 | million (with a warning message). For negative integers, the first | 19089 | million (with a warning message). For negative integers, the first |
| 19096 | element of the list will be @i{-1}. For inputs @i{-1}, @i{0}, and | 19090 | element of the list will be @mathit{-1}. For inputs @mathit{-1}, @mathit{0}, and |
| 19097 | @i{1}, the result is a list of the same number. | 19091 | @mathit{1}, the result is a list of the same number. |
| 19098 | 19092 | ||
| 19099 | @kindex k n | 19093 | @kindex k n |
| 19100 | @pindex calc-next-prime | 19094 | @pindex calc-next-prime |
| @@ -19128,7 +19122,7 @@ analogously finds the next prime less than a given number. | |||
| 19128 | @tindex totient | 19122 | @tindex totient |
| 19129 | The @kbd{k t} (@code{calc-totient}) [@code{totient}] command computes the | 19123 | The @kbd{k t} (@code{calc-totient}) [@code{totient}] command computes the |
| 19130 | Euler ``totient'' | 19124 | Euler ``totient'' |
| 19131 | @texline function@tie{}@tmath{\phi(n)}, | 19125 | @texline function@tie{}@math{\phi(n)}, |
| 19132 | @infoline function, | 19126 | @infoline function, |
| 19133 | the number of integers less than @expr{n} which | 19127 | the number of integers less than @expr{n} which |
| 19134 | are relatively prime to @expr{n}. | 19128 | are relatively prime to @expr{n}. |
| @@ -19137,7 +19131,7 @@ are relatively prime to @expr{n}. | |||
| 19137 | @pindex calc-moebius | 19131 | @pindex calc-moebius |
| 19138 | @tindex moebius | 19132 | @tindex moebius |
| 19139 | The @kbd{k m} (@code{calc-moebius}) [@code{moebius}] command computes the | 19133 | The @kbd{k m} (@code{calc-moebius}) [@code{moebius}] command computes the |
| 19140 | @texline M@"obius @tmath{\mu} | 19134 | @texline M@"obius @math{\mu} |
| 19141 | @infoline Moebius ``mu'' | 19135 | @infoline Moebius ``mu'' |
| 19142 | function. If the input number is a product of @expr{k} | 19136 | function. If the input number is a product of @expr{k} |
| 19143 | distinct factors, this is @expr{(-1)^k}. If the input number has any | 19137 | distinct factors, this is @expr{(-1)^k}. If the input number has any |
| @@ -19201,7 +19195,7 @@ recover the original arguments but substitute a new value for @expr{x}.) | |||
| 19201 | @end ignore | 19195 | @end ignore |
| 19202 | @tindex ltpc | 19196 | @tindex ltpc |
| 19203 | The @samp{utpc(x,v)} function uses the chi-square distribution with | 19197 | The @samp{utpc(x,v)} function uses the chi-square distribution with |
| 19204 | @texline @tmath{\nu} | 19198 | @texline @math{\nu} |
| 19205 | @infoline @expr{v} | 19199 | @infoline @expr{v} |
| 19206 | degrees of freedom. It is the probability that a model is | 19200 | degrees of freedom. It is the probability that a model is |
| 19207 | correct if its chi-square statistic is @expr{x}. | 19201 | correct if its chi-square statistic is @expr{x}. |
| @@ -19219,10 +19213,10 @@ correct if its chi-square statistic is @expr{x}. | |||
| 19219 | @tindex ltpf | 19213 | @tindex ltpf |
| 19220 | The @samp{utpf(F,v1,v2)} function uses the F distribution, used in | 19214 | The @samp{utpf(F,v1,v2)} function uses the F distribution, used in |
| 19221 | various statistical tests. The parameters | 19215 | various statistical tests. The parameters |
| 19222 | @texline @tmath{\nu_1} | 19216 | @texline @math{\nu_1} |
| 19223 | @infoline @expr{v1} | 19217 | @infoline @expr{v1} |
| 19224 | and | 19218 | and |
| 19225 | @texline @tmath{\nu_2} | 19219 | @texline @math{\nu_2} |
| 19226 | @infoline @expr{v2} | 19220 | @infoline @expr{v2} |
| 19227 | are the degrees of freedom in the numerator and denominator, | 19221 | are the degrees of freedom in the numerator and denominator, |
| 19228 | respectively, used in computing the statistic @expr{F}. | 19222 | respectively, used in computing the statistic @expr{F}. |
| @@ -19240,7 +19234,7 @@ respectively, used in computing the statistic @expr{F}. | |||
| 19240 | @tindex ltpn | 19234 | @tindex ltpn |
| 19241 | The @samp{utpn(x,m,s)} function uses a normal (Gaussian) distribution | 19235 | The @samp{utpn(x,m,s)} function uses a normal (Gaussian) distribution |
| 19242 | with mean @expr{m} and standard deviation | 19236 | with mean @expr{m} and standard deviation |
| 19243 | @texline @tmath{\sigma}. | 19237 | @texline @math{\sigma}. |
| 19244 | @infoline @expr{s}. | 19238 | @infoline @expr{s}. |
| 19245 | It is the probability that such a normal-distributed random variable | 19239 | It is the probability that such a normal-distributed random variable |
| 19246 | would exceed @expr{x}. | 19240 | would exceed @expr{x}. |
| @@ -19273,18 +19267,18 @@ Poisson random events will occur. | |||
| 19273 | @tindex ltpt | 19267 | @tindex ltpt |
| 19274 | The @samp{utpt(t,v)} function uses the Student's ``t'' distribution | 19268 | The @samp{utpt(t,v)} function uses the Student's ``t'' distribution |
| 19275 | with | 19269 | with |
| 19276 | @texline @tmath{\nu} | 19270 | @texline @math{\nu} |
| 19277 | @infoline @expr{v} | 19271 | @infoline @expr{v} |
| 19278 | degrees of freedom. It is the probability that a | 19272 | degrees of freedom. It is the probability that a |
| 19279 | t-distributed random variable will be greater than @expr{t}. | 19273 | t-distributed random variable will be greater than @expr{t}. |
| 19280 | (Note: This computes the distribution function | 19274 | (Note: This computes the distribution function |
| 19281 | @texline @tmath{A(t|\nu)} | 19275 | @texline @math{A(t|\nu)} |
| 19282 | @infoline @expr{A(t|v)} | 19276 | @infoline @expr{A(t|v)} |
| 19283 | where | 19277 | where |
| 19284 | @texline @tmath{A(0|\nu) = 1} | 19278 | @texline @math{A(0|\nu) = 1} |
| 19285 | @infoline @expr{A(0|v) = 1} | 19279 | @infoline @expr{A(0|v) = 1} |
| 19286 | and | 19280 | and |
| 19287 | @texline @tmath{A(\infty|\nu) \to 0}. | 19281 | @texline @math{A(\infty|\nu) \to 0}. |
| 19288 | @infoline @expr{A(inf|v) -> 0}. | 19282 | @infoline @expr{A(inf|v) -> 0}. |
| 19289 | The @code{UTPT} operation on the HP-48 uses a different definition which | 19283 | The @code{UTPT} operation on the HP-48 uses a different definition which |
| 19290 | returns half of Calc's value: @samp{UTPT(t,v) = .5*utpt(t,v)}.) | 19284 | returns half of Calc's value: @samp{UTPT(t,v) = .5*utpt(t,v)}.) |
| @@ -19404,8 +19398,8 @@ integer, is the exponent. The result is the mantissa | |||
| 19404 | times ten to the power of the exponent. | 19398 | times ten to the power of the exponent. |
| 19405 | 19399 | ||
| 19406 | @item -12 | 19400 | @item -12 |
| 19407 | This is treated the same as @i{-11} by the @kbd{v p} command. | 19401 | This is treated the same as @mathit{-11} by the @kbd{v p} command. |
| 19408 | When unpacking, @i{-12} specifies that a floating-point mantissa | 19402 | When unpacking, @mathit{-12} specifies that a floating-point mantissa |
| 19409 | is desired. | 19403 | is desired. |
| 19410 | 19404 | ||
| 19411 | @item -13 | 19405 | @item -13 |
| @@ -19444,7 +19438,7 @@ returned in the form @samp{[@w{[a, b, c]}, [d, e, f]]}. | |||
| 19444 | If any elements of the vector are negative, other kinds of | 19438 | If any elements of the vector are negative, other kinds of |
| 19445 | packing are done at that level as described above. For | 19439 | packing are done at that level as described above. For |
| 19446 | example, @samp{[2, 3, -4]} takes 12 objects and creates a | 19440 | example, @samp{[2, 3, -4]} takes 12 objects and creates a |
| 19447 | @texline @tmath{2\times3} | 19441 | @texline @math{2\times3} |
| 19448 | @infoline 2x3 | 19442 | @infoline 2x3 |
| 19449 | matrix of error forms: @samp{[[a +/- b, c +/- d ... ]]}. | 19443 | matrix of error forms: @samp{[[a +/- b, c +/- d ... ]]}. |
| 19450 | Also, @samp{[-4, -10]} will convert four integers into an | 19444 | Also, @samp{[-4, -10]} will convert four integers into an |
| @@ -19482,18 +19476,18 @@ the result of @kbd{C-u -4 v u} will be the two vectors | |||
| 19482 | @samp{[a, c^2, d]} and @w{@samp{[b, 0, 7]}}. | 19476 | @samp{[a, c^2, d]} and @w{@samp{[b, 0, 7]}}. |
| 19483 | 19477 | ||
| 19484 | Note that the prefix argument can have an effect even when the input is | 19478 | Note that the prefix argument can have an effect even when the input is |
| 19485 | not a vector. For example, if the input is the number @i{-5}, then | 19479 | not a vector. For example, if the input is the number @mathit{-5}, then |
| 19486 | @kbd{c-u -1 v u} yields @i{-5} and 0 (the components of @i{-5} | 19480 | @kbd{c-u -1 v u} yields @mathit{-5} and 0 (the components of @mathit{-5} |
| 19487 | when viewed as a rectangular complex number); @kbd{C-u -2 v u} yields 5 | 19481 | when viewed as a rectangular complex number); @kbd{C-u -2 v u} yields 5 |
| 19488 | and 180 (assuming degrees mode); and @kbd{C-u -10 v u} yields @i{-5} | 19482 | and 180 (assuming Degrees mode); and @kbd{C-u -10 v u} yields @mathit{-5} |
| 19489 | and 1 (the numerator and denominator of @i{-5}, viewed as a rational | 19483 | and 1 (the numerator and denominator of @mathit{-5}, viewed as a rational |
| 19490 | number). Plain @kbd{v u} with this input would complain that the input | 19484 | number). Plain @kbd{v u} with this input would complain that the input |
| 19491 | is not a composite object. | 19485 | is not a composite object. |
| 19492 | 19486 | ||
| 19493 | Unpacking mode @i{-11} converts a float into an integer mantissa and | 19487 | Unpacking mode @mathit{-11} converts a float into an integer mantissa and |
| 19494 | an integer exponent, where the mantissa is not divisible by 10 | 19488 | an integer exponent, where the mantissa is not divisible by 10 |
| 19495 | (except that 0.0 is represented by a mantissa and exponent of 0). | 19489 | (except that 0.0 is represented by a mantissa and exponent of 0). |
| 19496 | Unpacking mode @i{-12} converts a float into a floating-point mantissa | 19490 | Unpacking mode @mathit{-12} converts a float into a floating-point mantissa |
| 19497 | and integer exponent, where the mantissa (for non-zero numbers) | 19491 | and integer exponent, where the mantissa (for non-zero numbers) |
| 19498 | is guaranteed to lie in the range [1 .. 10). In both cases, | 19492 | is guaranteed to lie in the range [1 .. 10). In both cases, |
| 19499 | the mantissa is shifted left or right (and the exponent adjusted | 19493 | the mantissa is shifted left or right (and the exponent adjusted |
| @@ -19593,7 +19587,7 @@ the stack is a scalar, it is used for each element on the diagonal, and | |||
| 19593 | the prefix argument is required. | 19587 | the prefix argument is required. |
| 19594 | 19588 | ||
| 19595 | To build a constant square matrix, e.g., a | 19589 | To build a constant square matrix, e.g., a |
| 19596 | @texline @tmath{3\times3} | 19590 | @texline @math{3\times3} |
| 19597 | @infoline 3x3 | 19591 | @infoline 3x3 |
| 19598 | matrix filled with ones, use @kbd{0 M-3 v d 1 +}, i.e., build a zero | 19592 | matrix filled with ones, use @kbd{0 M-3 v d 1 +}, i.e., build a zero |
| 19599 | matrix first and then add a constant value to that matrix. (Another | 19593 | matrix first and then add a constant value to that matrix. (Another |
| @@ -19615,7 +19609,7 @@ such generic identity matrices, and if one is combined with a matrix | |||
| 19615 | whose size is known, it is converted automatically to an identity | 19609 | whose size is known, it is converted automatically to an identity |
| 19616 | matrix of a suitable matching size. The @kbd{v i} command with an | 19610 | matrix of a suitable matching size. The @kbd{v i} command with an |
| 19617 | argument of zero creates a generic identity matrix, @samp{idn(1)}. | 19611 | argument of zero creates a generic identity matrix, @samp{idn(1)}. |
| 19618 | Note that in dimensioned matrix mode (@pxref{Matrix Mode}), generic | 19612 | Note that in dimensioned Matrix mode (@pxref{Matrix Mode}), generic |
| 19619 | identity matrices are immediately expanded to the current default | 19613 | identity matrices are immediately expanded to the current default |
| 19620 | dimensions. | 19614 | dimensions. |
| 19621 | 19615 | ||
| @@ -19626,7 +19620,7 @@ The @kbd{v x} (@code{calc-index}) [@code{index}] function builds a vector | |||
| 19626 | of consecutive integers from 1 to @var{n}, where @var{n} is the numeric | 19620 | of consecutive integers from 1 to @var{n}, where @var{n} is the numeric |
| 19627 | prefix argument. If you do not provide a prefix argument, you will be | 19621 | prefix argument. If you do not provide a prefix argument, you will be |
| 19628 | prompted to enter a suitable number. If @var{n} is negative, the result | 19622 | prompted to enter a suitable number. If @var{n} is negative, the result |
| 19629 | is a vector of negative integers from @var{n} to @i{-1}. | 19623 | is a vector of negative integers from @var{n} to @mathit{-1}. |
| 19630 | 19624 | ||
| 19631 | With a prefix argument of just @kbd{C-u}, the @kbd{v x} command takes | 19625 | With a prefix argument of just @kbd{C-u}, the @kbd{v x} command takes |
| 19632 | three values from the stack: @var{n}, @var{start}, and @var{incr} (with | 19626 | three values from the stack: @var{n}, @var{start}, and @var{incr} (with |
| @@ -19819,7 +19813,7 @@ With the Hyperbolic flag, @kbd{H v l} [@code{mdims}] computes a vector | |||
| 19819 | of the dimensions of a vector, matrix, or higher-order object. For | 19813 | of the dimensions of a vector, matrix, or higher-order object. For |
| 19820 | example, @samp{mdims([[a,b,c],[d,e,f]])} returns @samp{[2, 3]} since | 19814 | example, @samp{mdims([[a,b,c],[d,e,f]])} returns @samp{[2, 3]} since |
| 19821 | its argument is a | 19815 | its argument is a |
| 19822 | @texline @tmath{2\times3} | 19816 | @texline @math{2\times3} |
| 19823 | @infoline 2x3 | 19817 | @infoline 2x3 |
| 19824 | matrix. | 19818 | matrix. |
| 19825 | 19819 | ||
| @@ -19851,13 +19845,13 @@ in the vector, the last row will be short and the result will not be | |||
| 19851 | suitable for use as a matrix. For example, with the matrix | 19845 | suitable for use as a matrix. For example, with the matrix |
| 19852 | @samp{[[1, 2], @w{[3, 4]}]} on the stack, @kbd{v a 4} produces | 19846 | @samp{[[1, 2], @w{[3, 4]}]} on the stack, @kbd{v a 4} produces |
| 19853 | @samp{[[1, 2, 3, 4]]} (a | 19847 | @samp{[[1, 2, 3, 4]]} (a |
| 19854 | @texline @tmath{1\times4} | 19848 | @texline @math{1\times4} |
| 19855 | @infoline 1x4 | 19849 | @infoline 1x4 |
| 19856 | matrix), @kbd{v a 1} produces @samp{[[1], [2], [3], [4]]} (a | 19850 | matrix), @kbd{v a 1} produces @samp{[[1], [2], [3], [4]]} (a |
| 19857 | @texline @tmath{4\times1} | 19851 | @texline @math{4\times1} |
| 19858 | @infoline 4x1 | 19852 | @infoline 4x1 |
| 19859 | matrix), @kbd{v a 2} produces @samp{[[1, 2], [3, 4]]} (the original | 19853 | matrix), @kbd{v a 2} produces @samp{[[1, 2], [3, 4]]} (the original |
| 19860 | @texline @tmath{2\times2} | 19854 | @texline @math{2\times2} |
| 19861 | @infoline 2x2 | 19855 | @infoline 2x2 |
| 19862 | matrix), @w{@kbd{v a 3}} produces @samp{[[1, 2, 3], [4]]} (not a | 19856 | matrix), @w{@kbd{v a 3}} produces @samp{[[1, 2, 3], [4]]} (not a |
| 19863 | matrix), and @kbd{v a 0} produces the flattened list | 19857 | matrix), and @kbd{v a 0} produces the flattened list |
| @@ -20177,10 +20171,10 @@ sets are disjoint, i.e., if they share no common elements, the result | |||
| 20177 | will be the empty vector @samp{[]}. Note that the characters @kbd{V} | 20171 | will be the empty vector @samp{[]}. Note that the characters @kbd{V} |
| 20178 | and @kbd{^} were chosen to be close to the conventional mathematical | 20172 | and @kbd{^} were chosen to be close to the conventional mathematical |
| 20179 | notation for set | 20173 | notation for set |
| 20180 | @texline union@tie{}(@tmath{A \cup B}) | 20174 | @texline union@tie{}(@math{A \cup B}) |
| 20181 | @infoline union | 20175 | @infoline union |
| 20182 | and | 20176 | and |
| 20183 | @texline intersection@tie{}(@tmath{A \cap B}). | 20177 | @texline intersection@tie{}(@math{A \cap B}). |
| 20184 | @infoline intersection. | 20178 | @infoline intersection. |
| 20185 | 20179 | ||
| 20186 | @kindex V - | 20180 | @kindex V - |
| @@ -20289,7 +20283,7 @@ not include any negative numbers. The input is interpreted as a | |||
| 20289 | set of integers in the sense of @kbd{V F} (@code{vfloor}). Beware | 20283 | set of integers in the sense of @kbd{V F} (@code{vfloor}). Beware |
| 20290 | that a simple input like @samp{[100]} can result in a huge integer | 20284 | that a simple input like @samp{[100]} can result in a huge integer |
| 20291 | representation | 20285 | representation |
| 20292 | @texline (@tmath{2^{100}}, a 31-digit integer, in this case). | 20286 | @texline (@math{2^{100}}, a 31-digit integer, in this case). |
| 20293 | @infoline (@expr{2^100}, a 31-digit integer, in this case). | 20287 | @infoline (@expr{2^100}, a 31-digit integer, in this case). |
| 20294 | 20288 | ||
| 20295 | @node Statistical Operations, Reducing and Mapping, Set Operations, Matrix Functions | 20289 | @node Statistical Operations, Reducing and Mapping, Set Operations, Matrix Functions |
| @@ -20401,10 +20395,10 @@ plus or minus infinity. | |||
| 20401 | The @kbd{u M} (@code{calc-vector-mean}) [@code{vmean}] command | 20395 | The @kbd{u M} (@code{calc-vector-mean}) [@code{vmean}] command |
| 20402 | computes the average (arithmetic mean) of the data values. | 20396 | computes the average (arithmetic mean) of the data values. |
| 20403 | If the inputs are error forms | 20397 | If the inputs are error forms |
| 20404 | @texline @tmath{x \pm \sigma}, | 20398 | @texline @math{x \pm \sigma}, |
| 20405 | @infoline @samp{x +/- s}, | 20399 | @infoline @samp{x +/- s}, |
| 20406 | this is the weighted mean of the @expr{x} values with weights | 20400 | this is the weighted mean of the @expr{x} values with weights |
| 20407 | @texline @tmath{1 /\sigma^2}. | 20401 | @texline @math{1 /\sigma^2}. |
| 20408 | @infoline @expr{1 / s^2}. | 20402 | @infoline @expr{1 / s^2}. |
| 20409 | @tex | 20403 | @tex |
| 20410 | \turnoffactive | 20404 | \turnoffactive |
| @@ -20416,7 +20410,7 @@ values divided by the count of the values. | |||
| 20416 | 20410 | ||
| 20417 | Note that a plain number can be considered an error form with | 20411 | Note that a plain number can be considered an error form with |
| 20418 | error | 20412 | error |
| 20419 | @texline @tmath{\sigma = 0}. | 20413 | @texline @math{\sigma = 0}. |
| 20420 | @infoline @expr{s = 0}. | 20414 | @infoline @expr{s = 0}. |
| 20421 | If the input to @kbd{u M} is a mixture of | 20415 | If the input to @kbd{u M} is a mixture of |
| 20422 | plain numbers and error forms, the result is the mean of the | 20416 | plain numbers and error forms, the result is the mean of the |
| @@ -20525,7 +20519,7 @@ for a vector of numbers simply by using the @kbd{A} command. | |||
| 20525 | @cindex Sample statistics | 20519 | @cindex Sample statistics |
| 20526 | The @kbd{u S} (@code{calc-vector-sdev}) [@code{vsdev}] command | 20520 | The @kbd{u S} (@code{calc-vector-sdev}) [@code{vsdev}] command |
| 20527 | computes the standard | 20521 | computes the standard |
| 20528 | @texline deviation@tie{}@tmath{\sigma} | 20522 | @texline deviation@tie{}@math{\sigma} |
| 20529 | @infoline deviation | 20523 | @infoline deviation |
| 20530 | of the data values. If the values are error forms, the errors are used | 20524 | of the data values. If the values are error forms, the errors are used |
| 20531 | as weights just as for @kbd{u M}. This is the @emph{sample} standard | 20525 | as weights just as for @kbd{u M}. This is the @emph{sample} standard |
| @@ -20541,7 +20535,7 @@ This function also applies to distributions. The standard deviation | |||
| 20541 | of a single error form is simply the error part. The standard deviation | 20535 | of a single error form is simply the error part. The standard deviation |
| 20542 | of a continuous interval happens to equal the difference between the | 20536 | of a continuous interval happens to equal the difference between the |
| 20543 | limits, divided by | 20537 | limits, divided by |
| 20544 | @texline @tmath{\sqrt{12}}. | 20538 | @texline @math{\sqrt{12}}. |
| 20545 | @infoline @expr{sqrt(12)}. | 20539 | @infoline @expr{sqrt(12)}. |
| 20546 | The standard deviation of an integer interval is the same as the | 20540 | The standard deviation of an integer interval is the same as the |
| 20547 | standard deviation of a vector of those integers. | 20541 | standard deviation of a vector of those integers. |
| @@ -20579,7 +20573,7 @@ The @kbd{H u S} (@code{calc-vector-variance}) [@code{vvar}] and | |||
| 20579 | @kbd{H I u S} (@code{calc-vector-pop-variance}) [@code{vpvar}] | 20573 | @kbd{H I u S} (@code{calc-vector-pop-variance}) [@code{vpvar}] |
| 20580 | commands compute the variance of the data values. The variance | 20574 | commands compute the variance of the data values. The variance |
| 20581 | is the | 20575 | is the |
| 20582 | @texline square@tie{}@tmath{\sigma^2} | 20576 | @texline square@tie{}@math{\sigma^2} |
| 20583 | @infoline square | 20577 | @infoline square |
| 20584 | of the standard deviation, i.e., the sum of the | 20578 | of the standard deviation, i.e., the sum of the |
| 20585 | squares of the deviations of the data values from the mean. | 20579 | squares of the deviations of the data values from the mean. |
| @@ -20603,7 +20597,7 @@ vectors of equal size. The vectors are each flattened in the same | |||
| 20603 | way as by the single-variable statistical functions. Given a numeric | 20597 | way as by the single-variable statistical functions. Given a numeric |
| 20604 | prefix argument of 1, these functions instead take one object from | 20598 | prefix argument of 1, these functions instead take one object from |
| 20605 | the stack, which must be an | 20599 | the stack, which must be an |
| 20606 | @texline @tmath{N\times2} | 20600 | @texline @math{N\times2} |
| 20607 | @infoline Nx2 | 20601 | @infoline Nx2 |
| 20608 | matrix of data values. Once again, variable names can be used in place | 20602 | matrix of data values. Once again, variable names can be used in place |
| 20609 | of actual vectors and matrices. | 20603 | of actual vectors and matrices. |
| @@ -20861,7 +20855,7 @@ If any argument to @kbd{V M} is a matrix, the operator is normally mapped | |||
| 20861 | across all elements of the matrix. For example, given the matrix | 20855 | across all elements of the matrix. For example, given the matrix |
| 20862 | @expr{[[1, -2, 3], [-4, 5, -6]]}, @kbd{V M A} takes six absolute values to | 20856 | @expr{[[1, -2, 3], [-4, 5, -6]]}, @kbd{V M A} takes six absolute values to |
| 20863 | produce another | 20857 | produce another |
| 20864 | @texline @tmath{3\times2} | 20858 | @texline @math{3\times2} |
| 20865 | @infoline 3x2 | 20859 | @infoline 3x2 |
| 20866 | matrix, @expr{[[1, 2, 3], [4, 5, 6]]}. | 20860 | matrix, @expr{[[1, 2, 3], [4, 5, 6]]}. |
| 20867 | 20861 | ||
| @@ -21272,11 +21266,11 @@ for anything else'') prefix. | |||
| 21272 | using regular Emacs editing commands. | 21266 | using regular Emacs editing commands. |
| 21273 | 21267 | ||
| 21274 | When doing algebraic work, you may find several of the Calculator's | 21268 | When doing algebraic work, you may find several of the Calculator's |
| 21275 | modes to be helpful, including algebraic-simplification mode (@kbd{m A}) | 21269 | modes to be helpful, including Algebraic Simplification mode (@kbd{m A}) |
| 21276 | or no-simplification mode (@kbd{m O}), | 21270 | or No-Simplification mode (@kbd{m O}), |
| 21277 | algebraic-entry mode (@kbd{m a}), fraction mode (@kbd{m f}), and | 21271 | Algebraic entry mode (@kbd{m a}), Fraction mode (@kbd{m f}), and |
| 21278 | symbolic mode (@kbd{m s}). @xref{Mode Settings}, for discussions | 21272 | Symbolic mode (@kbd{m s}). @xref{Mode Settings}, for discussions |
| 21279 | of these modes. You may also wish to select ``big'' display mode (@kbd{d B}). | 21273 | of these modes. You may also wish to select Big display mode (@kbd{d B}). |
| 21280 | @xref{Normal Language Modes}. | 21274 | @xref{Normal Language Modes}. |
| 21281 | 21275 | ||
| 21282 | @menu | 21276 | @menu |
| @@ -21330,7 +21324,7 @@ sub-formula, and press @w{@kbd{j s}} (@code{calc-select-here}). Calc will | |||
| 21330 | highlight the smallest portion of the formula that contains that | 21324 | highlight the smallest portion of the formula that contains that |
| 21331 | character. By default the sub-formula is highlighted by blanking out | 21325 | character. By default the sub-formula is highlighted by blanking out |
| 21332 | all of the rest of the formula with dots. Selection works in any | 21326 | all of the rest of the formula with dots. Selection works in any |
| 21333 | display mode but is perhaps easiest in ``big'' (@kbd{d B}) mode. | 21327 | display mode but is perhaps easiest in Big mode (@kbd{d B}). |
| 21334 | Suppose you enter the following formula: | 21328 | Suppose you enter the following formula: |
| 21335 | 21329 | ||
| 21336 | @smallexample | 21330 | @smallexample |
| @@ -21360,7 +21354,7 @@ to | |||
| 21360 | Every character not part of the sub-formula @samp{b} has been changed | 21354 | Every character not part of the sub-formula @samp{b} has been changed |
| 21361 | to a dot. The @samp{*} next to the line number is to remind you that | 21355 | to a dot. The @samp{*} next to the line number is to remind you that |
| 21362 | the formula has a portion of it selected. (In this case, it's very | 21356 | the formula has a portion of it selected. (In this case, it's very |
| 21363 | obvious, but it might not always be. If Embedded Mode is enabled, | 21357 | obvious, but it might not always be. If Embedded mode is enabled, |
| 21364 | the word @samp{Sel} also appears in the mode line because the stack | 21358 | the word @samp{Sel} also appears in the mode line because the stack |
| 21365 | may not be visible. @pxref{Embedded Mode}.) | 21359 | may not be visible. @pxref{Embedded Mode}.) |
| 21366 | 21360 | ||
| @@ -22010,17 +22004,17 @@ but which also substitutes stored values for variables in the formula. | |||
| 22010 | Use @kbd{a v} if you want the variables to ignore their stored values. | 22004 | Use @kbd{a v} if you want the variables to ignore their stored values. |
| 22011 | 22005 | ||
| 22012 | If you give a numeric prefix argument of 2 to @kbd{a v}, it simplifies | 22006 | If you give a numeric prefix argument of 2 to @kbd{a v}, it simplifies |
| 22013 | as if in algebraic simplification mode. This is equivalent to typing | 22007 | as if in Algebraic Simplification mode. This is equivalent to typing |
| 22014 | @kbd{a s}; @pxref{Simplifying Formulas}. If you give a numeric prefix | 22008 | @kbd{a s}; @pxref{Simplifying Formulas}. If you give a numeric prefix |
| 22015 | of 3 or more, it uses extended simplification mode (@kbd{a e}). | 22009 | of 3 or more, it uses Extended Simplification mode (@kbd{a e}). |
| 22016 | 22010 | ||
| 22017 | If you give a negative prefix argument @i{-1}, @i{-2}, or @i{-3}, | 22011 | If you give a negative prefix argument @mathit{-1}, @mathit{-2}, or @mathit{-3}, |
| 22018 | it simplifies in the corresponding mode but only works on the top-level | 22012 | it simplifies in the corresponding mode but only works on the top-level |
| 22019 | function call of the formula. For example, @samp{(2 + 3) * (2 + 3)} will | 22013 | function call of the formula. For example, @samp{(2 + 3) * (2 + 3)} will |
| 22020 | simplify to @samp{(2 + 3)^2}, without simplifying the sub-formulas | 22014 | simplify to @samp{(2 + 3)^2}, without simplifying the sub-formulas |
| 22021 | @samp{2 + 3}. As another example, typing @kbd{V R +} to sum the vector | 22015 | @samp{2 + 3}. As another example, typing @kbd{V R +} to sum the vector |
| 22022 | @samp{[1, 2, 3, 4]} produces the formula @samp{reduce(add, [1, 2, 3, 4])} | 22016 | @samp{[1, 2, 3, 4]} produces the formula @samp{reduce(add, [1, 2, 3, 4])} |
| 22023 | in no-simplify mode. Using @kbd{a v} will evaluate this all the way to | 22017 | in No-Simplify mode. Using @kbd{a v} will evaluate this all the way to |
| 22024 | 10; using @kbd{C-u - a v} will evaluate it only to @samp{1 + 2 + 3 + 4}. | 22018 | 10; using @kbd{C-u - a v} will evaluate it only to @samp{1 + 2 + 3 + 4}. |
| 22025 | (@xref{Reducing and Mapping}.) | 22019 | (@xref{Reducing and Mapping}.) |
| 22026 | 22020 | ||
| @@ -22028,7 +22022,7 @@ in no-simplify mode. Using @kbd{a v} will evaluate this all the way to | |||
| 22028 | @tindex evalvn | 22022 | @tindex evalvn |
| 22029 | The @kbd{=} command corresponds to the @code{evalv} function, and | 22023 | The @kbd{=} command corresponds to the @code{evalv} function, and |
| 22030 | the related @kbd{N} command, which is like @kbd{=} but temporarily | 22024 | the related @kbd{N} command, which is like @kbd{=} but temporarily |
| 22031 | disables symbolic (@kbd{m s}) mode during the evaluation, corresponds | 22025 | disables Symbolic mode (@kbd{m s}) during the evaluation, corresponds |
| 22032 | to the @code{evalvn} function. (These commands interpret their prefix | 22026 | to the @code{evalvn} function. (These commands interpret their prefix |
| 22033 | arguments differently than @kbd{a v}; @kbd{=} treats the prefix as | 22027 | arguments differently than @kbd{a v}; @kbd{=} treats the prefix as |
| 22034 | the number of stack elements to evaluate at once, and @kbd{N} treats | 22028 | the number of stack elements to evaluate at once, and @kbd{N} treats |
| @@ -22203,7 +22197,7 @@ is evaluated to @expr{3}. Evaluation does not occur if the arguments | |||
| 22203 | to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}), | 22197 | to a function are somehow of the wrong type @expr{@t{tan}([2,3,4])}), |
| 22204 | range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), | 22198 | range (@expr{@t{tan}(90)}), or number (@expr{@t{tan}(3,5)}), |
| 22205 | or if the function name is not recognized (@expr{@t{f}(5)}), or if | 22199 | or if the function name is not recognized (@expr{@t{f}(5)}), or if |
| 22206 | ``symbolic'' mode (@pxref{Symbolic Mode}) prevents evaluation | 22200 | Symbolic mode (@pxref{Symbolic Mode}) prevents evaluation |
| 22207 | (@expr{@t{sqrt}(2)}). | 22201 | (@expr{@t{sqrt}(2)}). |
| 22208 | 22202 | ||
| 22209 | Calc simplifies (evaluates) the arguments to a function before it | 22203 | Calc simplifies (evaluates) the arguments to a function before it |
| @@ -22286,7 +22280,7 @@ simplifications.) | |||
| 22286 | 22280 | ||
| 22287 | The distributive law is used to simplify sums in some cases: | 22281 | The distributive law is used to simplify sums in some cases: |
| 22288 | @expr{a x + b x} to @expr{(a + b) x}, where @expr{a} represents | 22282 | @expr{a x + b x} to @expr{(a + b) x}, where @expr{a} represents |
| 22289 | a number or an implicit 1 or @i{-1} (as in @expr{x} or @expr{-x}) | 22283 | a number or an implicit 1 or @mathit{-1} (as in @expr{x} or @expr{-x}) |
| 22290 | and similarly for @expr{b}. Use the @kbd{a c}, @w{@kbd{a f}}, or | 22284 | and similarly for @expr{b}. Use the @kbd{a c}, @w{@kbd{a f}}, or |
| 22291 | @kbd{j M} commands to merge sums with non-numeric coefficients | 22285 | @kbd{j M} commands to merge sums with non-numeric coefficients |
| 22292 | using the distributive law. | 22286 | using the distributive law. |
| @@ -22311,7 +22305,7 @@ to @expr{-a}. | |||
| 22311 | The products @expr{1 a} and @expr{a 1} are simplified to @expr{a}; | 22305 | The products @expr{1 a} and @expr{a 1} are simplified to @expr{a}; |
| 22312 | @expr{(-1) a} and @expr{a (-1)} are simplified to @expr{-a}; | 22306 | @expr{(-1) a} and @expr{a (-1)} are simplified to @expr{-a}; |
| 22313 | @expr{0 a} and @expr{a 0} are simplified to @expr{0}, except that | 22307 | @expr{0 a} and @expr{a 0} are simplified to @expr{0}, except that |
| 22314 | in matrix mode where @expr{a} is not provably scalar the result | 22308 | in Matrix mode where @expr{a} is not provably scalar the result |
| 22315 | is the generic zero matrix @samp{idn(0)}, and that if @expr{a} is | 22309 | is the generic zero matrix @samp{idn(0)}, and that if @expr{a} is |
| 22316 | infinite the result is @samp{nan}. | 22310 | infinite the result is @samp{nan}. |
| 22317 | 22311 | ||
| @@ -22330,25 +22324,25 @@ rewritten to @expr{a (c - b)}. | |||
| 22330 | 22324 | ||
| 22331 | The distributive law of products and powers is used for adjacent | 22325 | The distributive law of products and powers is used for adjacent |
| 22332 | terms of the product: @expr{x^a x^b} goes to | 22326 | terms of the product: @expr{x^a x^b} goes to |
| 22333 | @texline @tmath{x^{a+b}} | 22327 | @texline @math{x^{a+b}} |
| 22334 | @infoline @expr{x^(a+b)} | 22328 | @infoline @expr{x^(a+b)} |
| 22335 | where @expr{a} is a number, or an implicit 1 (as in @expr{x}), | 22329 | where @expr{a} is a number, or an implicit 1 (as in @expr{x}), |
| 22336 | or the implicit one-half of @expr{@t{sqrt}(x)}, and similarly for | 22330 | or the implicit one-half of @expr{@t{sqrt}(x)}, and similarly for |
| 22337 | @expr{b}. The result is written using @samp{sqrt} or @samp{1/sqrt} | 22331 | @expr{b}. The result is written using @samp{sqrt} or @samp{1/sqrt} |
| 22338 | if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively. | 22332 | if the sum of the powers is @expr{1/2} or @expr{-1/2}, respectively. |
| 22339 | If the sum of the powers is zero, the product is simplified to | 22333 | If the sum of the powers is zero, the product is simplified to |
| 22340 | @expr{1} or to @samp{idn(1)} if matrix mode is enabled. | 22334 | @expr{1} or to @samp{idn(1)} if Matrix mode is enabled. |
| 22341 | 22335 | ||
| 22342 | The product of a negative power times anything but another negative | 22336 | The product of a negative power times anything but another negative |
| 22343 | power is changed to use division: | 22337 | power is changed to use division: |
| 22344 | @texline @tmath{x^{-2} y} | 22338 | @texline @math{x^{-2} y} |
| 22345 | @infoline @expr{x^(-2) y} | 22339 | @infoline @expr{x^(-2) y} |
| 22346 | goes to @expr{y / x^2} unless matrix mode is | 22340 | goes to @expr{y / x^2} unless Matrix mode is |
| 22347 | in effect and neither @expr{x} nor @expr{y} are scalar (in which | 22341 | in effect and neither @expr{x} nor @expr{y} are scalar (in which |
| 22348 | case it is considered unsafe to rearrange the order of the terms). | 22342 | case it is considered unsafe to rearrange the order of the terms). |
| 22349 | 22343 | ||
| 22350 | Finally, @expr{a (b/c)} is rewritten to @expr{(a b)/c}, and also | 22344 | Finally, @expr{a (b/c)} is rewritten to @expr{(a b)/c}, and also |
| 22351 | @expr{(a/b) c} is changed to @expr{(a c)/b} unless in matrix mode. | 22345 | @expr{(a/b) c} is changed to @expr{(a c)/b} unless in Matrix mode. |
| 22352 | 22346 | ||
| 22353 | @tex | 22347 | @tex |
| 22354 | \bigskip | 22348 | \bigskip |
| @@ -22365,17 +22359,17 @@ infinite quantity, as directed by the current infinite mode. | |||
| 22365 | @xref{Infinite Mode}. | 22359 | @xref{Infinite Mode}. |
| 22366 | 22360 | ||
| 22367 | The expression | 22361 | The expression |
| 22368 | @texline @tmath{a / b^{-c}} | 22362 | @texline @math{a / b^{-c}} |
| 22369 | @infoline @expr{a / b^(-c)} | 22363 | @infoline @expr{a / b^(-c)} |
| 22370 | is changed to @expr{a b^c}, where @expr{-c} is any negative-looking | 22364 | is changed to @expr{a b^c}, where @expr{-c} is any negative-looking |
| 22371 | power. Also, @expr{1 / b^c} is changed to | 22365 | power. Also, @expr{1 / b^c} is changed to |
| 22372 | @texline @tmath{b^{-c}} | 22366 | @texline @math{b^{-c}} |
| 22373 | @infoline @expr{b^(-c)} | 22367 | @infoline @expr{b^(-c)} |
| 22374 | for any power @expr{c}. | 22368 | for any power @expr{c}. |
| 22375 | 22369 | ||
| 22376 | Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; | 22370 | Also, @expr{(-a) / b} and @expr{a / (-b)} go to @expr{-(a/b)}; |
| 22377 | @expr{(a/b) / c} goes to @expr{a / (b c)}; and @expr{a / (b/c)} | 22371 | @expr{(a/b) / c} goes to @expr{a / (b c)}; and @expr{a / (b/c)} |
| 22378 | goes to @expr{(a c) / b} unless matrix mode prevents this | 22372 | goes to @expr{(a c) / b} unless Matrix mode prevents this |
| 22379 | rearrangement. Similarly, @expr{a / (b:c)} is simplified to | 22373 | rearrangement. Similarly, @expr{a / (b:c)} is simplified to |
| 22380 | @expr{(c:b) a} for any fraction @expr{b:c}. | 22374 | @expr{(c:b) a} for any fraction @expr{b:c}. |
| 22381 | 22375 | ||
| @@ -22399,7 +22393,7 @@ to @expr{a / (c - b)}, and @expr{(a - b) / (-c)} to @expr{(b - a) / c}. | |||
| 22399 | @end tex | 22393 | @end tex |
| 22400 | 22394 | ||
| 22401 | The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} | 22395 | The formula @expr{x^0} is simplified to @expr{1}, or to @samp{idn(1)} |
| 22402 | in matrix mode. The formula @expr{0^x} is simplified to @expr{0} | 22396 | in Matrix mode. The formula @expr{0^x} is simplified to @expr{0} |
| 22403 | unless @expr{x} is a negative number or complex number, in which | 22397 | unless @expr{x} is a negative number or complex number, in which |
| 22404 | case the result is an infinity or an unsimplified formula according | 22398 | case the result is an infinity or an unsimplified formula according |
| 22405 | to the current infinite mode. Note that @expr{0^0} is an | 22399 | to the current infinite mode. Note that @expr{0^0} is an |
| @@ -22410,22 +22404,22 @@ Powers of products or quotients @expr{(a b)^c}, @expr{(a/b)^c} | |||
| 22410 | are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c} | 22404 | are distributed to @expr{a^c b^c}, @expr{a^c / b^c} only if @expr{c} |
| 22411 | is an integer, or if either @expr{a} or @expr{b} are nonnegative | 22405 | is an integer, or if either @expr{a} or @expr{b} are nonnegative |
| 22412 | real numbers. Powers of powers @expr{(a^b)^c} are simplified to | 22406 | real numbers. Powers of powers @expr{(a^b)^c} are simplified to |
| 22413 | @texline @tmath{a^{b c}} | 22407 | @texline @math{a^{b c}} |
| 22414 | @infoline @expr{a^(b c)} | 22408 | @infoline @expr{a^(b c)} |
| 22415 | only when @expr{c} is an integer and @expr{b c} also | 22409 | only when @expr{c} is an integer and @expr{b c} also |
| 22416 | evaluates to an integer. Without these restrictions these simplifications | 22410 | evaluates to an integer. Without these restrictions these simplifications |
| 22417 | would not be safe because of problems with principal values. | 22411 | would not be safe because of problems with principal values. |
| 22418 | (In other words, | 22412 | (In other words, |
| 22419 | @texline @tmath{((-3)^{1/2})^2} | 22413 | @texline @math{((-3)^{1/2})^2} |
| 22420 | @infoline @expr{((-3)^1:2)^2} | 22414 | @infoline @expr{((-3)^1:2)^2} |
| 22421 | is safe to simplify, but | 22415 | is safe to simplify, but |
| 22422 | @texline @tmath{((-3)^2)^{1/2}} | 22416 | @texline @math{((-3)^2)^{1/2}} |
| 22423 | @infoline @expr{((-3)^2)^1:2} | 22417 | @infoline @expr{((-3)^2)^1:2} |
| 22424 | is not.) @xref{Declarations}, for ways to inform Calc that your | 22418 | is not.) @xref{Declarations}, for ways to inform Calc that your |
| 22425 | variables satisfy these requirements. | 22419 | variables satisfy these requirements. |
| 22426 | 22420 | ||
| 22427 | As a special case of this rule, @expr{@t{sqrt}(x)^n} is simplified to | 22421 | As a special case of this rule, @expr{@t{sqrt}(x)^n} is simplified to |
| 22428 | @texline @tmath{x^{n/2}} | 22422 | @texline @math{x^{n/2}} |
| 22429 | @infoline @expr{x^(n/2)} | 22423 | @infoline @expr{x^(n/2)} |
| 22430 | only for even integers @expr{n}. | 22424 | only for even integers @expr{n}. |
| 22431 | 22425 | ||
| @@ -22438,15 +22432,15 @@ even integer, or to @expr{-(a^b)} if @expr{b} is an odd integer, | |||
| 22438 | for any negative-looking expression @expr{-a}. | 22432 | for any negative-looking expression @expr{-a}. |
| 22439 | 22433 | ||
| 22440 | Square roots @expr{@t{sqrt}(x)} generally act like one-half powers | 22434 | Square roots @expr{@t{sqrt}(x)} generally act like one-half powers |
| 22441 | @texline @tmath{x^{1:2}} | 22435 | @texline @math{x^{1:2}} |
| 22442 | @infoline @expr{x^1:2} | 22436 | @infoline @expr{x^1:2} |
| 22443 | for the purposes of the above-listed simplifications. | 22437 | for the purposes of the above-listed simplifications. |
| 22444 | 22438 | ||
| 22445 | Also, note that | 22439 | Also, note that |
| 22446 | @texline @tmath{1 / x^{1:2}} | 22440 | @texline @math{1 / x^{1:2}} |
| 22447 | @infoline @expr{1 / x^1:2} | 22441 | @infoline @expr{1 / x^1:2} |
| 22448 | is changed to | 22442 | is changed to |
| 22449 | @texline @tmath{x^{-1:2}}, | 22443 | @texline @math{x^{-1:2}}, |
| 22450 | @infoline @expr{x^(-1:2)}, | 22444 | @infoline @expr{x^(-1:2)}, |
| 22451 | but @expr{1 / @t{sqrt}(x)} is left alone. | 22445 | but @expr{1 / @t{sqrt}(x)} is left alone. |
| 22452 | 22446 | ||
| @@ -22575,7 +22569,7 @@ property that real-valued numbers, interval forms and infinities | |||
| 22575 | come first, and are sorted into increasing order. The @kbd{V S} | 22569 | come first, and are sorted into increasing order. The @kbd{V S} |
| 22576 | command uses the same ordering when sorting a vector. | 22570 | command uses the same ordering when sorting a vector. |
| 22577 | 22571 | ||
| 22578 | Sorting of terms of products is inhibited when matrix mode is | 22572 | Sorting of terms of products is inhibited when Matrix mode is |
| 22579 | turned on; in this case, Calc will never exchange the order of | 22573 | turned on; in this case, Calc will never exchange the order of |
| 22580 | two terms unless it knows at least one of the terms is a scalar. | 22574 | two terms unless it knows at least one of the terms is a scalar. |
| 22581 | 22575 | ||
| @@ -22589,7 +22583,7 @@ Thus @expr{(x + y) (y + x)} will be simplified to @expr{(x + y)^2}. | |||
| 22589 | A subtle point is that @expr{(x - y) (y - x)} will @emph{not} | 22583 | A subtle point is that @expr{(x - y) (y - x)} will @emph{not} |
| 22590 | be simplified to @expr{-(x - y)^2}; Calc does not notice that | 22584 | be simplified to @expr{-(x - y)^2}; Calc does not notice that |
| 22591 | one term can be written as a constant times the other, even if | 22585 | one term can be written as a constant times the other, even if |
| 22592 | that constant is @i{-1}. | 22586 | that constant is @mathit{-1}. |
| 22593 | 22587 | ||
| 22594 | A fraction times any expression, @expr{(a:b) x}, is changed to | 22588 | A fraction times any expression, @expr{(a:b) x}, is changed to |
| 22595 | a quotient involving integers: @expr{a x / b}. This is not | 22589 | a quotient involving integers: @expr{a x / b}. This is not |
| @@ -22632,7 +22626,7 @@ Square roots of integer or rational arguments are simplified in | |||
| 22632 | several ways. (Note that these will be left unevaluated only in | 22626 | several ways. (Note that these will be left unevaluated only in |
| 22633 | Symbolic mode.) First, square integer or rational factors are | 22627 | Symbolic mode.) First, square integer or rational factors are |
| 22634 | pulled out so that @expr{@t{sqrt}(8)} is rewritten as | 22628 | pulled out so that @expr{@t{sqrt}(8)} is rewritten as |
| 22635 | @texline @tmath{$2\,\t{sqrt}(2)$}. | 22629 | @texline @math{2\,\t{sqrt}(2)}. |
| 22636 | @infoline @expr{2 sqrt(2)}. | 22630 | @infoline @expr{2 sqrt(2)}. |
| 22637 | Conceptually speaking this implies factoring the argument into primes | 22631 | Conceptually speaking this implies factoring the argument into primes |
| 22638 | and moving pairs of primes out of the square root, but for reasons of | 22632 | and moving pairs of primes out of the square root, but for reasons of |
| @@ -22694,23 +22688,23 @@ functions are known, except for negative arguments of @code{arcsin}, | |||
| 22694 | @code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that | 22688 | @code{arctan}, @code{arcsinh}, and @code{arctanh}. Note that |
| 22695 | @expr{@t{arcsin}(@t{sin}(x))} can @emph{not} safely change to | 22689 | @expr{@t{arcsin}(@t{sin}(x))} can @emph{not} safely change to |
| 22696 | @expr{x}, since this only correct within an integer multiple of | 22690 | @expr{x}, since this only correct within an integer multiple of |
| 22697 | @texline @tmath{2 \pi} | 22691 | @texline @math{2 \pi} |
| 22698 | @infoline @expr{2 pi} | 22692 | @infoline @expr{2 pi} |
| 22699 | radians or 360 degrees. However, @expr{@t{arcsinh}(@t{sinh}(x))} is | 22693 | radians or 360 degrees. However, @expr{@t{arcsinh}(@t{sinh}(x))} is |
| 22700 | simplified to @expr{x} if @expr{x} is known to be real. | 22694 | simplified to @expr{x} if @expr{x} is known to be real. |
| 22701 | 22695 | ||
| 22702 | Several simplifications that apply to logarithms and exponentials | 22696 | Several simplifications that apply to logarithms and exponentials |
| 22703 | are that @expr{@t{exp}(@t{ln}(x))}, | 22697 | are that @expr{@t{exp}(@t{ln}(x))}, |
| 22704 | @texline @t{e}@tmath{^{\ln(x)}}, | 22698 | @texline @t{e}@math{^{\ln(x)}}, |
| 22705 | @infoline @expr{e^@t{ln}(x)}, | 22699 | @infoline @expr{e^@t{ln}(x)}, |
| 22706 | and | 22700 | and |
| 22707 | @texline @tmath{10^{{\rm log10}(x)}} | 22701 | @texline @math{10^{{\rm log10}(x)}} |
| 22708 | @infoline @expr{10^@t{log10}(x)} | 22702 | @infoline @expr{10^@t{log10}(x)} |
| 22709 | all reduce to @expr{x}. Also, @expr{@t{ln}(@t{exp}(x))}, etc., can | 22703 | all reduce to @expr{x}. Also, @expr{@t{ln}(@t{exp}(x))}, etc., can |
| 22710 | reduce to @expr{x} if @expr{x} is provably real. The form | 22704 | reduce to @expr{x} if @expr{x} is provably real. The form |
| 22711 | @expr{@t{exp}(x)^y} is simplified to @expr{@t{exp}(x y)}. If @expr{x} | 22705 | @expr{@t{exp}(x)^y} is simplified to @expr{@t{exp}(x y)}. If @expr{x} |
| 22712 | is a suitable multiple of | 22706 | is a suitable multiple of |
| 22713 | @texline @tmath{\pi i} | 22707 | @texline @math{\pi i} |
| 22714 | @infoline @expr{pi i} | 22708 | @infoline @expr{pi i} |
| 22715 | (as described above for the trigonometric functions), then | 22709 | (as described above for the trigonometric functions), then |
| 22716 | @expr{@t{exp}(x)} or @expr{e^x} will be expanded. Finally, | 22710 | @expr{@t{exp}(x)} or @expr{e^x} will be expanded. Finally, |
| @@ -22795,18 +22789,18 @@ are folded down to the 360-degree range that the inverse trigonometric | |||
| 22795 | functions always produce. | 22789 | functions always produce. |
| 22796 | 22790 | ||
| 22797 | Powers of powers @expr{(x^a)^b} are simplified to | 22791 | Powers of powers @expr{(x^a)^b} are simplified to |
| 22798 | @texline @tmath{x^{a b}} | 22792 | @texline @math{x^{a b}} |
| 22799 | @infoline @expr{x^(a b)} | 22793 | @infoline @expr{x^(a b)} |
| 22800 | for all @expr{a} and @expr{b}. These results will be valid only | 22794 | for all @expr{a} and @expr{b}. These results will be valid only |
| 22801 | in a restricted range of @expr{x}; for example, in | 22795 | in a restricted range of @expr{x}; for example, in |
| 22802 | @texline @tmath{(x^2)^{1:2}} | 22796 | @texline @math{(x^2)^{1:2}} |
| 22803 | @infoline @expr{(x^2)^1:2} | 22797 | @infoline @expr{(x^2)^1:2} |
| 22804 | the powers cancel to get @expr{x}, which is valid for positive values | 22798 | the powers cancel to get @expr{x}, which is valid for positive values |
| 22805 | of @expr{x} but not for negative or complex values. | 22799 | of @expr{x} but not for negative or complex values. |
| 22806 | 22800 | ||
| 22807 | Similarly, @expr{@t{sqrt}(x^a)} and @expr{@t{sqrt}(x)^a} are both | 22801 | Similarly, @expr{@t{sqrt}(x^a)} and @expr{@t{sqrt}(x)^a} are both |
| 22808 | simplified (possibly unsafely) to | 22802 | simplified (possibly unsafely) to |
| 22809 | @texline @tmath{x^{a/2}}. | 22803 | @texline @math{x^{a/2}}. |
| 22810 | @infoline @expr{x^(a/2)}. | 22804 | @infoline @expr{x^(a/2)}. |
| 22811 | 22805 | ||
| 22812 | Forms like @expr{@t{sqrt}(1 - sin(x)^2)} are simplified to, e.g., | 22806 | Forms like @expr{@t{sqrt}(1 - sin(x)^2)} are simplified to, e.g., |
| @@ -22882,7 +22876,7 @@ number for an answer, then the quotient simplifies to that number. | |||
| 22882 | For powers and square roots, the ``unsafe'' simplifications | 22876 | For powers and square roots, the ``unsafe'' simplifications |
| 22883 | @expr{(a b)^c} to @expr{a^c b^c}, @expr{(a/b)^c} to @expr{a^c / b^c}, | 22877 | @expr{(a b)^c} to @expr{a^c b^c}, @expr{(a/b)^c} to @expr{a^c / b^c}, |
| 22884 | and @expr{(a^b)^c} to | 22878 | and @expr{(a^b)^c} to |
| 22885 | @texline @tmath{a^{b c}} | 22879 | @texline @math{a^{b c}} |
| 22886 | @infoline @expr{a^(b c)} | 22880 | @infoline @expr{a^(b c)} |
| 22887 | are done if the powers are real numbers. (These are safe in the context | 22881 | are done if the powers are real numbers. (These are safe in the context |
| 22888 | of units because all numbers involved can reasonably be assumed to be | 22882 | of units because all numbers involved can reasonably be assumed to be |
| @@ -22897,10 +22891,10 @@ is simplified by noting that @expr{1.5 = 3:2}, that @samp{acre} | |||
| 22897 | is defined in terms of @samp{m^2}, and that the 2 in the power of | 22891 | is defined in terms of @samp{m^2}, and that the 2 in the power of |
| 22898 | @code{m} is a multiple of 2 in @expr{3:2}. Thus, @code{acre^1.5} is | 22892 | @code{m} is a multiple of 2 in @expr{3:2}. Thus, @code{acre^1.5} is |
| 22899 | replaced by approximately | 22893 | replaced by approximately |
| 22900 | @texline @tmath{(4046 m^2)^{1.5}} | 22894 | @texline @math{(4046 m^2)^{1.5}} |
| 22901 | @infoline @expr{(4046 m^2)^1.5}, | 22895 | @infoline @expr{(4046 m^2)^1.5}, |
| 22902 | which is then changed to | 22896 | which is then changed to |
| 22903 | @texline @tmath{4046^{1.5} \, (m^2)^{1.5}}, | 22897 | @texline @math{4046^{1.5} \, (m^2)^{1.5}}, |
| 22904 | @infoline @expr{4046^1.5 (m^2)^1.5}, | 22898 | @infoline @expr{4046^1.5 (m^2)^1.5}, |
| 22905 | then to @expr{257440 m^3}. | 22899 | then to @expr{257440 m^3}. |
| 22906 | 22900 | ||
| @@ -23183,14 +23177,14 @@ With a numeric prefix argument @var{n}, this command computes the | |||
| 23183 | @var{n}th derivative. | 23177 | @var{n}th derivative. |
| 23184 | 23178 | ||
| 23185 | When working with trigonometric functions, it is best to switch to | 23179 | When working with trigonometric functions, it is best to switch to |
| 23186 | radians mode first (with @w{@kbd{m r}}). The derivative of @samp{sin(x)} | 23180 | Radians mode first (with @w{@kbd{m r}}). The derivative of @samp{sin(x)} |
| 23187 | in degrees is @samp{(pi/180) cos(x)}, probably not the expected | 23181 | in degrees is @samp{(pi/180) cos(x)}, probably not the expected |
| 23188 | answer! | 23182 | answer! |
| 23189 | 23183 | ||
| 23190 | If you use the @code{deriv} function directly in an algebraic formula, | 23184 | If you use the @code{deriv} function directly in an algebraic formula, |
| 23191 | you can write @samp{deriv(f,x,x0)} which represents the derivative | 23185 | you can write @samp{deriv(f,x,x0)} which represents the derivative |
| 23192 | of @expr{f} with respect to @expr{x}, evaluated at the point | 23186 | of @expr{f} with respect to @expr{x}, evaluated at the point |
| 23193 | @texline @tmath{x=x_0}. | 23187 | @texline @math{x=x_0}. |
| 23194 | @infoline @expr{x=x0}. | 23188 | @infoline @expr{x=x0}. |
| 23195 | 23189 | ||
| 23196 | If the formula being differentiated contains functions which Calc does | 23190 | If the formula being differentiated contains functions which Calc does |
| @@ -23230,7 +23224,7 @@ all integrable functions, but it is able to integrate several large | |||
| 23230 | classes of formulas. In particular, any polynomial or rational function | 23224 | classes of formulas. In particular, any polynomial or rational function |
| 23231 | (a polynomial divided by a polynomial) is acceptable. (Rational functions | 23225 | (a polynomial divided by a polynomial) is acceptable. (Rational functions |
| 23232 | don't have to be in explicit quotient form, however; | 23226 | don't have to be in explicit quotient form, however; |
| 23233 | @texline @tmath{x/(1+x^{-2})} | 23227 | @texline @math{x/(1+x^{-2})} |
| 23234 | @infoline @expr{x/(1+x^-2)} | 23228 | @infoline @expr{x/(1+x^-2)} |
| 23235 | is not strictly a quotient of polynomials, but it is equivalent to | 23229 | is not strictly a quotient of polynomials, but it is equivalent to |
| 23236 | @expr{x^3/(x^2+1)}, which is.) Also, square roots of terms involving | 23230 | @expr{x^3/(x^2+1)}, which is.) Also, square roots of terms involving |
| @@ -23256,7 +23250,7 @@ integral $\int_a^b f(x) \, dx$. | |||
| 23256 | Please note that the current implementation of Calc's integrator sometimes | 23250 | Please note that the current implementation of Calc's integrator sometimes |
| 23257 | produces results that are significantly more complex than they need to | 23251 | produces results that are significantly more complex than they need to |
| 23258 | be. For example, the integral Calc finds for | 23252 | be. For example, the integral Calc finds for |
| 23259 | @texline @tmath{1/(x+\sqrt{x^2+1})} | 23253 | @texline @math{1/(x+\sqrt{x^2+1})} |
| 23260 | @infoline @expr{1/(x+sqrt(x^2+1))} | 23254 | @infoline @expr{1/(x+sqrt(x^2+1))} |
| 23261 | is several times more complicated than the answer Mathematica | 23255 | is several times more complicated than the answer Mathematica |
| 23262 | returns for the same input, although the two forms are numerically | 23256 | returns for the same input, although the two forms are numerically |
| @@ -23264,17 +23258,17 @@ equivalent. Also, any indefinite integral should be considered to have | |||
| 23264 | an arbitrary constant of integration added to it, although Calc does not | 23258 | an arbitrary constant of integration added to it, although Calc does not |
| 23265 | write an explicit constant of integration in its result. For example, | 23259 | write an explicit constant of integration in its result. For example, |
| 23266 | Calc's solution for | 23260 | Calc's solution for |
| 23267 | @texline @tmath{1/(1+\tan x)} | 23261 | @texline @math{1/(1+\tan x)} |
| 23268 | @infoline @expr{1/(1+tan(x))} | 23262 | @infoline @expr{1/(1+tan(x))} |
| 23269 | differs from the solution given in the @emph{CRC Math Tables} by a | 23263 | differs from the solution given in the @emph{CRC Math Tables} by a |
| 23270 | constant factor of | 23264 | constant factor of |
| 23271 | @texline @tmath{\pi i / 2} | 23265 | @texline @math{\pi i / 2} |
| 23272 | @infoline @expr{pi i / 2}, | 23266 | @infoline @expr{pi i / 2}, |
| 23273 | due to a different choice of constant of integration. | 23267 | due to a different choice of constant of integration. |
| 23274 | 23268 | ||
| 23275 | The Calculator remembers all the integrals it has done. If conditions | 23269 | The Calculator remembers all the integrals it has done. If conditions |
| 23276 | change in a way that would invalidate the old integrals, say, a switch | 23270 | change in a way that would invalidate the old integrals, say, a switch |
| 23277 | from degrees to radians mode, then they will be thrown out. If you | 23271 | from Degrees to Radians mode, then they will be thrown out. If you |
| 23278 | suspect this is not happening when it should, use the | 23272 | suspect this is not happening when it should, use the |
| 23279 | @code{calc-flush-caches} command; @pxref{Caches}. | 23273 | @code{calc-flush-caches} command; @pxref{Caches}. |
| 23280 | 23274 | ||
| @@ -23328,7 +23322,7 @@ in your @code{IntegRules}. | |||
| 23328 | As a more serious example, the expression @samp{exp(x)/x} cannot be | 23322 | As a more serious example, the expression @samp{exp(x)/x} cannot be |
| 23329 | integrated in terms of the standard functions, so the ``exponential | 23323 | integrated in terms of the standard functions, so the ``exponential |
| 23330 | integral'' function | 23324 | integral'' function |
| 23331 | @texline @tmath{{\rm Ei}(x)} | 23325 | @texline @math{{\rm Ei}(x)} |
| 23332 | @infoline @expr{Ei(x)} | 23326 | @infoline @expr{Ei(x)} |
| 23333 | was invented to describe it. | 23327 | was invented to describe it. |
| 23334 | We can get Calc to do this integral in terms of a made-up @code{Ei} | 23328 | We can get Calc to do this integral in terms of a made-up @code{Ei} |
| @@ -23501,16 +23495,16 @@ form @expr{X = 0}. | |||
| 23501 | This command also works for inequalities, as in @expr{y < 3x + 6}. | 23495 | This command also works for inequalities, as in @expr{y < 3x + 6}. |
| 23502 | Some inequalities cannot be solved where the analogous equation could | 23496 | Some inequalities cannot be solved where the analogous equation could |
| 23503 | be; for example, solving | 23497 | be; for example, solving |
| 23504 | @texline @tmath{a < b \, c} | 23498 | @texline @math{a < b \, c} |
| 23505 | @infoline @expr{a < b c} | 23499 | @infoline @expr{a < b c} |
| 23506 | for @expr{b} is impossible | 23500 | for @expr{b} is impossible |
| 23507 | without knowing the sign of @expr{c}. In this case, @kbd{a S} will | 23501 | without knowing the sign of @expr{c}. In this case, @kbd{a S} will |
| 23508 | produce the result | 23502 | produce the result |
| 23509 | @texline @tmath{b \mathbin{\hbox{\code{!=}}} a/c} | 23503 | @texline @math{b \mathbin{\hbox{\code{!=}}} a/c} |
| 23510 | @infoline @expr{b != a/c} | 23504 | @infoline @expr{b != a/c} |
| 23511 | (using the not-equal-to operator) to signify that the direction of the | 23505 | (using the not-equal-to operator) to signify that the direction of the |
| 23512 | inequality is now unknown. The inequality | 23506 | inequality is now unknown. The inequality |
| 23513 | @texline @tmath{a \le b \, c} | 23507 | @texline @math{a \le b \, c} |
| 23514 | @infoline @expr{a <= b c} | 23508 | @infoline @expr{a <= b c} |
| 23515 | is not even partially solved. @xref{Declarations}, for a way to tell | 23509 | is not even partially solved. @xref{Declarations}, for a way to tell |
| 23516 | Calc that the signs of the variables in a formula are in fact known. | 23510 | Calc that the signs of the variables in a formula are in fact known. |
| @@ -23537,7 +23531,7 @@ Some equations have more than one solution. The Hyperbolic flag | |||
| 23537 | general family of solutions. It will invent variables @code{n1}, | 23531 | general family of solutions. It will invent variables @code{n1}, |
| 23538 | @code{n2}, @dots{}, which represent independent arbitrary integers, and | 23532 | @code{n2}, @dots{}, which represent independent arbitrary integers, and |
| 23539 | @code{s1}, @code{s2}, @dots{}, which represent independent arbitrary | 23533 | @code{s1}, @code{s2}, @dots{}, which represent independent arbitrary |
| 23540 | signs (either @i{+1} or @i{-1}). If you don't use the Hyperbolic | 23534 | signs (either @mathit{+1} or @mathit{-1}). If you don't use the Hyperbolic |
| 23541 | flag, Calc will use zero in place of all arbitrary integers, and plus | 23535 | flag, Calc will use zero in place of all arbitrary integers, and plus |
| 23542 | one in place of all arbitrary signs. Note that variables like @code{n1} | 23536 | one in place of all arbitrary signs. Note that variables like @code{n1} |
| 23543 | and @code{s1} are not given any special interpretation in Calc except by | 23537 | and @code{s1} are not given any special interpretation in Calc except by |
| @@ -23633,10 +23627,10 @@ which can be solved for @expr{x^3} using the quadratic equation, and then | |||
| 23633 | for @expr{x} by taking cube roots. But in many cases, like | 23627 | for @expr{x} by taking cube roots. But in many cases, like |
| 23634 | @expr{x^6 + x + 1}, Calc does not know how to rewrite the polynomial | 23628 | @expr{x^6 + x + 1}, Calc does not know how to rewrite the polynomial |
| 23635 | into a form it can solve. The @kbd{a P} command can still deliver a | 23629 | into a form it can solve. The @kbd{a P} command can still deliver a |
| 23636 | list of numerical roots, however, provided that symbolic mode (@kbd{m s}) | 23630 | list of numerical roots, however, provided that Symbolic mode (@kbd{m s}) |
| 23637 | is not turned on. (If you work with symbolic mode on, recall that the | 23631 | is not turned on. (If you work with Symbolic mode on, recall that the |
| 23638 | @kbd{N} (@code{calc-eval-num}) key is a handy way to reevaluate the | 23632 | @kbd{N} (@code{calc-eval-num}) key is a handy way to reevaluate the |
| 23639 | formula on the stack with symbolic mode temporarily off.) Naturally, | 23633 | formula on the stack with Symbolic mode temporarily off.) Naturally, |
| 23640 | @kbd{a P} can only provide numerical roots if the polynomial coefficients | 23634 | @kbd{a P} can only provide numerical roots if the polynomial coefficients |
| 23641 | are all numbers (real or complex). | 23635 | are all numbers (real or complex). |
| 23642 | 23636 | ||
| @@ -23970,11 +23964,11 @@ with the minimum value itself. | |||
| 23970 | 23964 | ||
| 23971 | Note that this command looks for a @emph{local} minimum. Many functions | 23965 | Note that this command looks for a @emph{local} minimum. Many functions |
| 23972 | have more than one minimum; some, like | 23966 | have more than one minimum; some, like |
| 23973 | @texline @tmath{x \sin x}, | 23967 | @texline @math{x \sin x}, |
| 23974 | @infoline @expr{x sin(x)}, | 23968 | @infoline @expr{x sin(x)}, |
| 23975 | have infinitely many. In fact, there is no easy way to define the | 23969 | have infinitely many. In fact, there is no easy way to define the |
| 23976 | ``global'' minimum of | 23970 | ``global'' minimum of |
| 23977 | @texline @tmath{x \sin x} | 23971 | @texline @math{x \sin x} |
| 23978 | @infoline @expr{x sin(x)} | 23972 | @infoline @expr{x sin(x)} |
| 23979 | but Calc can still locate any particular local minimum | 23973 | but Calc can still locate any particular local minimum |
| 23980 | for you. Calc basically goes downhill from the initial guess until it | 23974 | for you. Calc basically goes downhill from the initial guess until it |
| @@ -24097,7 +24091,7 @@ the @dfn{parameters} of the model. | |||
| 24097 | The @kbd{a F} command takes the data set to be fitted from the stack. | 24091 | The @kbd{a F} command takes the data set to be fitted from the stack. |
| 24098 | By default, it expects the data in the form of a matrix. For example, | 24092 | By default, it expects the data in the form of a matrix. For example, |
| 24099 | for a linear or polynomial fit, this would be a | 24093 | for a linear or polynomial fit, this would be a |
| 24100 | @texline @tmath{2\times N} | 24094 | @texline @math{2\times N} |
| 24101 | @infoline 2xN | 24095 | @infoline 2xN |
| 24102 | matrix where the first row is a list of @expr{x} values and the second | 24096 | matrix where the first row is a list of @expr{x} values and the second |
| 24103 | row has the corresponding @expr{y} values. For the multilinear fit | 24097 | row has the corresponding @expr{y} values. For the multilinear fit |
| @@ -24105,10 +24099,10 @@ shown above, the matrix would have four rows (@expr{x_1}, @expr{x_2}, | |||
| 24105 | @expr{x_3}, and @expr{y}, respectively). | 24099 | @expr{x_3}, and @expr{y}, respectively). |
| 24106 | 24100 | ||
| 24107 | If you happen to have an | 24101 | If you happen to have an |
| 24108 | @texline @tmath{N\times2} | 24102 | @texline @math{N\times2} |
| 24109 | @infoline Nx2 | 24103 | @infoline Nx2 |
| 24110 | matrix instead of a | 24104 | matrix instead of a |
| 24111 | @texline @tmath{2\times N} | 24105 | @texline @math{2\times N} |
| 24112 | @infoline 2xN | 24106 | @infoline 2xN |
| 24113 | matrix, just press @kbd{v t} first to transpose the matrix. | 24107 | matrix, just press @kbd{v t} first to transpose the matrix. |
| 24114 | 24108 | ||
| @@ -24206,11 +24200,11 @@ which is clearly zero if @expr{a + b x} exactly fits all data points, | |||
| 24206 | and increases as various @expr{a + b x_i} values fail to match the | 24200 | and increases as various @expr{a + b x_i} values fail to match the |
| 24207 | corresponding @expr{y_i} values. There are several reasons why the | 24201 | corresponding @expr{y_i} values. There are several reasons why the |
| 24208 | summand is squared, one of them being to ensure that | 24202 | summand is squared, one of them being to ensure that |
| 24209 | @texline @tmath{\chi^2 \ge 0}. | 24203 | @texline @math{\chi^2 \ge 0}. |
| 24210 | @infoline @expr{chi^2 >= 0}. | 24204 | @infoline @expr{chi^2 >= 0}. |
| 24211 | Least-squares fitting simply chooses the values of @expr{a} and @expr{b} | 24205 | Least-squares fitting simply chooses the values of @expr{a} and @expr{b} |
| 24212 | for which the error | 24206 | for which the error |
| 24213 | @texline @tmath{\chi^2} | 24207 | @texline @math{\chi^2} |
| 24214 | @infoline @expr{chi^2} | 24208 | @infoline @expr{chi^2} |
| 24215 | is as small as possible. | 24209 | is as small as possible. |
| 24216 | 24210 | ||
| @@ -24251,9 +24245,9 @@ Note that since the constant and linear terms are enough to fit the | |||
| 24251 | data exactly, it's no surprise that Calc chose a tiny contribution | 24245 | data exactly, it's no surprise that Calc chose a tiny contribution |
| 24252 | for @expr{x^2}. (The fact that it's not exactly zero is due only | 24246 | for @expr{x^2}. (The fact that it's not exactly zero is due only |
| 24253 | to roundoff error. Since our data are exact integers, we could get | 24247 | to roundoff error. Since our data are exact integers, we could get |
| 24254 | an exact answer by typing @kbd{m f} first to get fraction mode. | 24248 | an exact answer by typing @kbd{m f} first to get Fraction mode. |
| 24255 | Then the @expr{x^2} term would vanish altogether. Usually, though, | 24249 | Then the @expr{x^2} term would vanish altogether. Usually, though, |
| 24256 | the data being fitted will be approximate floats so fraction mode | 24250 | the data being fitted will be approximate floats so Fraction mode |
| 24257 | won't help.) | 24251 | won't help.) |
| 24258 | 24252 | ||
| 24259 | Doing the @kbd{a F 2} fit on the data set with 14 instead of 13 | 24253 | Doing the @kbd{a F 2} fit on the data set with 14 instead of 13 |
| @@ -24266,7 +24260,7 @@ line slightly to improve the fit. | |||
| 24266 | 24260 | ||
| 24267 | An important result from the theory of polynomial fitting is that it | 24261 | An important result from the theory of polynomial fitting is that it |
| 24268 | is always possible to fit @var{n} data points exactly using a polynomial | 24262 | is always possible to fit @var{n} data points exactly using a polynomial |
| 24269 | of degree @i{@var{n}-1}, sometimes called an @dfn{interpolating polynomial}. | 24263 | of degree @mathit{@var{n}-1}, sometimes called an @dfn{interpolating polynomial}. |
| 24270 | Using the modified (14) data matrix, a model number of 4 gives | 24264 | Using the modified (14) data matrix, a model number of 4 gives |
| 24271 | a polynomial that exactly matches all five data points: | 24265 | a polynomial that exactly matches all five data points: |
| 24272 | 24266 | ||
| @@ -24278,7 +24272,7 @@ The actual coefficients we get with a precision of 12, like | |||
| 24278 | @expr{0.0416666663588}, clearly suffer from loss of precision. | 24272 | @expr{0.0416666663588}, clearly suffer from loss of precision. |
| 24279 | It is a good idea to increase the working precision to several | 24273 | It is a good idea to increase the working precision to several |
| 24280 | digits beyond what you need when you do a fitting operation. | 24274 | digits beyond what you need when you do a fitting operation. |
| 24281 | Or, if your data are exact, use fraction mode to get exact | 24275 | Or, if your data are exact, use Fraction mode to get exact |
| 24282 | results. | 24276 | results. |
| 24283 | 24277 | ||
| 24284 | You can type @kbd{i} instead of a digit at the model prompt to fit | 24278 | You can type @kbd{i} instead of a digit at the model prompt to fit |
| @@ -24371,10 +24365,10 @@ contain error forms. The data values must either all include errors | |||
| 24371 | or all be plain numbers. Error forms can go anywhere but generally | 24365 | or all be plain numbers. Error forms can go anywhere but generally |
| 24372 | go on the numbers in the last row of the data matrix. If the last | 24366 | go on the numbers in the last row of the data matrix. If the last |
| 24373 | row contains error forms | 24367 | row contains error forms |
| 24374 | @texline `@var{y_i}@w{ @t{+/-} }@tmath{\sigma_i}', | 24368 | @texline `@var{y_i}@w{ @t{+/-} }@math{\sigma_i}', |
| 24375 | @infoline `@var{y_i}@w{ @t{+/-} }@var{sigma_i}', | 24369 | @infoline `@var{y_i}@w{ @t{+/-} }@var{sigma_i}', |
| 24376 | then the | 24370 | then the |
| 24377 | @texline @tmath{\chi^2} | 24371 | @texline @math{\chi^2} |
| 24378 | @infoline @expr{chi^2} | 24372 | @infoline @expr{chi^2} |
| 24379 | statistic is now, | 24373 | statistic is now, |
| 24380 | 24374 | ||
| @@ -24397,7 +24391,7 @@ the fitting operation. | |||
| 24397 | If there are error forms on other rows of the data matrix, all the | 24391 | If there are error forms on other rows of the data matrix, all the |
| 24398 | errors for a given data point are combined; the square root of the | 24392 | errors for a given data point are combined; the square root of the |
| 24399 | sum of the squares of the errors forms the | 24393 | sum of the squares of the errors forms the |
| 24400 | @texline @tmath{\sigma_i} | 24394 | @texline @math{\sigma_i} |
| 24401 | @infoline @expr{sigma_i} | 24395 | @infoline @expr{sigma_i} |
| 24402 | used for the data point. | 24396 | used for the data point. |
| 24403 | 24397 | ||
| @@ -24407,14 +24401,14 @@ probably use @kbd{H a F} so that the output also contains error | |||
| 24407 | estimates. | 24401 | estimates. |
| 24408 | 24402 | ||
| 24409 | If the input contains error forms but all the | 24403 | If the input contains error forms but all the |
| 24410 | @texline @tmath{\sigma_i} | 24404 | @texline @math{\sigma_i} |
| 24411 | @infoline @expr{sigma_i} | 24405 | @infoline @expr{sigma_i} |
| 24412 | values are the same, it is easy to see that the resulting fitted model | 24406 | values are the same, it is easy to see that the resulting fitted model |
| 24413 | will be the same as if the input did not have error forms at all | 24407 | will be the same as if the input did not have error forms at all |
| 24414 | @texline (@tmath{\chi^2} | 24408 | @texline (@math{\chi^2} |
| 24415 | @infoline (@expr{chi^2} | 24409 | @infoline (@expr{chi^2} |
| 24416 | is simply scaled uniformly by | 24410 | is simply scaled uniformly by |
| 24417 | @texline @tmath{1 / \sigma^2}, | 24411 | @texline @math{1 / \sigma^2}, |
| 24418 | @infoline @expr{1 / sigma^2}, | 24412 | @infoline @expr{1 / sigma^2}, |
| 24419 | which doesn't affect where it has a minimum). But there @emph{will} be | 24413 | which doesn't affect where it has a minimum). But there @emph{will} be |
| 24420 | a difference in the estimated errors of the coefficients reported by | 24414 | a difference in the estimated errors of the coefficients reported by |
| @@ -24449,20 +24443,20 @@ will have length @expr{M = d+1} with the constant term first. | |||
| 24449 | @item | 24443 | @item |
| 24450 | The covariance matrix @expr{C} computed from the fit. This is | 24444 | The covariance matrix @expr{C} computed from the fit. This is |
| 24451 | an @var{m}x@var{m} symmetric matrix; the diagonal elements | 24445 | an @var{m}x@var{m} symmetric matrix; the diagonal elements |
| 24452 | @texline @tmath{C_{jj}} | 24446 | @texline @math{C_{jj}} |
| 24453 | @infoline @expr{C_j_j} | 24447 | @infoline @expr{C_j_j} |
| 24454 | are the variances | 24448 | are the variances |
| 24455 | @texline @tmath{\sigma_j^2} | 24449 | @texline @math{\sigma_j^2} |
| 24456 | @infoline @expr{sigma_j^2} | 24450 | @infoline @expr{sigma_j^2} |
| 24457 | of the parameters. The other elements are covariances | 24451 | of the parameters. The other elements are covariances |
| 24458 | @texline @tmath{\sigma_{ij}^2} | 24452 | @texline @math{\sigma_{ij}^2} |
| 24459 | @infoline @expr{sigma_i_j^2} | 24453 | @infoline @expr{sigma_i_j^2} |
| 24460 | that describe the correlation between pairs of parameters. (A related | 24454 | that describe the correlation between pairs of parameters. (A related |
| 24461 | set of numbers, the @dfn{linear correlation coefficients} | 24455 | set of numbers, the @dfn{linear correlation coefficients} |
| 24462 | @texline @tmath{r_{ij}}, | 24456 | @texline @math{r_{ij}}, |
| 24463 | @infoline @expr{r_i_j}, | 24457 | @infoline @expr{r_i_j}, |
| 24464 | are defined as | 24458 | are defined as |
| 24465 | @texline @tmath{\sigma_{ij}^2 / \sigma_i \, \sigma_j}.) | 24459 | @texline @math{\sigma_{ij}^2 / \sigma_i \, \sigma_j}.) |
| 24466 | @infoline @expr{sigma_i_j^2 / sigma_i sigma_j}.) | 24460 | @infoline @expr{sigma_i_j^2 / sigma_i sigma_j}.) |
| 24467 | 24461 | ||
| 24468 | @item | 24462 | @item |
| @@ -24473,11 +24467,11 @@ polynomial and multilinear fits described so far. | |||
| 24473 | 24467 | ||
| 24474 | @item | 24468 | @item |
| 24475 | The value of | 24469 | The value of |
| 24476 | @texline @tmath{\chi^2} | 24470 | @texline @math{\chi^2} |
| 24477 | @infoline @expr{chi^2} | 24471 | @infoline @expr{chi^2} |
| 24478 | for the fit, calculated by the formulas shown above. This gives a | 24472 | for the fit, calculated by the formulas shown above. This gives a |
| 24479 | measure of the quality of the fit; statisticians consider | 24473 | measure of the quality of the fit; statisticians consider |
| 24480 | @texline @tmath{\chi^2 \approx N - M} | 24474 | @texline @math{\chi^2 \approx N - M} |
| 24481 | @infoline @expr{chi^2 = N - M} | 24475 | @infoline @expr{chi^2 = N - M} |
| 24482 | to indicate a moderately good fit (where again @expr{N} is the number of | 24476 | to indicate a moderately good fit (where again @expr{N} is the number of |
| 24483 | data points and @expr{M} is the number of parameters). | 24477 | data points and @expr{M} is the number of parameters). |
| @@ -24486,13 +24480,13 @@ data points and @expr{M} is the number of parameters). | |||
| 24486 | A measure of goodness of fit expressed as a probability @expr{Q}. | 24480 | A measure of goodness of fit expressed as a probability @expr{Q}. |
| 24487 | This is computed from the @code{utpc} probability distribution | 24481 | This is computed from the @code{utpc} probability distribution |
| 24488 | function using | 24482 | function using |
| 24489 | @texline @tmath{\chi^2} | 24483 | @texline @math{\chi^2} |
| 24490 | @infoline @expr{chi^2} | 24484 | @infoline @expr{chi^2} |
| 24491 | with @expr{N - M} degrees of freedom. A | 24485 | with @expr{N - M} degrees of freedom. A |
| 24492 | value of 0.5 implies a good fit; some texts recommend that often | 24486 | value of 0.5 implies a good fit; some texts recommend that often |
| 24493 | @expr{Q = 0.1} or even 0.001 can signify an acceptable fit. In | 24487 | @expr{Q = 0.1} or even 0.001 can signify an acceptable fit. In |
| 24494 | particular, | 24488 | particular, |
| 24495 | @texline @tmath{\chi^2} | 24489 | @texline @math{\chi^2} |
| 24496 | @infoline @expr{chi^2} | 24490 | @infoline @expr{chi^2} |
| 24497 | statistics assume the errors in your inputs | 24491 | statistics assume the errors in your inputs |
| 24498 | follow a normal (Gaussian) distribution; if they don't, you may | 24492 | follow a normal (Gaussian) distribution; if they don't, you may |
| @@ -24501,7 +24495,7 @@ have to accept smaller values of @expr{Q}. | |||
| 24501 | The @expr{Q} value is computed only if the input included error | 24495 | The @expr{Q} value is computed only if the input included error |
| 24502 | estimates. Otherwise, Calc will report the symbol @code{nan} | 24496 | estimates. Otherwise, Calc will report the symbol @code{nan} |
| 24503 | for @expr{Q}. The reason is that in this case the | 24497 | for @expr{Q}. The reason is that in this case the |
| 24504 | @texline @tmath{\chi^2} | 24498 | @texline @math{\chi^2} |
| 24505 | @infoline @expr{chi^2} | 24499 | @infoline @expr{chi^2} |
| 24506 | value has effectively been used to estimate the original errors | 24500 | value has effectively been used to estimate the original errors |
| 24507 | in the input, and thus there is no redundant information left | 24501 | in the input, and thus there is no redundant information left |
| @@ -24520,31 +24514,31 @@ Here is a complete list of the standard models recognized by @kbd{a F}: | |||
| 24520 | 24514 | ||
| 24521 | @table @kbd | 24515 | @table @kbd |
| 24522 | @item 1 | 24516 | @item 1 |
| 24523 | Linear or multilinear. @i{a + b x + c y + d z}. | 24517 | Linear or multilinear. @mathit{a + b x + c y + d z}. |
| 24524 | @item 2-9 | 24518 | @item 2-9 |
| 24525 | Polynomials. @i{a + b x + c x^2 + d x^3}. | 24519 | Polynomials. @mathit{a + b x + c x^2 + d x^3}. |
| 24526 | @item e | 24520 | @item e |
| 24527 | Exponential. @i{a} @t{exp}@i{(b x)} @t{exp}@i{(c y)}. | 24521 | Exponential. @mathit{a} @t{exp}@mathit{(b x)} @t{exp}@mathit{(c y)}. |
| 24528 | @item E | 24522 | @item E |
| 24529 | Base-10 exponential. @i{a} @t{10^}@i{(b x)} @t{10^}@i{(c y)}. | 24523 | Base-10 exponential. @mathit{a} @t{10^}@mathit{(b x)} @t{10^}@mathit{(c y)}. |
| 24530 | @item x | 24524 | @item x |
| 24531 | Exponential (alternate notation). @t{exp}@i{(a + b x + c y)}. | 24525 | Exponential (alternate notation). @t{exp}@mathit{(a + b x + c y)}. |
| 24532 | @item X | 24526 | @item X |
| 24533 | Base-10 exponential (alternate). @t{10^}@i{(a + b x + c y)}. | 24527 | Base-10 exponential (alternate). @t{10^}@mathit{(a + b x + c y)}. |
| 24534 | @item l | 24528 | @item l |
| 24535 | Logarithmic. @i{a + b} @t{ln}@i{(x) + c} @t{ln}@i{(y)}. | 24529 | Logarithmic. @mathit{a + b} @t{ln}@mathit{(x) + c} @t{ln}@mathit{(y)}. |
| 24536 | @item L | 24530 | @item L |
| 24537 | Base-10 logarithmic. @i{a + b} @t{log10}@i{(x) + c} @t{log10}@i{(y)}. | 24531 | Base-10 logarithmic. @mathit{a + b} @t{log10}@mathit{(x) + c} @t{log10}@mathit{(y)}. |
| 24538 | @item ^ | 24532 | @item ^ |
| 24539 | General exponential. @i{a b^x c^y}. | 24533 | General exponential. @mathit{a b^x c^y}. |
| 24540 | @item p | 24534 | @item p |
| 24541 | Power law. @i{a x^b y^c}. | 24535 | Power law. @mathit{a x^b y^c}. |
| 24542 | @item q | 24536 | @item q |
| 24543 | Quadratic. @i{a + b (x-c)^2 + d (x-e)^2}. | 24537 | Quadratic. @mathit{a + b (x-c)^2 + d (x-e)^2}. |
| 24544 | @item g | 24538 | @item g |
| 24545 | Gaussian. | 24539 | Gaussian. |
| 24546 | @texline @tmath{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. | 24540 | @texline @math{{a \over b \sqrt{2 \pi}} \exp\left( -{1 \over 2} \left( x - c \over b \right)^2 \right)}. |
| 24547 | @infoline @i{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. | 24541 | @infoline @mathit{(a / b sqrt(2 pi)) exp(-0.5*((x-c)/b)^2)}. |
| 24548 | @end table | 24542 | @end table |
| 24549 | 24543 | ||
| 24550 | All of these models are used in the usual way; just press the appropriate | 24544 | All of these models are used in the usual way; just press the appropriate |
| @@ -24656,18 +24650,18 @@ Calc uses the principal values of inverse functions like @code{ln} | |||
| 24656 | and @code{arcsin} when doing fits. For example, when you enter | 24650 | and @code{arcsin} when doing fits. For example, when you enter |
| 24657 | the model @samp{y = sin(a t + b)} Calc actually uses the easier | 24651 | the model @samp{y = sin(a t + b)} Calc actually uses the easier |
| 24658 | form @samp{arcsin(y) = a t + b}. The @code{arcsin} function always | 24652 | form @samp{arcsin(y) = a t + b}. The @code{arcsin} function always |
| 24659 | returns results in the range from @i{-90} to 90 degrees (or the | 24653 | returns results in the range from @mathit{-90} to 90 degrees (or the |
| 24660 | equivalent range in radians). Suppose you had data that you | 24654 | equivalent range in radians). Suppose you had data that you |
| 24661 | believed to represent roughly three oscillations of a sine wave, | 24655 | believed to represent roughly three oscillations of a sine wave, |
| 24662 | so that the argument of the sine might go from zero to | 24656 | so that the argument of the sine might go from zero to |
| 24663 | @texline @tmath{3\times360} | 24657 | @texline @math{3\times360} |
| 24664 | @infoline @i{3*360} | 24658 | @infoline @mathit{3*360} |
| 24665 | degrees. | 24659 | degrees. |
| 24666 | The above model would appear to be a good way to determine the | 24660 | The above model would appear to be a good way to determine the |
| 24667 | true frequency and phase of the sine wave, but in practice it | 24661 | true frequency and phase of the sine wave, but in practice it |
| 24668 | would fail utterly. The righthand side of the actual model | 24662 | would fail utterly. The righthand side of the actual model |
| 24669 | @samp{arcsin(y) = a t + b} will grow smoothly with @expr{t}, but | 24663 | @samp{arcsin(y) = a t + b} will grow smoothly with @expr{t}, but |
| 24670 | the lefthand side will bounce back and forth between @i{-90} and 90. | 24664 | the lefthand side will bounce back and forth between @mathit{-90} and 90. |
| 24671 | No values of @expr{a} and @expr{b} can make the two sides match, | 24665 | No values of @expr{a} and @expr{b} can make the two sides match, |
| 24672 | even approximately. | 24666 | even approximately. |
| 24673 | 24667 | ||
| @@ -24722,16 +24716,16 @@ ln(y) = ln(a) + b ln(x) | |||
| 24722 | 24716 | ||
| 24723 | @noindent | 24717 | @noindent |
| 24724 | which matches the desired form with | 24718 | which matches the desired form with |
| 24725 | @texline @tmath{Y = \ln(y)}, | 24719 | @texline @math{Y = \ln(y)}, |
| 24726 | @infoline @expr{Y = ln(y)}, | 24720 | @infoline @expr{Y = ln(y)}, |
| 24727 | @texline @tmath{A = \ln(a)}, | 24721 | @texline @math{A = \ln(a)}, |
| 24728 | @infoline @expr{A = ln(a)}, | 24722 | @infoline @expr{A = ln(a)}, |
| 24729 | @expr{F = 1}, @expr{B = b}, and | 24723 | @expr{F = 1}, @expr{B = b}, and |
| 24730 | @texline @tmath{G = \ln(x)}. | 24724 | @texline @math{G = \ln(x)}. |
| 24731 | @infoline @expr{G = ln(x)}. | 24725 | @infoline @expr{G = ln(x)}. |
| 24732 | Calc thus computes the logarithms of your @expr{y} and @expr{x} values, | 24726 | Calc thus computes the logarithms of your @expr{y} and @expr{x} values, |
| 24733 | does a linear fit for @expr{A} and @expr{B}, then solves to get | 24727 | does a linear fit for @expr{A} and @expr{B}, then solves to get |
| 24734 | @texline @tmath{a = \exp(A)} | 24728 | @texline @math{a = \exp(A)} |
| 24735 | @infoline @expr{a = exp(A)} | 24729 | @infoline @expr{a = exp(A)} |
| 24736 | and @expr{b = B}. | 24730 | and @expr{b = B}. |
| 24737 | 24731 | ||
| @@ -24745,7 +24739,7 @@ y = a + b c^2 - 2 b c x + b x^2 | |||
| 24745 | 24739 | ||
| 24746 | @noindent | 24740 | @noindent |
| 24747 | which matches with @expr{Y = y}, @expr{A = a + b c^2}, @expr{F = 1}, | 24741 | which matches with @expr{Y = y}, @expr{A = a + b c^2}, @expr{F = 1}, |
| 24748 | @expr{B = -2 b c}, @expr{G = x} (the @i{-2} factor could just as easily | 24742 | @expr{B = -2 b c}, @expr{G = x} (the @mathit{-2} factor could just as easily |
| 24749 | have been put into @expr{G} instead of @expr{B}), @expr{C = b}, and | 24743 | have been put into @expr{G} instead of @expr{B}), @expr{C = b}, and |
| 24750 | @expr{H = x^2}. | 24744 | @expr{H = x^2}. |
| 24751 | 24745 | ||
| @@ -24777,7 +24771,7 @@ from the list of parameters when you answer the variables prompt. | |||
| 24777 | A last desperate step would be to use the general-purpose | 24771 | A last desperate step would be to use the general-purpose |
| 24778 | @code{minimize} function rather than @code{fit}. After all, both | 24772 | @code{minimize} function rather than @code{fit}. After all, both |
| 24779 | functions solve the problem of minimizing an expression (the | 24773 | functions solve the problem of minimizing an expression (the |
| 24780 | @texline @tmath{\chi^2} | 24774 | @texline @math{\chi^2} |
| 24781 | @infoline @expr{chi^2} | 24775 | @infoline @expr{chi^2} |
| 24782 | sum) by adjusting certain parameters in the expression. The @kbd{a F} | 24776 | sum) by adjusting certain parameters in the expression. The @kbd{a F} |
| 24783 | command is able to use a vastly more efficient algorithm due to its | 24777 | command is able to use a vastly more efficient algorithm due to its |
| @@ -24788,7 +24782,7 @@ A compromise would be to pick out a few parameters without which the | |||
| 24788 | fit is linearizable, and use @code{minimize} on a call to @code{fit} | 24782 | fit is linearizable, and use @code{minimize} on a call to @code{fit} |
| 24789 | which efficiently takes care of the rest of the parameters. The thing | 24783 | which efficiently takes care of the rest of the parameters. The thing |
| 24790 | to be minimized would be the value of | 24784 | to be minimized would be the value of |
| 24791 | @texline @tmath{\chi^2} | 24785 | @texline @math{\chi^2} |
| 24792 | @infoline @expr{chi^2} | 24786 | @infoline @expr{chi^2} |
| 24793 | returned as the fifth result of the @code{xfit} function: | 24787 | returned as the fifth result of the @code{xfit} function: |
| 24794 | 24788 | ||
| @@ -24848,11 +24842,11 @@ and @expr{y} to be plain numbers, and makes @expr{z} into an error | |||
| 24848 | form with this combined error. The @expr{Y(x,y,z)} part of the | 24842 | form with this combined error. The @expr{Y(x,y,z)} part of the |
| 24849 | linearized model is evaluated, and the result should be an error | 24843 | linearized model is evaluated, and the result should be an error |
| 24850 | form. The error part of that result is used for | 24844 | form. The error part of that result is used for |
| 24851 | @texline @tmath{\sigma_i} | 24845 | @texline @math{\sigma_i} |
| 24852 | @infoline @expr{sigma_i} | 24846 | @infoline @expr{sigma_i} |
| 24853 | for the data point. If for some reason @expr{Y(x,y,z)} does not return | 24847 | for the data point. If for some reason @expr{Y(x,y,z)} does not return |
| 24854 | an error form, the combined error from @expr{z} is used directly for | 24848 | an error form, the combined error from @expr{z} is used directly for |
| 24855 | @texline @tmath{\sigma_i}. | 24849 | @texline @math{\sigma_i}. |
| 24856 | @infoline @expr{sigma_i}. | 24850 | @infoline @expr{sigma_i}. |
| 24857 | Finally, @expr{z} is also stripped of its error | 24851 | Finally, @expr{z} is also stripped of its error |
| 24858 | for use in computing @expr{F(x,y,z)}, @expr{G(x,y,z)} and so on; | 24852 | for use in computing @expr{F(x,y,z)}, @expr{G(x,y,z)} and so on; |
| @@ -24864,7 +24858,7 @@ the most reasonable thing in the typical case that @expr{Y(x,y,z)} | |||
| 24864 | depends only on the dependent variable @expr{z}, and in fact is | 24858 | depends only on the dependent variable @expr{z}, and in fact is |
| 24865 | often simply equal to @expr{z}. For common cases like polynomials | 24859 | often simply equal to @expr{z}. For common cases like polynomials |
| 24866 | and multilinear models, the combined error is simply used as the | 24860 | and multilinear models, the combined error is simply used as the |
| 24867 | @texline @tmath{\sigma} | 24861 | @texline @math{\sigma} |
| 24868 | @infoline @expr{sigma} | 24862 | @infoline @expr{sigma} |
| 24869 | for the data point with no further ado.) | 24863 | for the data point with no further ado.) |
| 24870 | 24864 | ||
| @@ -25218,7 +25212,7 @@ If the lower limit is greater than the upper limit (assuming a | |||
| 25218 | positive step size), the result is generally zero. However, | 25212 | positive step size), the result is generally zero. However, |
| 25219 | Calc only guarantees a zero result when the upper limit is | 25213 | Calc only guarantees a zero result when the upper limit is |
| 25220 | exactly one step less than the lower limit, i.e., if the number | 25214 | exactly one step less than the lower limit, i.e., if the number |
| 25221 | of iterations is @i{-1}. Thus @samp{sum(f(k), k, n, n-1)} is zero | 25215 | of iterations is @mathit{-1}. Thus @samp{sum(f(k), k, n, n-1)} is zero |
| 25222 | but the sum from @samp{n} to @samp{n-2} may report a nonzero value | 25216 | but the sum from @samp{n} to @samp{n-2} may report a nonzero value |
| 25223 | if Calc used a closed form solution. | 25217 | if Calc used a closed form solution. |
| 25224 | 25218 | ||
| @@ -25244,7 +25238,7 @@ formula works out to the indeterminate form @expr{0 / 0}, which | |||
| 25244 | Calc will not assume is zero. Better would be to use | 25238 | Calc will not assume is zero. Better would be to use |
| 25245 | @samp{(k != k_0) ? 1/(k-k_0) : 0}; the @samp{? :} operator does | 25239 | @samp{(k != k_0) ? 1/(k-k_0) : 0}; the @samp{? :} operator does |
| 25246 | an ``if-then-else'' test: This expression says, ``if | 25240 | an ``if-then-else'' test: This expression says, ``if |
| 25247 | @texline @tmath{k \ne k_0}, | 25241 | @texline @math{k \ne k_0}, |
| 25248 | @infoline @expr{k != k_0}, | 25242 | @infoline @expr{k != k_0}, |
| 25249 | then @expr{1/(k-k_0)}, else zero.'' Now the formula @expr{1/(k-k_0)} | 25243 | then @expr{1/(k-k_0)}, else zero.'' Now the formula @expr{1/(k-k_0)} |
| 25250 | will not even be evaluated by Calc when @expr{k = k_0}. | 25244 | will not even be evaluated by Calc when @expr{k = k_0}. |
| @@ -25949,12 +25943,12 @@ like @samp{(x + y) + (z - w)}, are not tried. | |||
| 25949 | 25943 | ||
| 25950 | Note that @samp{*} is not commutative when applied to matrices, but | 25944 | Note that @samp{*} is not commutative when applied to matrices, but |
| 25951 | rewrite rules pretend that it is. If you type @kbd{m v} to enable | 25945 | rewrite rules pretend that it is. If you type @kbd{m v} to enable |
| 25952 | matrix mode (@pxref{Matrix Mode}), rewrite rules will match @samp{*} | 25946 | Matrix mode (@pxref{Matrix Mode}), rewrite rules will match @samp{*} |
| 25953 | literally, ignoring its usual commutativity property. (In the | 25947 | literally, ignoring its usual commutativity property. (In the |
| 25954 | current implementation, the associativity also vanishes---it is as | 25948 | current implementation, the associativity also vanishes---it is as |
| 25955 | if the pattern had been enclosed in a @code{plain} marker; see below.) | 25949 | if the pattern had been enclosed in a @code{plain} marker; see below.) |
| 25956 | If you are applying rewrites to formulas with matrices, it's best to | 25950 | If you are applying rewrites to formulas with matrices, it's best to |
| 25957 | enable matrix mode first to prevent algebraically incorrect rewrites | 25951 | enable Matrix mode first to prevent algebraically incorrect rewrites |
| 25958 | from occurring. | 25952 | from occurring. |
| 25959 | 25953 | ||
| 25960 | The pattern @samp{-x} will actually match any expression. For example, | 25954 | The pattern @samp{-x} will actually match any expression. For example, |
| @@ -26259,16 +26253,16 @@ then the rule set @samp{[f(0) := 0, import(linearF)]} will apply | |||
| 26259 | all three rules. It is possible to modify the imported rules | 26253 | all three rules. It is possible to modify the imported rules |
| 26260 | slightly: @samp{import(x, v1, x1, v2, x2, @dots{})} imports | 26254 | slightly: @samp{import(x, v1, x1, v2, x2, @dots{})} imports |
| 26261 | the rule set @expr{x} with all occurrences of | 26255 | the rule set @expr{x} with all occurrences of |
| 26262 | @texline @tmath{v_1}, | 26256 | @texline @math{v_1}, |
| 26263 | @infoline @expr{v1}, | 26257 | @infoline @expr{v1}, |
| 26264 | as either a variable name or a function name, replaced with | 26258 | as either a variable name or a function name, replaced with |
| 26265 | @texline @tmath{x_1} | 26259 | @texline @math{x_1} |
| 26266 | @infoline @expr{x1} | 26260 | @infoline @expr{x1} |
| 26267 | and so on. (If | 26261 | and so on. (If |
| 26268 | @texline @tmath{v_1} | 26262 | @texline @math{v_1} |
| 26269 | @infoline @expr{v1} | 26263 | @infoline @expr{v1} |
| 26270 | is used as a function name, then | 26264 | is used as a function name, then |
| 26271 | @texline @tmath{x_1} | 26265 | @texline @math{x_1} |
| 26272 | @infoline @expr{x1} | 26266 | @infoline @expr{x1} |
| 26273 | must be either a function name itself or a @w{@samp{< >}} nameless | 26267 | must be either a function name itself or a @w{@samp{< >}} nameless |
| 26274 | function; @pxref{Specifying Operators}.) For example, @samp{[g(0) := 0, | 26268 | function; @pxref{Specifying Operators}.) For example, @samp{[g(0) := 0, |
| @@ -26431,8 +26425,8 @@ You must use @code{apply} for meta-variables with function names | |||
| 26431 | on both sides of a rewrite rule: @samp{apply(f, [x]) := f(x+1)} | 26425 | on both sides of a rewrite rule: @samp{apply(f, [x]) := f(x+1)} |
| 26432 | is @emph{not} correct, because it rewrites @samp{spam(6)} into | 26426 | is @emph{not} correct, because it rewrites @samp{spam(6)} into |
| 26433 | @samp{f(7)}. The righthand side should be @samp{apply(f, [x+1])}. | 26427 | @samp{f(7)}. The righthand side should be @samp{apply(f, [x+1])}. |
| 26434 | Also note that you will have to use no-simplify (@kbd{m O}) | 26428 | Also note that you will have to use No-Simplify mode (@kbd{m O}) |
| 26435 | mode when entering this rule so that the @code{apply} isn't | 26429 | when entering this rule so that the @code{apply} isn't |
| 26436 | evaluated immediately to get the new rule @samp{f(x) := f(x+1)}. | 26430 | evaluated immediately to get the new rule @samp{f(x) := f(x+1)}. |
| 26437 | Or, use @kbd{s e} to enter the rule without going through the stack, | 26431 | Or, use @kbd{s e} to enter the rule without going through the stack, |
| 26438 | or enter the rule as @samp{apply(f, [x]) := apply(f, [x+1]) @w{:: 1}}. | 26432 | or enter the rule as @samp{apply(f, [x]) := apply(f, [x+1]) @w{:: 1}}. |
| @@ -27167,7 +27161,7 @@ To apply these manually, you could put them in a variable called | |||
| 27167 | to expand trig functions. But if instead you store them in the | 27161 | to expand trig functions. But if instead you store them in the |
| 27168 | variable @code{EvalRules}, they will automatically be applied to all | 27162 | variable @code{EvalRules}, they will automatically be applied to all |
| 27169 | sines and cosines of sums. Then, with @samp{2 x} and @samp{45} on | 27163 | sines and cosines of sums. Then, with @samp{2 x} and @samp{45} on |
| 27170 | the stack, typing @kbd{+ S} will (assuming degrees mode) result in | 27164 | the stack, typing @kbd{+ S} will (assuming Degrees mode) result in |
| 27171 | @samp{0.7071 sin(2 x) + 0.7071 cos(2 x)} automatically. | 27165 | @samp{0.7071 sin(2 x) + 0.7071 cos(2 x)} automatically. |
| 27172 | 27166 | ||
| 27173 | As each level of a formula is evaluated, the rules from | 27167 | As each level of a formula is evaluated, the rules from |
| @@ -27243,11 +27237,11 @@ number @expr{(2, 3)}, Calc computes @samp{sqrt(2*2 + 3*3)} by calling | |||
| 27243 | the multiplication, addition, and square root functions directly rather | 27237 | the multiplication, addition, and square root functions directly rather |
| 27244 | than applying the default simplifications to this formula. So an | 27238 | than applying the default simplifications to this formula. So an |
| 27245 | @code{EvalRules} rule that (perversely) rewrites @samp{sqrt(13) := 6} | 27239 | @code{EvalRules} rule that (perversely) rewrites @samp{sqrt(13) := 6} |
| 27246 | would not apply. (However, if you put Calc into symbolic mode so that | 27240 | would not apply. (However, if you put Calc into Symbolic mode so that |
| 27247 | @samp{sqrt(13)} will be left in symbolic form by the built-in square | 27241 | @samp{sqrt(13)} will be left in symbolic form by the built-in square |
| 27248 | root function, your rule will be able to apply. But if the complex | 27242 | root function, your rule will be able to apply. But if the complex |
| 27249 | number were @expr{(3,4)}, so that @samp{sqrt(25)} must be calculated, | 27243 | number were @expr{(3,4)}, so that @samp{sqrt(25)} must be calculated, |
| 27250 | then symbolic mode will not help because @samp{sqrt(25)} can be | 27244 | then Symbolic mode will not help because @samp{sqrt(25)} can be |
| 27251 | evaluated exactly to 5.) | 27245 | evaluated exactly to 5.) |
| 27252 | 27246 | ||
| 27253 | One subtle restriction that normally only manifests itself with | 27247 | One subtle restriction that normally only manifests itself with |
| @@ -27354,7 +27348,7 @@ A surprisingly useful rewrite rule is @samp{a/(b-c) := a*(b+c)/(b^2-c^2)}. | |||
| 27354 | This will simplify the formula whenever @expr{b} and/or @expr{c} can | 27348 | This will simplify the formula whenever @expr{b} and/or @expr{c} can |
| 27355 | be made simpler by squaring. For example, applying this rule to | 27349 | be made simpler by squaring. For example, applying this rule to |
| 27356 | @samp{2 / (sqrt(2) + 3)} yields @samp{6:7 - 2:7 sqrt(2)} (assuming | 27350 | @samp{2 / (sqrt(2) + 3)} yields @samp{6:7 - 2:7 sqrt(2)} (assuming |
| 27357 | Symbolic Mode has been enabled to keep the square root from being | 27351 | Symbolic mode has been enabled to keep the square root from being |
| 27358 | evaluated to a floating-point approximation). This rule is also | 27352 | evaluated to a floating-point approximation). This rule is also |
| 27359 | useful when working with symbolic complex numbers, e.g., | 27353 | useful when working with symbolic complex numbers, e.g., |
| 27360 | @samp{(a + b i) / (c + d i)}. | 27354 | @samp{(a + b i) / (c + d i)}. |
| @@ -27464,7 +27458,7 @@ formula @samp{1 mm} is ``simplified'' to @samp{mm}. This is only a | |||
| 27464 | display anomaly, however; @samp{mm} will work just fine as a | 27458 | display anomaly, however; @samp{mm} will work just fine as a |
| 27465 | representation of one millimeter. | 27459 | representation of one millimeter. |
| 27466 | 27460 | ||
| 27467 | You may find that Algebraic Mode (@pxref{Algebraic Entry}) makes working | 27461 | You may find that Algebraic mode (@pxref{Algebraic Entry}) makes working |
| 27468 | with units expressions easier. Otherwise, you will have to remember | 27462 | with units expressions easier. Otherwise, you will have to remember |
| 27469 | to hit the apostrophe key every time you wish to enter units. | 27463 | to hit the apostrophe key every time you wish to enter units. |
| 27470 | 27464 | ||
| @@ -27734,7 +27728,7 @@ in its normal terms, and @kbd{u b} expresses the definition in base | |||
| 27734 | units. | 27728 | units. |
| 27735 | 27729 | ||
| 27736 | Two units, @code{pi} and @code{fsc} (the fine structure constant, | 27730 | Two units, @code{pi} and @code{fsc} (the fine structure constant, |
| 27737 | approximately @i{1/137}) are dimensionless. The units simplification | 27731 | approximately @mathit{1/137}) are dimensionless. The units simplification |
| 27738 | commands simply treat these names as equivalent to their corresponding | 27732 | commands simply treat these names as equivalent to their corresponding |
| 27739 | values. However you can, for example, use @kbd{u c} to convert a pure | 27733 | values. However you can, for example, use @kbd{u c} to convert a pure |
| 27740 | number into multiples of the fine structure constant, or @kbd{u b} to | 27734 | number into multiples of the fine structure constant, or @kbd{u b} to |
| @@ -27951,10 +27945,10 @@ All the arithmetic stores accept the Inverse prefix to reverse the | |||
| 27951 | order of the operands. If @expr{v} represents the contents of the | 27945 | order of the operands. If @expr{v} represents the contents of the |
| 27952 | variable, and @expr{a} is the value drawn from the stack, then regular | 27946 | variable, and @expr{a} is the value drawn from the stack, then regular |
| 27953 | @w{@kbd{s -}} assigns | 27947 | @w{@kbd{s -}} assigns |
| 27954 | @texline @tmath{v \coloneq v - a}, | 27948 | @texline @math{v \coloneq v - a}, |
| 27955 | @infoline @expr{v := v - a}, | 27949 | @infoline @expr{v := v - a}, |
| 27956 | but @kbd{I s -} assigns | 27950 | but @kbd{I s -} assigns |
| 27957 | @texline @tmath{v \coloneq a - v}. | 27951 | @texline @math{v \coloneq a - v}. |
| 27958 | @infoline @expr{v := a - v}. | 27952 | @infoline @expr{v := a - v}. |
| 27959 | While @kbd{I s *} might seem pointless, it is | 27953 | While @kbd{I s *} might seem pointless, it is |
| 27960 | useful if matrix multiplication is involved. Actually, all the | 27954 | useful if matrix multiplication is involved. Actually, all the |
| @@ -28353,11 +28347,11 @@ including the current simplification mode. Recall that the | |||
| 28353 | formula @samp{x + y + x} is not handled by Calc's default | 28347 | formula @samp{x + y + x} is not handled by Calc's default |
| 28354 | simplifications, but the @kbd{a s} command will reduce it to | 28348 | simplifications, but the @kbd{a s} command will reduce it to |
| 28355 | the simpler form @samp{y + 2 x}. You can also type @kbd{m A} | 28349 | the simpler form @samp{y + 2 x}. You can also type @kbd{m A} |
| 28356 | to enable an algebraic-simplification mode in which the | 28350 | to enable an Algebraic Simplification mode in which the |
| 28357 | equivalent of @kbd{a s} is used on all of Calc's results. | 28351 | equivalent of @kbd{a s} is used on all of Calc's results. |
| 28358 | If you enter @samp{x + y + x =>} normally, the result will | 28352 | If you enter @samp{x + y + x =>} normally, the result will |
| 28359 | be @samp{x + y + x => x + y + x}. If you change to | 28353 | be @samp{x + y + x => x + y + x}. If you change to |
| 28360 | algebraic-simplification mode, the result will be | 28354 | Algebraic Simplification mode, the result will be |
| 28361 | @samp{x + y + x => y + 2 x}. However, just pressing @kbd{a s} | 28355 | @samp{x + y + x => y + 2 x}. However, just pressing @kbd{a s} |
| 28362 | once will have no effect on @samp{x + y + x => x + y + x}, | 28356 | once will have no effect on @samp{x + y + x => x + y + x}, |
| 28363 | because the righthand side depends only on the lefthand side | 28357 | because the righthand side depends only on the lefthand side |
| @@ -28396,13 +28390,13 @@ side effects. | |||
| 28396 | @pindex calc-assign | 28390 | @pindex calc-assign |
| 28397 | @tindex assign | 28391 | @tindex assign |
| 28398 | @tindex := | 28392 | @tindex := |
| 28399 | Embedded Mode also uses @samp{=>} operators. In embedded mode, | 28393 | Embedded mode also uses @samp{=>} operators. In Embedded mode, |
| 28400 | the lefthand side of an @samp{=>} operator can refer to variables | 28394 | the lefthand side of an @samp{=>} operator can refer to variables |
| 28401 | assigned elsewhere in the file by @samp{:=} operators. The | 28395 | assigned elsewhere in the file by @samp{:=} operators. The |
| 28402 | assignment operator @samp{a := 17} does not actually do anything | 28396 | assignment operator @samp{a := 17} does not actually do anything |
| 28403 | by itself. But Embedded Mode recognizes it and marks it as a sort | 28397 | by itself. But Embedded mode recognizes it and marks it as a sort |
| 28404 | of file-local definition of the variable. You can enter @samp{:=} | 28398 | of file-local definition of the variable. You can enter @samp{:=} |
| 28405 | operators in algebraic mode, or by using the @kbd{s :} | 28399 | operators in Algebraic mode, or by using the @kbd{s :} |
| 28406 | (@code{calc-assign}) [@code{assign}] command which takes a variable | 28400 | (@code{calc-assign}) [@code{assign}] command which takes a variable |
| 28407 | and value from the stack and replaces them with an assignment. | 28401 | and value from the stack and replaces them with an assignment. |
| 28408 | 28402 | ||
| @@ -28541,7 +28535,7 @@ the same length); either or both may instead be interval forms. The | |||
| 28541 | ``z'' value must be a matrix with the same number of rows as elements | 28535 | ``z'' value must be a matrix with the same number of rows as elements |
| 28542 | in ``x'', and the same number of columns as elements in ``y''. The | 28536 | in ``x'', and the same number of columns as elements in ``y''. The |
| 28543 | result is a surface plot where | 28537 | result is a surface plot where |
| 28544 | @texline @tmath{z_{ij}} | 28538 | @texline @math{z_{ij}} |
| 28545 | @infoline @expr{z_ij} | 28539 | @infoline @expr{z_ij} |
| 28546 | is the height of the point | 28540 | is the height of the point |
| 28547 | at coordinate @expr{(x_i, y_j)} on the surface. The 3D graph will | 28541 | at coordinate @expr{(x_i, y_j)} on the surface. The 3D graph will |
| @@ -28652,7 +28646,7 @@ values covered by all the curves ought to be roughly the same if | |||
| 28652 | they are to look nice on the same graph.) | 28646 | they are to look nice on the same graph.) |
| 28653 | 28647 | ||
| 28654 | For example, to plot | 28648 | For example, to plot |
| 28655 | @texline @tmath{\sin n x} | 28649 | @texline @math{\sin n x} |
| 28656 | @infoline @expr{sin(n x)} | 28650 | @infoline @expr{sin(n x)} |
| 28657 | for integers @expr{n} | 28651 | for integers @expr{n} |
| 28658 | from 1 to 5, you could use @kbd{v x} to create a vector of integers | 28652 | from 1 to 5, you could use @kbd{v x} to create a vector of integers |
| @@ -28903,7 +28897,7 @@ values, but if you store a vector of integers in one of these variables, | |||
| 28903 | the @kbd{g a} and @kbd{g f} commands will use those style numbers | 28897 | the @kbd{g a} and @kbd{g f} commands will use those style numbers |
| 28904 | instead of the defaults for new curves that are added to the graph. | 28898 | instead of the defaults for new curves that are added to the graph. |
| 28905 | An entry should be a positive integer for a specific style, or 0 to let | 28899 | An entry should be a positive integer for a specific style, or 0 to let |
| 28906 | the style be chosen automatically, or @i{-1} to turn off lines or points | 28900 | the style be chosen automatically, or @mathit{-1} to turn off lines or points |
| 28907 | altogether. If there are more curves than elements in the vector, the | 28901 | altogether. If there are more curves than elements in the vector, the |
| 28908 | last few curves will continue to have the default styles. Of course, | 28902 | last few curves will continue to have the default styles. Of course, |
| 28909 | you can later use @kbd{g s} and @kbd{g S} to change any of these styles. | 28903 | you can later use @kbd{g s} and @kbd{g S} to change any of these styles. |
| @@ -28942,7 +28936,7 @@ picture of the graph composed of characters like @code{-} and @code{|} | |||
| 28942 | to a buffer called @samp{*Gnuplot Trail*}, which Calc then displays. | 28936 | to a buffer called @samp{*Gnuplot Trail*}, which Calc then displays. |
| 28943 | The graph is made the same size as the Emacs screen, which on most | 28937 | The graph is made the same size as the Emacs screen, which on most |
| 28944 | dumb terminals will be | 28938 | dumb terminals will be |
| 28945 | @texline @tmath{80\times24} | 28939 | @texline @math{80\times24} |
| 28946 | @infoline 80x24 | 28940 | @infoline 80x24 |
| 28947 | characters. The graph is displayed in | 28941 | characters. The graph is displayed in |
| 28948 | an Emacs ``recursive edit''; type @kbd{q} or @kbd{M-# M-#} to exit | 28942 | an Emacs ``recursive edit''; type @kbd{q} or @kbd{M-# M-#} to exit |
| @@ -29103,7 +29097,7 @@ killing GNUPLOT because you think it has gotten stuck. | |||
| 29103 | The commands in this chapter move information between the Calculator and | 29097 | The commands in this chapter move information between the Calculator and |
| 29104 | other Emacs editing buffers. | 29098 | other Emacs editing buffers. |
| 29105 | 29099 | ||
| 29106 | In many cases Embedded Mode is an easier and more natural way to | 29100 | In many cases Embedded mode is an easier and more natural way to |
| 29107 | work with Calc from a regular editing buffer. @xref{Embedded Mode}. | 29101 | work with Calc from a regular editing buffer. @xref{Embedded Mode}. |
| 29108 | 29102 | ||
| 29109 | @menu | 29103 | @menu |
| @@ -29252,7 +29246,7 @@ would correctly split the line into two error forms. | |||
| 29252 | 29246 | ||
| 29253 | @xref{Matrix Functions}, to see how to pull the matrix apart into its | 29247 | @xref{Matrix Functions}, to see how to pull the matrix apart into its |
| 29254 | constituent rows and columns. (If it is a | 29248 | constituent rows and columns. (If it is a |
| 29255 | @texline @tmath{1\times1} | 29249 | @texline @math{1\times1} |
| 29256 | @infoline 1x1 | 29250 | @infoline 1x1 |
| 29257 | matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) | 29251 | matrix, just hit @kbd{v u} (@code{calc-unpack}) twice.) |
| 29258 | 29252 | ||
| @@ -29374,7 +29368,7 @@ just by double-clicking on it in the shell, then middle-clicking | |||
| 29374 | in the Calc window. | 29368 | in the Calc window. |
| 29375 | 29369 | ||
| 29376 | @node Keypad Mode, Embedded Mode, Kill and Yank, Introduction | 29370 | @node Keypad Mode, Embedded Mode, Kill and Yank, Introduction |
| 29377 | @chapter ``Keypad'' Mode | 29371 | @chapter Keypad Mode |
| 29378 | 29372 | ||
| 29379 | @noindent | 29373 | @noindent |
| 29380 | @kindex M-# k | 29374 | @kindex M-# k |
| @@ -29383,7 +29377,7 @@ The @kbd{M-# k} (@code{calc-keypad}) command starts the Calculator | |||
| 29383 | and displays a picture of a calculator-style keypad. If you are using | 29377 | and displays a picture of a calculator-style keypad. If you are using |
| 29384 | the X window system, you can click on any of the ``keys'' in the | 29378 | the X window system, you can click on any of the ``keys'' in the |
| 29385 | keypad using the left mouse button to operate the calculator. | 29379 | keypad using the left mouse button to operate the calculator. |
| 29386 | The original window remains the selected window; in keypad mode | 29380 | The original window remains the selected window; in Keypad mode |
| 29387 | you can type in your file while simultaneously performing | 29381 | you can type in your file while simultaneously performing |
| 29388 | calculations with the mouse. | 29382 | calculations with the mouse. |
| 29389 | 29383 | ||
| @@ -29399,11 +29393,11 @@ the @samp{*Calc Keypad*} window, place the cursor on the desired | |||
| 29399 | ``key,'' and type @key{SPC} or @key{RET}. If you think this | 29393 | ``key,'' and type @key{SPC} or @key{RET}. If you think this |
| 29400 | is easier than using Calc normally, go right ahead. | 29394 | is easier than using Calc normally, go right ahead. |
| 29401 | 29395 | ||
| 29402 | Calc commands are more or less the same in keypad mode. Certain | 29396 | Calc commands are more or less the same in Keypad mode. Certain |
| 29403 | keypad keys differ slightly from the corresponding normal Calc | 29397 | keypad keys differ slightly from the corresponding normal Calc |
| 29404 | keystrokes; all such deviations are described below. | 29398 | keystrokes; all such deviations are described below. |
| 29405 | 29399 | ||
| 29406 | Keypad Mode includes many more commands than will fit on the keypad | 29400 | Keypad mode includes many more commands than will fit on the keypad |
| 29407 | at once. Click the right mouse button [@code{calc-keypad-menu}] | 29401 | at once. Click the right mouse button [@code{calc-keypad-menu}] |
| 29408 | to switch to the next menu. The bottom five rows of the keypad | 29402 | to switch to the next menu. The bottom five rows of the keypad |
| 29409 | stay the same; the top three rows change to a new set of commands. | 29403 | stay the same; the top three rows change to a new set of commands. |
| @@ -29451,7 +29445,7 @@ original buffer. | |||
| 29451 | @end smallexample | 29445 | @end smallexample |
| 29452 | 29446 | ||
| 29453 | @noindent | 29447 | @noindent |
| 29454 | This is the menu that appears the first time you start Keypad Mode. | 29448 | This is the menu that appears the first time you start Keypad mode. |
| 29455 | It will show up in a vertical window on the right side of your screen. | 29449 | It will show up in a vertical window on the right side of your screen. |
| 29456 | Above this menu is the traditional Calc stack display. On a 24-line | 29450 | Above this menu is the traditional Calc stack display. On a 24-line |
| 29457 | screen you will be able to see the top three stack entries. | 29451 | screen you will be able to see the top three stack entries. |
| @@ -29468,7 +29462,7 @@ At other times it changes the sign of the number on the top of the | |||
| 29468 | stack. | 29462 | stack. |
| 29469 | 29463 | ||
| 29470 | The @key{INV} and @key{HYP} keys modify other keys. As well as | 29464 | The @key{INV} and @key{HYP} keys modify other keys. As well as |
| 29471 | having the effects described elsewhere in this manual, Keypad Mode | 29465 | having the effects described elsewhere in this manual, Keypad mode |
| 29472 | defines several other ``inverse'' operations. These are described | 29466 | defines several other ``inverse'' operations. These are described |
| 29473 | below and in the following sections. | 29467 | below and in the following sections. |
| 29474 | 29468 | ||
| @@ -29488,7 +29482,7 @@ The @key{EXEC} key prompts you to enter any keystroke sequence | |||
| 29488 | that would normally work in Calc mode. This can include a | 29482 | that would normally work in Calc mode. This can include a |
| 29489 | numeric prefix if you wish. It is also possible simply to | 29483 | numeric prefix if you wish. It is also possible simply to |
| 29490 | switch into the Calc window and type commands in it; there is | 29484 | switch into the Calc window and type commands in it; there is |
| 29491 | nothing ``magic'' about this window when Keypad Mode is active. | 29485 | nothing ``magic'' about this window when Keypad mode is active. |
| 29492 | 29486 | ||
| 29493 | The other keys in this display perform their obvious calculator | 29487 | The other keys in this display perform their obvious calculator |
| 29494 | functions. @key{CLN2} rounds the top-of-stack by temporarily | 29488 | functions. @key{CLN2} rounds the top-of-stack by temporarily |
| @@ -29590,7 +29584,7 @@ same limit as last time. | |||
| 29590 | @key{INV GCD} computes the LCM (least common multiple) function. | 29584 | @key{INV GCD} computes the LCM (least common multiple) function. |
| 29591 | 29585 | ||
| 29592 | @key{INV FACT} is the gamma function. | 29586 | @key{INV FACT} is the gamma function. |
| 29593 | @texline @tmath{\Gamma(x) = (x-1)!}. | 29587 | @texline @math{\Gamma(x) = (x-1)!}. |
| 29594 | @infoline @expr{gamma(x) = (x-1)!}. | 29588 | @infoline @expr{gamma(x) = (x-1)!}. |
| 29595 | 29589 | ||
| 29596 | @key{PERM} is the number-of-permutations function, which is on the | 29590 | @key{PERM} is the number-of-permutations function, which is on the |
| @@ -29767,16 +29761,16 @@ The @key{OVER} key duplicates the second-to-top stack element. | |||
| 29767 | The @key{STO} and @key{RCL} keys are analogous to @kbd{s t} and | 29761 | The @key{STO} and @key{RCL} keys are analogous to @kbd{s t} and |
| 29768 | @kbd{s r} in regular Calc. @xref{Store and Recall}. Click the | 29762 | @kbd{s r} in regular Calc. @xref{Store and Recall}. Click the |
| 29769 | @key{STO} or @key{RCL} key, then one of the ten digits. (Named | 29763 | @key{STO} or @key{RCL} key, then one of the ten digits. (Named |
| 29770 | variables are not available in Keypad Mode.) You can also use, | 29764 | variables are not available in Keypad mode.) You can also use, |
| 29771 | for example, @kbd{STO + 3} to add to register 3. | 29765 | for example, @kbd{STO + 3} to add to register 3. |
| 29772 | 29766 | ||
| 29773 | @node Embedded Mode, Programming, Keypad Mode, Top | 29767 | @node Embedded Mode, Programming, Keypad Mode, Top |
| 29774 | @chapter Embedded Mode | 29768 | @chapter Embedded Mode |
| 29775 | 29769 | ||
| 29776 | @noindent | 29770 | @noindent |
| 29777 | Embedded Mode in Calc provides an alternative to copying numbers | 29771 | Embedded mode in Calc provides an alternative to copying numbers |
| 29778 | and formulas back and forth between editing buffers and the Calc | 29772 | and formulas back and forth between editing buffers and the Calc |
| 29779 | stack. In Embedded Mode, your editing buffer becomes temporarily | 29773 | stack. In Embedded mode, your editing buffer becomes temporarily |
| 29780 | linked to the stack and this copying is taken care of automatically. | 29774 | linked to the stack and this copying is taken care of automatically. |
| 29781 | 29775 | ||
| 29782 | @menu | 29776 | @menu |
| @@ -29801,7 +29795,7 @@ are visiting your own files. | |||
| 29801 | 29795 | ||
| 29802 | Calc normally scans backward and forward in the buffer for the | 29796 | Calc normally scans backward and forward in the buffer for the |
| 29803 | nearest opening and closing @dfn{formula delimiters}. The simplest | 29797 | nearest opening and closing @dfn{formula delimiters}. The simplest |
| 29804 | delimiters are blank lines. Other delimiters that Embedded Mode | 29798 | delimiters are blank lines. Other delimiters that Embedded mode |
| 29805 | understands are: | 29799 | understands are: |
| 29806 | 29800 | ||
| 29807 | @enumerate | 29801 | @enumerate |
| @@ -30359,15 +30353,15 @@ use @kbd{M-# u} to update the buffer by hand. | |||
| 30359 | @section Mode Settings in Embedded Mode | 30353 | @section Mode Settings in Embedded Mode |
| 30360 | 30354 | ||
| 30361 | @noindent | 30355 | @noindent |
| 30362 | Embedded Mode has a rather complicated mechanism for handling mode | 30356 | Embedded mode has a rather complicated mechanism for handling mode |
| 30363 | settings in Embedded formulas. It is possible to put annotations | 30357 | settings in Embedded formulas. It is possible to put annotations |
| 30364 | in the file that specify mode settings either global to the entire | 30358 | in the file that specify mode settings either global to the entire |
| 30365 | file or local to a particular formula or formulas. In the latter | 30359 | file or local to a particular formula or formulas. In the latter |
| 30366 | case, different modes can be specified for use when a formula | 30360 | case, different modes can be specified for use when a formula |
| 30367 | is the enabled Embedded Mode formula. | 30361 | is the enabled Embedded mode formula. |
| 30368 | 30362 | ||
| 30369 | When you give any mode-setting command, like @kbd{m f} (for fraction | 30363 | When you give any mode-setting command, like @kbd{m f} (for Fraction |
| 30370 | mode) or @kbd{d s} (for scientific notation), Embedded Mode adds | 30364 | mode) or @kbd{d s} (for scientific notation), Embedded mode adds |
| 30371 | a line like the following one to the file just before the opening | 30365 | a line like the following one to the file just before the opening |
| 30372 | delimiter of the formula. | 30366 | delimiter of the formula. |
| 30373 | 30367 | ||
| @@ -30420,7 +30414,7 @@ sure the value is of a legal type or range; if you write an | |||
| 30420 | annotation by hand, be sure to give a proper value or results | 30414 | annotation by hand, be sure to give a proper value or results |
| 30421 | will be unpredictable. Mode-setting annotations are case-sensitive. | 30415 | will be unpredictable. Mode-setting annotations are case-sensitive. |
| 30422 | 30416 | ||
| 30423 | While Embedded Mode is enabled, the word @code{Local} appears in | 30417 | While Embedded mode is enabled, the word @code{Local} appears in |
| 30424 | the mode line. This is to show that mode setting commands generate | 30418 | the mode line. This is to show that mode setting commands generate |
| 30425 | annotations that are ``local'' to the current formula or set of | 30419 | annotations that are ``local'' to the current formula or set of |
| 30426 | formulas. The @kbd{m R} (@code{calc-mode-record-mode}) command | 30420 | formulas. The @kbd{m R} (@code{calc-mode-record-mode}) command |
| @@ -30436,7 +30430,7 @@ that look like this, respectively: | |||
| 30436 | @end example | 30430 | @end example |
| 30437 | 30431 | ||
| 30438 | The first kind of annotation will be used only while a formula | 30432 | The first kind of annotation will be used only while a formula |
| 30439 | is enabled in Embedded Mode. The second kind will be used only | 30433 | is enabled in Embedded mode. The second kind will be used only |
| 30440 | when the formula is @emph{not} enabled. (Whether the formula | 30434 | when the formula is @emph{not} enabled. (Whether the formula |
| 30441 | is ``active'' or not, i.e., whether Calc has seen this formula | 30435 | is ``active'' or not, i.e., whether Calc has seen this formula |
| 30442 | yet, is not relevant here.) | 30436 | yet, is not relevant here.) |
| @@ -30478,21 +30472,21 @@ We would have to go down to the other formula and press @kbd{M-# u} | |||
| 30478 | on it in order to get it to notice the new annotation. | 30472 | on it in order to get it to notice the new annotation. |
| 30479 | 30473 | ||
| 30480 | Two more mode-recording modes selectable by @kbd{m R} are @code{Save} | 30474 | Two more mode-recording modes selectable by @kbd{m R} are @code{Save} |
| 30481 | (which works even outside of Embedded Mode), in which mode settings | 30475 | (which works even outside of Embedded mode), in which mode settings |
| 30482 | are recorded permanently in your Emacs startup file @file{~/.emacs} | 30476 | are recorded permanently in your Emacs startup file @file{~/.emacs} |
| 30483 | rather than by annotating the current document, and no-recording | 30477 | rather than by annotating the current document, and no-recording |
| 30484 | mode (where there is no symbol like @code{Save} or @code{Local} in | 30478 | mode (where there is no symbol like @code{Save} or @code{Local} in |
| 30485 | the mode line), in which mode-changing commands do not leave any | 30479 | the mode line), in which mode-changing commands do not leave any |
| 30486 | annotations at all. | 30480 | annotations at all. |
| 30487 | 30481 | ||
| 30488 | When Embedded Mode is not enabled, mode-recording modes except | 30482 | When Embedded mode is not enabled, mode-recording modes except |
| 30489 | for @code{Save} have no effect. | 30483 | for @code{Save} have no effect. |
| 30490 | 30484 | ||
| 30491 | @node Customizing Embedded Mode, , Mode Settings in Embedded Mode, Embedded Mode | 30485 | @node Customizing Embedded Mode, , Mode Settings in Embedded Mode, Embedded Mode |
| 30492 | @section Customizing Embedded Mode | 30486 | @section Customizing Embedded Mode |
| 30493 | 30487 | ||
| 30494 | @noindent | 30488 | @noindent |
| 30495 | You can modify Embedded Mode's behavior by setting various Lisp | 30489 | You can modify Embedded mode's behavior by setting various Lisp |
| 30496 | variables described here. Use @kbd{M-x set-variable} or | 30490 | variables described here. Use @kbd{M-x set-variable} or |
| 30497 | @kbd{M-x edit-options} to adjust a variable on the fly, or | 30491 | @kbd{M-x edit-options} to adjust a variable on the fly, or |
| 30498 | put a suitable @code{setq} statement in your @file{~/.emacs} | 30492 | put a suitable @code{setq} statement in your @file{~/.emacs} |
| @@ -30502,7 +30496,7 @@ file; @pxref{File Variables, , Local Variables in Files, emacs, the | |||
| 30502 | Emacs manual}.) | 30496 | Emacs manual}.) |
| 30503 | 30497 | ||
| 30504 | While none of these variables will be buffer-local by default, you | 30498 | While none of these variables will be buffer-local by default, you |
| 30505 | can make any of them local to any embedded-mode buffer. (Their | 30499 | can make any of them local to any Embedded mode buffer. (Their |
| 30506 | values in the @samp{*Calculator*} buffer are never used.) | 30500 | values in the @samp{*Calculator*} buffer are never used.) |
| 30507 | 30501 | ||
| 30508 | @vindex calc-embedded-open-formula | 30502 | @vindex calc-embedded-open-formula |
| @@ -30591,7 +30585,7 @@ The default string is @code{"%%% "} (note the trailing space). | |||
| 30591 | @vindex calc-embedded-close-plain | 30585 | @vindex calc-embedded-close-plain |
| 30592 | The @code{calc-embedded-close-plain} variable is a string which | 30586 | The @code{calc-embedded-close-plain} variable is a string which |
| 30593 | ends a ``plain'' formula. The default is @code{" %%%\n"}. Without | 30587 | ends a ``plain'' formula. The default is @code{" %%%\n"}. Without |
| 30594 | the trailing newline here, the first line of a ``big'' mode formula | 30588 | the trailing newline here, the first line of a Big mode formula |
| 30595 | that followed might be shifted over with respect to the other lines. | 30589 | that followed might be shifted over with respect to the other lines. |
| 30596 | 30590 | ||
| 30597 | @vindex calc-embedded-open-new-formula | 30591 | @vindex calc-embedded-open-new-formula |
| @@ -31018,7 +31012,7 @@ forced to use upward-counting conventions. In this case, if @var{initial} | |||
| 31018 | is greater than @var{final} the body will not be executed at all. | 31012 | is greater than @var{final} the body will not be executed at all. |
| 31019 | Note that @var{step} may still be negative in this loop; the prefix | 31013 | Note that @var{step} may still be negative in this loop; the prefix |
| 31020 | argument merely constrains the loop-finished test. Likewise, a prefix | 31014 | argument merely constrains the loop-finished test. Likewise, a prefix |
| 31021 | argument of @i{-1} forces downward-counting conventions. | 31015 | argument of @mathit{-1} forces downward-counting conventions. |
| 31022 | 31016 | ||
| 31023 | @kindex Z @{ | 31017 | @kindex Z @{ |
| 31024 | @kindex Z @} | 31018 | @kindex Z @} |
| @@ -31052,7 +31046,7 @@ conditional and looping commands. | |||
| 31052 | @cindex Restoring saved modes | 31046 | @cindex Restoring saved modes |
| 31053 | Keyboard macros sometimes want to operate under known conditions | 31047 | Keyboard macros sometimes want to operate under known conditions |
| 31054 | without affecting surrounding conditions. For example, a keyboard | 31048 | without affecting surrounding conditions. For example, a keyboard |
| 31055 | macro may wish to turn on Fraction Mode, or set a particular | 31049 | macro may wish to turn on Fraction mode, or set a particular |
| 31056 | precision, independent of the user's normal setting for those | 31050 | precision, independent of the user's normal setting for those |
| 31057 | modes. | 31051 | modes. |
| 31058 | 31052 | ||
| @@ -31101,7 +31095,7 @@ for all mode-setting commands inside the macro. | |||
| 31101 | In fact, @kbd{C-u Z `} is like @kbd{Z `} except that it sets the modes | 31095 | In fact, @kbd{C-u Z `} is like @kbd{Z `} except that it sets the modes |
| 31102 | listed above to their default values. As usual, the matching @kbd{Z '} | 31096 | listed above to their default values. As usual, the matching @kbd{Z '} |
| 31103 | will restore the modes to their settings from before the @kbd{C-u Z `}. | 31097 | will restore the modes to their settings from before the @kbd{C-u Z `}. |
| 31104 | Also, @w{@kbd{Z `}} with a negative prefix argument resets algebraic mode | 31098 | Also, @w{@kbd{Z `}} with a negative prefix argument resets the algebraic mode |
| 31105 | to its default (off) but leaves the other modes the same as they were | 31099 | to its default (off) but leaves the other modes the same as they were |
| 31106 | outside the construct. | 31100 | outside the construct. |
| 31107 | 31101 | ||
| @@ -31989,7 +31983,7 @@ same thing with a single division by 512. | |||
| 31989 | @tindex mysin | 31983 | @tindex mysin |
| 31990 | A somewhat limited sine function could be defined as follows, using the | 31984 | A somewhat limited sine function could be defined as follows, using the |
| 31991 | well-known Taylor series expansion for | 31985 | well-known Taylor series expansion for |
| 31992 | @texline @tmath{\sin x}: | 31986 | @texline @math{\sin x}: |
| 31993 | @infoline @samp{sin(x)}: | 31987 | @infoline @samp{sin(x)}: |
| 31994 | 31988 | ||
| 31995 | @smallexample | 31989 | @smallexample |
| @@ -32173,7 +32167,7 @@ If the first argument to @code{calc-eval} is a list whose first | |||
| 32173 | element is a formula string, then @code{calc-eval} sets all the | 32167 | element is a formula string, then @code{calc-eval} sets all the |
| 32174 | various Calc modes to their default values while the formula is | 32168 | various Calc modes to their default values while the formula is |
| 32175 | evaluated and formatted. For example, the precision is set to 12 | 32169 | evaluated and formatted. For example, the precision is set to 12 |
| 32176 | digits, digit grouping is turned off, and the normal language | 32170 | digits, digit grouping is turned off, and the Normal language |
| 32177 | mode is used. | 32171 | mode is used. |
| 32178 | 32172 | ||
| 32179 | This same principle applies to the other options discussed below. | 32173 | This same principle applies to the other options discussed below. |
| @@ -32196,7 +32190,7 @@ It's usually best to use this form of @code{calc-eval} unless your | |||
| 32196 | program actually considers the interaction with Calc's mode settings | 32190 | program actually considers the interaction with Calc's mode settings |
| 32197 | to be a feature. This will avoid all sorts of potential ``gotchas''; | 32191 | to be a feature. This will avoid all sorts of potential ``gotchas''; |
| 32198 | consider what happens with @samp{(calc-eval "sqrt(2)" 'num)} | 32192 | consider what happens with @samp{(calc-eval "sqrt(2)" 'num)} |
| 32199 | when the user has left Calc in symbolic mode or no-simplify mode. | 32193 | when the user has left Calc in Symbolic mode or No-Simplify mode. |
| 32200 | 32194 | ||
| 32201 | As another example, @samp{(equal (calc-eval '("$<$$") nil a b) "1")} | 32195 | As another example, @samp{(equal (calc-eval '("$<$$") nil a b) "1")} |
| 32202 | checks if the number in string @expr{a} is less than the one in | 32196 | checks if the number in string @expr{a} is less than the one in |
| @@ -32512,10 +32506,10 @@ which is not a Lisp list. | |||
| 32512 | Large integers are stored as lists of the form @samp{(bigpos @var{d0} | 32506 | Large integers are stored as lists of the form @samp{(bigpos @var{d0} |
| 32513 | @var{d1} @var{d2} @dots{})} for positive integers 1000000 or more, or | 32507 | @var{d1} @var{d2} @dots{})} for positive integers 1000000 or more, or |
| 32514 | @samp{(bigneg @var{d0} @var{d1} @var{d2} @dots{})} for negative integers | 32508 | @samp{(bigneg @var{d0} @var{d1} @var{d2} @dots{})} for negative integers |
| 32515 | @i{-1000000} or less. Each @var{d} is a base-1000 ``digit,'' a Lisp integer | 32509 | @mathit{-1000000} or less. Each @var{d} is a base-1000 ``digit,'' a Lisp integer |
| 32516 | from 0 to 999. The least significant digit is @var{d0}; the last digit, | 32510 | from 0 to 999. The least significant digit is @var{d0}; the last digit, |
| 32517 | @var{dn}, which is always nonzero, is the most significant digit. For | 32511 | @var{dn}, which is always nonzero, is the most significant digit. For |
| 32518 | example, the integer @i{-12345678} is stored as @samp{(bigneg 678 345 12)}. | 32512 | example, the integer @mathit{-12345678} is stored as @samp{(bigneg 678 345 12)}. |
| 32519 | 32513 | ||
| 32520 | The distinction between small and large integers is entirely hidden from | 32514 | The distinction between small and large integers is entirely hidden from |
| 32521 | the user. In @code{defmath} definitions, the Lisp predicate @code{integerp} | 32515 | the user. In @code{defmath} definitions, the Lisp predicate @code{integerp} |
| @@ -32536,7 +32530,7 @@ Floating-point numbers are stored in the form, @samp{(float @var{mant} | |||
| 32536 | @samp{10^@var{p}} in absolute value (@var{p} represents the current | 32530 | @samp{10^@var{p}} in absolute value (@var{p} represents the current |
| 32537 | precision), and @var{exp} (the ``exponent'') is a fixnum. The value of | 32531 | precision), and @var{exp} (the ``exponent'') is a fixnum. The value of |
| 32538 | the float is @samp{@var{mant} * 10^@var{exp}}. For example, the number | 32532 | the float is @samp{@var{mant} * 10^@var{exp}}. For example, the number |
| 32539 | @i{-3.14} is stored as @samp{(float -314 -2) = -314*10^-2}. Other constraints | 32533 | @mathit{-3.14} is stored as @samp{(float -314 -2) = -314*10^-2}. Other constraints |
| 32540 | are that the number 0.0 is always stored as @samp{(float 0 0)}, and, | 32534 | are that the number 0.0 is always stored as @samp{(float 0 0)}, and, |
| 32541 | except for the 0.0 case, the rightmost base-10 digit of @var{mant} is | 32535 | except for the 0.0 case, the rightmost base-10 digit of @var{mant} is |
| 32542 | always nonzero. (If the rightmost digit is zero, the number is | 32536 | always nonzero. (If the rightmost digit is zero, the number is |
| @@ -32772,7 +32766,7 @@ will be used. | |||
| 32772 | This function takes a Calc object and ``normalizes'' it. At the very | 32766 | This function takes a Calc object and ``normalizes'' it. At the very |
| 32773 | least this involves re-rounding floating-point values according to the | 32767 | least this involves re-rounding floating-point values according to the |
| 32774 | current precision and other similar jobs. Also, unless the user has | 32768 | current precision and other similar jobs. Also, unless the user has |
| 32775 | selected no-simplify mode (@pxref{Simplification Modes}), this involves | 32769 | selected No-Simplify mode (@pxref{Simplification Modes}), this involves |
| 32776 | actually evaluating a formula object by executing the function calls | 32770 | actually evaluating a formula object by executing the function calls |
| 32777 | it contains, and possibly also doing algebraic simplification, etc. | 32771 | it contains, and possibly also doing algebraic simplification, etc. |
| 32778 | @end defun | 32772 | @end defun |
| @@ -32848,7 +32842,7 @@ is applied to the top stack element, or, if @var{unary} is not | |||
| 32848 | specified, nothing happens. When the argument is two or more, | 32842 | specified, nothing happens. When the argument is two or more, |
| 32849 | the binary function @var{func} is reduced across the top @var{arg} | 32843 | the binary function @var{func} is reduced across the top @var{arg} |
| 32850 | stack elements; when the argument is negative, the function is | 32844 | stack elements; when the argument is negative, the function is |
| 32851 | mapped between the next-to-top @i{-@var{arg}} stack elements and the | 32845 | mapped between the next-to-top @mathit{-@var{arg}} stack elements and the |
| 32852 | top element. | 32846 | top element. |
| 32853 | @end defun | 32847 | @end defun |
| 32854 | 32848 | ||
| @@ -33134,13 +33128,13 @@ function call which led here will be left in symbolic form. | |||
| 33134 | @end defun | 33128 | @end defun |
| 33135 | 33129 | ||
| 33136 | @defun inexact-value | 33130 | @defun inexact-value |
| 33137 | If Symbolic Mode is enabled, this will signal an error that causes | 33131 | If Symbolic mode is enabled, this will signal an error that causes |
| 33138 | @code{normalize} to leave the formula in symbolic form, with the message | 33132 | @code{normalize} to leave the formula in symbolic form, with the message |
| 33139 | ``Inexact result.'' (This function has no effect when not in Symbolic Mode.) | 33133 | ``Inexact result.'' (This function has no effect when not in Symbolic mode.) |
| 33140 | Note that if your function calls @samp{(sin 5)} in Symbolic Mode, the | 33134 | Note that if your function calls @samp{(sin 5)} in Symbolic mode, the |
| 33141 | @code{sin} function will call @code{inexact-value}, which will cause your | 33135 | @code{sin} function will call @code{inexact-value}, which will cause your |
| 33142 | function to be left unsimplified. You may instead wish to call | 33136 | function to be left unsimplified. You may instead wish to call |
| 33143 | @samp{(normalize (list 'calcFunc-sin 5))}, which in Symbolic Mode will | 33137 | @samp{(normalize (list 'calcFunc-sin 5))}, which in Symbolic mode will |
| 33144 | return the formula @samp{sin(5)} to your function. | 33138 | return the formula @samp{sin(5)} to your function. |
| 33145 | @end defun | 33139 | @end defun |
| 33146 | 33140 | ||
| @@ -33186,9 +33180,9 @@ number of parameters, or because it returns @code{nil} or calls | |||
| 33186 | @code{reject-arg} or @code{inexact-result}, @code{normalize} returns | 33180 | @code{reject-arg} or @code{inexact-result}, @code{normalize} returns |
| 33187 | the formula still in symbolic form. | 33181 | the formula still in symbolic form. |
| 33188 | 33182 | ||
| 33189 | If the current Simplification Mode is ``none'' or ``numeric arguments | 33183 | If the current simplification mode is ``none'' or ``numeric arguments |
| 33190 | only,'' @code{normalize} will act appropriately. However, the more | 33184 | only,'' @code{normalize} will act appropriately. However, the more |
| 33191 | powerful simplification modes (like algebraic simplification) are | 33185 | powerful simplification modes (like Algebraic Simplification) are |
| 33192 | not handled by @code{normalize}. They are handled by @code{calc-normalize}, | 33186 | not handled by @code{normalize}. They are handled by @code{calc-normalize}, |
| 33193 | which calls @code{normalize} and possibly some other routines, such | 33187 | which calls @code{normalize} and possibly some other routines, such |
| 33194 | as @code{simplify} or @code{simplify-units}. Programs generally will | 33188 | as @code{simplify} or @code{simplify-units}. Programs generally will |
| @@ -33267,7 +33261,7 @@ or formula, this calls @code{reject-arg}. | |||
| 33267 | @end defun | 33261 | @end defun |
| 33268 | 33262 | ||
| 33269 | @defun compare x y | 33263 | @defun compare x y |
| 33270 | Compare the numbers @var{x} and @var{y}, and return @i{-1} if | 33264 | Compare the numbers @var{x} and @var{y}, and return @mathit{-1} if |
| 33271 | @samp{(lessp @var{x} @var{y})}, 1 if @samp{(lessp @var{y} @var{x})}, | 33265 | @samp{(lessp @var{x} @var{y})}, 1 if @samp{(lessp @var{y} @var{x})}, |
| 33272 | 0 if @samp{(math-equal @var{x} @var{y})}, or 2 if the order is | 33266 | 0 if @samp{(math-equal @var{x} @var{y})}, or 2 if the order is |
| 33273 | undefined or cannot be determined. | 33267 | undefined or cannot be determined. |
| @@ -33280,7 +33274,7 @@ considered to have zero digits. | |||
| 33280 | @end defun | 33274 | @end defun |
| 33281 | 33275 | ||
| 33282 | @defun scale-int x n | 33276 | @defun scale-int x n |
| 33283 | Shift integer @var{x} left @var{n} decimal digits, or right @i{-@var{n}} | 33277 | Shift integer @var{x} left @var{n} decimal digits, or right @mathit{-@var{n}} |
| 33284 | digits with truncation toward zero. | 33278 | digits with truncation toward zero. |
| 33285 | @end defun | 33279 | @end defun |
| 33286 | 33280 | ||
| @@ -33376,7 +33370,7 @@ again to 30 digits for use in the present request. | |||
| 33376 | If the current angular mode is Degrees or HMS, this function returns the | 33370 | If the current angular mode is Degrees or HMS, this function returns the |
| 33377 | integer 360. In Radians mode, this function returns either the | 33371 | integer 360. In Radians mode, this function returns either the |
| 33378 | corresponding value in radians to the current precision, or the formula | 33372 | corresponding value in radians to the current precision, or the formula |
| 33379 | @samp{2*pi}, depending on the Symbolic Mode. There are also similar | 33373 | @samp{2*pi}, depending on the Symbolic mode. There are also similar |
| 33380 | function @code{half-circle} and @code{quarter-circle}. | 33374 | function @code{half-circle} and @code{quarter-circle}. |
| 33381 | @end defun | 33375 | @end defun |
| 33382 | 33376 | ||
| @@ -33434,12 +33428,12 @@ If @var{a} is a formula, this returns the formula @samp{deg(@var{a})}. | |||
| 33434 | @end defun | 33428 | @end defun |
| 33435 | 33429 | ||
| 33436 | @defun to-radians-2 a | 33430 | @defun to-radians-2 a |
| 33437 | Like @code{to-radians}, except that in Symbolic Mode a degrees to | 33431 | Like @code{to-radians}, except that in Symbolic mode a degrees to |
| 33438 | radians conversion yields a formula like @samp{@var{a}*pi/180}. | 33432 | radians conversion yields a formula like @samp{@var{a}*pi/180}. |
| 33439 | @end defun | 33433 | @end defun |
| 33440 | 33434 | ||
| 33441 | @defun from-radians-2 a | 33435 | @defun from-radians-2 a |
| 33442 | Like @code{from-radians}, except that in Symbolic Mode a radians to | 33436 | Like @code{from-radians}, except that in Symbolic mode a radians to |
| 33443 | degrees conversion yields a formula like @samp{@var{a}*180/pi}. | 33437 | degrees conversion yields a formula like @samp{@var{a}*180/pi}. |
| 33444 | @end defun | 33438 | @end defun |
| 33445 | 33439 | ||
| @@ -33488,7 +33482,7 @@ function @code{frac}, and can be rather slow. | |||
| 33488 | @defun quarter-integer n | 33482 | @defun quarter-integer n |
| 33489 | If @var{n} is an integer or integer-valued float, this function | 33483 | If @var{n} is an integer or integer-valued float, this function |
| 33490 | returns zero. If @var{n} is a half-integer (i.e., an integer plus | 33484 | returns zero. If @var{n} is a half-integer (i.e., an integer plus |
| 33491 | @i{1:2} or 0.5), it returns 2. If @var{n} is a quarter-integer, | 33485 | @mathit{1:2} or 0.5), it returns 2. If @var{n} is a quarter-integer, |
| 33492 | it returns 1 or 3. If @var{n} is anything else, this function | 33486 | it returns 1 or 3. If @var{n} is anything else, this function |
| 33493 | returns @code{nil}. | 33487 | returns @code{nil}. |
| 33494 | @end defun | 33488 | @end defun |
| @@ -35631,8 +35625,8 @@ input data set. Each entry may be a single value or a vector of values. | |||
| 35631 | @c 20 | 35625 | @c 20 |
| 35632 | @item | 35626 | @item |
| 35633 | With a prefix argument of 1, take a single | 35627 | With a prefix argument of 1, take a single |
| 35634 | @texline @tmath{@var{n}\times2} | 35628 | @texline @var{n}@math{\times2} |
| 35635 | @infoline @i{@var{N}x2} | 35629 | @infoline @mathit{@var{N}x2} |
| 35636 | matrix from the stack instead of two separate data vectors. | 35630 | matrix from the stack instead of two separate data vectors. |
| 35637 | 35631 | ||
| 35638 | @c 21 | 35632 | @c 21 |
| @@ -35834,7 +35828,7 @@ to evaluate variables. | |||
| 35834 | The variable is replaced by the formula shown on the right. The | 35828 | The variable is replaced by the formula shown on the right. The |
| 35835 | Inverse flag reverses the order of the operands, e.g., @kbd{I s - x} | 35829 | Inverse flag reverses the order of the operands, e.g., @kbd{I s - x} |
| 35836 | assigns | 35830 | assigns |
| 35837 | @texline @tmath{x \coloneq a-x}. | 35831 | @texline @math{x \coloneq a-x}. |
| 35838 | @infoline @expr{x := a-x}. | 35832 | @infoline @expr{x := a-x}. |
| 35839 | 35833 | ||
| 35840 | @c 48 | 35834 | @c 48 |
| @@ -35842,7 +35836,7 @@ assigns | |||
| 35842 | Press @kbd{?} repeatedly to see how to choose a model. Answer the | 35836 | Press @kbd{?} repeatedly to see how to choose a model. Answer the |
| 35843 | variables prompt with @expr{iv} or @expr{iv;pv} to specify | 35837 | variables prompt with @expr{iv} or @expr{iv;pv} to specify |
| 35844 | independent and parameter variables. A positive prefix argument | 35838 | independent and parameter variables. A positive prefix argument |
| 35845 | takes @i{@var{n}+1} vectors from the stack; a zero prefix takes a matrix | 35839 | takes @mathit{@var{n}+1} vectors from the stack; a zero prefix takes a matrix |
| 35846 | and a vector from the stack. | 35840 | and a vector from the stack. |
| 35847 | 35841 | ||
| 35848 | @c 49 | 35842 | @c 49 |
diff --git a/man/cc-mode.texi b/man/cc-mode.texi index 2c0933a5335..89e49d67442 100644 --- a/man/cc-mode.texi +++ b/man/cc-mode.texi | |||
| @@ -1420,7 +1420,7 @@ then as the comment prefix. It defaults to @samp{* | |||
| 1420 | @code{c-block-comment-prefix} typically gets overriden by the default | 1420 | @code{c-block-comment-prefix} typically gets overriden by the default |
| 1421 | style @code{gnu}, which sets it to blank. You can see the line | 1421 | style @code{gnu}, which sets it to blank. You can see the line |
| 1422 | splitting effect described here by setting a different style, | 1422 | splitting effect described here by setting a different style, |
| 1423 | e.g. @code{k&r} @xref{Choosing a Style}}, which makes a comment | 1423 | e.g. @code{k&r} @xref{Choosing a Style}.}, which makes a comment |
| 1424 | 1424 | ||
| 1425 | @example | 1425 | @example |
| 1426 | /* Got O(n^2) here, which is a Bad Thing. */ | 1426 | /* Got O(n^2) here, which is a Bad Thing. */ |
| @@ -1643,7 +1643,7 @@ trailing backslashes. | |||
| 1643 | @cindex font locking | 1643 | @cindex font locking |
| 1644 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! | 1644 | @comment !!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!! |
| 1645 | 1645 | ||
| 1646 | @strong{Note:} The font locking in AWK mode is currently not integrated | 1646 | @strong{Please note:} The font locking in AWK mode is currently not integrated |
| 1647 | with the rest of @ccmode{}, so this section does not apply there. | 1647 | with the rest of @ccmode{}, so this section does not apply there. |
| 1648 | @xref{AWK Mode Font Locking}, instead. | 1648 | @xref{AWK Mode Font Locking}, instead. |
| 1649 | 1649 | ||
diff --git a/man/dired.texi b/man/dired.texi index f19ce7e1ab0..1c5e29fe696 100644 --- a/man/dired.texi +++ b/man/dired.texi | |||
| @@ -89,7 +89,7 @@ so common in Dired that it deserves to be easy to type.) @key{DEL} | |||
| 89 | (move up and unflag) is often useful simply for moving up. | 89 | (move up and unflag) is often useful simply for moving up. |
| 90 | 90 | ||
| 91 | @findex dired-goto-file | 91 | @findex dired-goto-file |
| 92 | @kindex M-g | 92 | @kindex M-g @r{(Dired)} |
| 93 | @kbd{M-g} (@code{dired-goto-file}) moves point to the line that | 93 | @kbd{M-g} (@code{dired-goto-file}) moves point to the line that |
| 94 | describes a specified file or directory. | 94 | describes a specified file or directory. |
| 95 | 95 | ||
| @@ -1113,7 +1113,7 @@ and erases all flags and marks. | |||
| 1113 | @table @kbd | 1113 | @table @kbd |
| 1114 | @item w | 1114 | @item w |
| 1115 | @cindex Adding to the kill ring in Dired. | 1115 | @cindex Adding to the kill ring in Dired. |
| 1116 | @kindex w | 1116 | @kindex w @r{(Dired)} |
| 1117 | @findex dired-copy-filename-as-kill | 1117 | @findex dired-copy-filename-as-kill |
| 1118 | The @kbd{w} command (@code{dired-copy-filename-as-kill}) puts the | 1118 | The @kbd{w} command (@code{dired-copy-filename-as-kill}) puts the |
| 1119 | names of the marked (or next @var{n}) files into the kill ring, as if | 1119 | names of the marked (or next @var{n}) files into the kill ring, as if |
diff --git a/man/gnus-faq.texi b/man/gnus-faq.texi index 5d243f8a02e..280280a401e 100644 --- a/man/gnus-faq.texi +++ b/man/gnus-faq.texi | |||
| @@ -1414,7 +1414,7 @@ Answer: | |||
| 1414 | message. For a follow up to a newsgroup, it's | 1414 | message. For a follow up to a newsgroup, it's |
| 1415 | @samp{f} and @samp{F} | 1415 | @samp{f} and @samp{F} |
| 1416 | (analog to @samp{r} and | 1416 | (analog to @samp{r} and |
| 1417 | @samp{R}. | 1417 | @samp{R}). |
| 1418 | 1418 | ||
| 1419 | 1419 | ||
| 1420 | Enter new headers above the line saying "--text follows | 1420 | Enter new headers above the line saying "--text follows |
diff --git a/man/mark.texi b/man/mark.texi index b4154f9c3ae..c37bd7857e0 100644 --- a/man/mark.texi +++ b/man/mark.texi | |||
| @@ -191,7 +191,9 @@ You can activate the new region by executing @kbd{C-x C-x} | |||
| 191 | (@code{exchange-point-and-mark}). | 191 | (@code{exchange-point-and-mark}). |
| 192 | 192 | ||
| 193 | @item | 193 | @item |
| 194 | @kbd{C-s} when the mark is active does not alter the mark. | 194 | Commands that normally set the mark before moving long distances (like |
| 195 | @kbd{M-<} and @kbd{C-s}) do not alter the mark in Transient Mark mode | ||
| 196 | when the mark is active. | ||
| 195 | 197 | ||
| 196 | @item | 198 | @item |
| 197 | Some commands operate on the region if a region is active. For | 199 | Some commands operate on the region if a region is active. For |
| @@ -320,6 +322,8 @@ next balanced expression (@pxref{Expressions}). These commands handle | |||
| 320 | arguments just like @kbd{M-f} and @kbd{C-M-f}. If you repeat these | 322 | arguments just like @kbd{M-f} and @kbd{C-M-f}. If you repeat these |
| 321 | commands, the region is extended. For example, you can type either | 323 | commands, the region is extended. For example, you can type either |
| 322 | @kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words. | 324 | @kbd{C-u 2 M-@@} or @kbd{M-@@ M-@@} to mark the next two words. |
| 325 | The region is also extended when the mark is active in Transient Mark | ||
| 326 | mode, regardless of the last command. | ||
| 323 | 327 | ||
| 324 | @kindex C-x h | 328 | @kindex C-x h |
| 325 | @findex mark-whole-buffer | 329 | @findex mark-whole-buffer |
| @@ -382,9 +386,10 @@ the same buffer. | |||
| 382 | Many commands that can move long distances, such as @kbd{M-<} | 386 | Many commands that can move long distances, such as @kbd{M-<} |
| 383 | (@code{beginning-of-buffer}), start by setting the mark and saving the | 387 | (@code{beginning-of-buffer}), start by setting the mark and saving the |
| 384 | old mark on the mark ring. This is to make it easier for you to move | 388 | old mark on the mark ring. This is to make it easier for you to move |
| 385 | back later. Searches set the mark if they move point. You can tell | 389 | back later. Searches set the mark if they move point. However, in |
| 386 | when a command sets the mark because it displays @samp{Mark set} in the | 390 | Transient Mark mode, these commands do not set the mark when the mark |
| 387 | echo area. | 391 | is already active. You can tell when a command sets the mark because |
| 392 | it displays @samp{Mark set} in the echo area. | ||
| 388 | 393 | ||
| 389 | If you want to move back to the same place over and over, the mark | 394 | If you want to move back to the same place over and over, the mark |
| 390 | ring may not be convenient enough. If so, you can record the position | 395 | ring may not be convenient enough. If so, you can record the position |
diff --git a/man/misc.texi b/man/misc.texi index 2adef51b8ce..e4b2806c673 100644 --- a/man/misc.texi +++ b/man/misc.texi | |||
| @@ -2219,7 +2219,7 @@ which has a similar feature of its own. | |||
| 2219 | @subsection Finding Files and URLs at Point | 2219 | @subsection Finding Files and URLs at Point |
| 2220 | @findex find-file-at-point | 2220 | @findex find-file-at-point |
| 2221 | @findex ffap | 2221 | @findex ffap |
| 2222 | @findex ffap-dired-at-point | 2222 | @findex dired-at-point |
| 2223 | @findex ffap-next | 2223 | @findex ffap-next |
| 2224 | @findex ffap-menu | 2224 | @findex ffap-menu |
| 2225 | @cindex finding file at point | 2225 | @cindex finding file at point |
| @@ -2248,18 +2248,36 @@ make the following key bindings and to install hooks for using | |||
| 2248 | @kindex C-x C-f @r{(FFAP)} | 2248 | @kindex C-x C-f @r{(FFAP)} |
| 2249 | Find @var{filename}, guessing a default from text around point | 2249 | Find @var{filename}, guessing a default from text around point |
| 2250 | (@code{find-file-at-point}). | 2250 | (@code{find-file-at-point}). |
| 2251 | @item C-x C-r | ||
| 2252 | @kindex C-x C-r @r{(FFAP)} | ||
| 2253 | @code{ffap-read-only}, analogous to @code{find-file-read-only}. | ||
| 2254 | @item C-x C-v | ||
| 2255 | @kindex C-x C-v @r{(FFAP)} | ||
| 2256 | @code{ffap-alternate-file}, analogous to @code{find-alternate-file}. | ||
| 2257 | @item C-x d @var{directory} @key{RET} | ||
| 2258 | @kindex C-x d @r{(FFAP)} | ||
| 2259 | Start Dired on @var{directory}, defaulting to the directory name at | ||
| 2260 | point (@code{dired-at-point}). | ||
| 2261 | @item C-x C-d | ||
| 2262 | @code{ffap-list-directory}, analogous to @code{list-directory}. | ||
| 2251 | @item C-x 4 f | 2263 | @item C-x 4 f |
| 2252 | @kindex C-x 4 f @r{(FFAP)} | 2264 | @kindex C-x 4 f @r{(FFAP)} |
| 2253 | @code{ffap-other-window}, analogous to @code{find-file-other-window}. | 2265 | @code{ffap-other-window}, analogous to @code{find-file-other-window}. |
| 2266 | @item C-x 4 r | ||
| 2267 | @code{ffap-read-only-other-window}, analogous to | ||
| 2268 | @code{find-file-read-only-other-window}. | ||
| 2269 | @item C-x 4 d | ||
| 2270 | @code{ffap-dired-other-window}, analogous to @code{dired-other-window}. | ||
| 2254 | @item C-x 5 f | 2271 | @item C-x 5 f |
| 2255 | @kindex C-x 5 f @r{(FFAP)} | 2272 | @kindex C-x 5 f @r{(FFAP)} |
| 2256 | @code{ffap-other-frame}, analogous to @code{find-file-other-frame}. | 2273 | @code{ffap-other-frame}, analogous to @code{find-file-other-frame}. |
| 2274 | @item C-x 5 r | ||
| 2275 | @code{ffap-read-only-other-frame}, analogous to | ||
| 2276 | @code{find-file-read-only-other-frame}. | ||
| 2277 | @item C-x 5 d | ||
| 2278 | @code{ffap-dired-other-frame}, analogous to @code{dired-other-frame}. | ||
| 2257 | @item M-x ffap-next | 2279 | @item M-x ffap-next |
| 2258 | Search buffer for next file name or URL, then find that file or URL. | 2280 | Search buffer for next file name or URL, then find that file or URL. |
| 2259 | @item C-x d @var{directory} @key{RET} | ||
| 2260 | @kindex C-x d @r{(FFAP)} | ||
| 2261 | Start Dired on @var{directory}, defaulting to the directory name at | ||
| 2262 | point (@code{ffap-dired-at-point}). | ||
| 2263 | @item S-Mouse-3 | 2281 | @item S-Mouse-3 |
| 2264 | @kindex S-Mouse-3 @r{(FFAP)} | 2282 | @kindex S-Mouse-3 @r{(FFAP)} |
| 2265 | @code{ffap-at-mouse} finds the file guessed from text around the position | 2283 | @code{ffap-at-mouse} finds the file guessed from text around the position |
diff --git a/man/trampver.texi b/man/trampver.texi index 743b49388f7..45cbefb72ac 100644 --- a/man/trampver.texi +++ b/man/trampver.texi | |||
| @@ -4,7 +4,7 @@ | |||
| 4 | @c In the Tramp CVS, the version number is auto-frobbed from | 4 | @c In the Tramp CVS, the version number is auto-frobbed from |
| 5 | @c configure.ac, so you should edit that file and run | 5 | @c configure.ac, so you should edit that file and run |
| 6 | @c "autoconf && ./configure" to change the version number. | 6 | @c "autoconf && ./configure" to change the version number. |
| 7 | @set trampver 2.0.45 | 7 | @set trampver 2.0.46 |
| 8 | 8 | ||
| 9 | @c Other flags from configuration | 9 | @c Other flags from configuration |
| 10 | @set prefix /usr/local | 10 | @set prefix /usr/local |
diff --git a/man/url.texi b/man/url.texi index 5f36826d926..f5c15e2dff5 100644 --- a/man/url.texi +++ b/man/url.texi | |||
| @@ -27,7 +27,7 @@ Copyright (C) 1993, 1994, 1995, 1996 William M. Perry | |||
| 27 | Permission is granted to copy, distribute and/or modify this document | 27 | Permission is granted to copy, distribute and/or modify this document |
| 28 | under the terms of the GNU Free Documentation License, Version 1.1 or | 28 | under the terms of the GNU Free Documentation License, Version 1.1 or |
| 29 | any later version published by the Free Software Foundation; with the | 29 | any later version published by the Free Software Foundation; with the |
| 30 | Invariant Sections being | 30 | Invariant Sections being |
| 31 | ``GNU GENERAL PUBLIC LICENSE''. A copy of the | 31 | ``GNU GENERAL PUBLIC LICENSE''. A copy of the |
| 32 | license is included in the section entitled ``GNU Free Documentation | 32 | license is included in the section entitled ``GNU Free Documentation |
| 33 | License.'' | 33 | License.'' |
| @@ -74,9 +74,9 @@ License.'' | |||
| 74 | * General Facilities:: URLs can be cached, accessed via a gateway | 74 | * General Facilities:: URLs can be cached, accessed via a gateway |
| 75 | and tracked in a history list. | 75 | and tracked in a history list. |
| 76 | * Customization:: Variables you can alter. | 76 | * Customization:: Variables you can alter. |
| 77 | * Function Index:: | 77 | * Function Index:: |
| 78 | * Variable Index:: | 78 | * Variable Index:: |
| 79 | * Concept Index:: | 79 | * Concept Index:: |
| 80 | @end menu | 80 | @end menu |
| 81 | 81 | ||
| 82 | @node Getting Started | 82 | @node Getting Started |
| @@ -115,7 +115,7 @@ The meaning of | |||
| 115 | the @var{path} component depends on the service. | 115 | the @var{path} component depends on the service. |
| 116 | 116 | ||
| 117 | @menu | 117 | @menu |
| 118 | * Configuration:: | 118 | * Configuration:: |
| 119 | * Parsed URLs:: URLs are parsed into vector structures. | 119 | * Parsed URLs:: URLs are parsed into vector structures. |
| 120 | @end menu | 120 | @end menu |
| 121 | 121 | ||
| @@ -204,7 +204,7 @@ Recreates a URL string from the parsed @var{url}. | |||
| 204 | @defun url-retrieve-synchronously url | 204 | @defun url-retrieve-synchronously url |
| 205 | Retrieve @var{url} synchronously and return a buffer containing the | 205 | Retrieve @var{url} synchronously and return a buffer containing the |
| 206 | data. @var{url} is either a string or a parsed URL structure. Return | 206 | data. @var{url} is either a string or a parsed URL structure. Return |
| 207 | @var{nil} if there are no data associated with it (the case for dired, | 207 | @code{nil} if there are no data associated with it (the case for dired, |
| 208 | info, or mailto URLs that need no further processing). | 208 | info, or mailto URLs that need no further processing). |
| 209 | @end defun | 209 | @end defun |
| 210 | 210 | ||
| @@ -214,7 +214,7 @@ Retrieve @var{url} asynchronously and call @var{callback} with args | |||
| 214 | has been completely retrieved, with the current buffer containing the | 214 | has been completely retrieved, with the current buffer containing the |
| 215 | object and any MIME headers associated with it. @var{url} is either a | 215 | object and any MIME headers associated with it. @var{url} is either a |
| 216 | string or a parsed URL structure. Returns the buffer @var{url} will | 216 | string or a parsed URL structure. Returns the buffer @var{url} will |
| 217 | load into, or @var{nil} if the process has already completed. | 217 | load into, or @code{nil} if the process has already completed. |
| 218 | @end defun | 218 | @end defun |
| 219 | 219 | ||
| 220 | @node Supported URL Types | 220 | @node Supported URL Types |
| @@ -222,7 +222,7 @@ load into, or @var{nil} if the process has already completed. | |||
| 222 | 222 | ||
| 223 | @menu | 223 | @menu |
| 224 | * http/https:: Hypertext Transfer Protocol. | 224 | * http/https:: Hypertext Transfer Protocol. |
| 225 | * file/ftp:: Local files and FTP archives. | 225 | * file/ftp:: Local files and FTP archives. |
| 226 | * info:: Emacs `Info' pages. | 226 | * info:: Emacs `Info' pages. |
| 227 | * mailto:: Sending email. | 227 | * mailto:: Sending email. |
| 228 | * news/nntp/snews:: Usenet news. | 228 | * news/nntp/snews:: Usenet news. |
| @@ -235,7 +235,7 @@ load into, or @var{nil} if the process has already completed. | |||
| 235 | @c * netrek:: | 235 | @c * netrek:: |
| 236 | @c * prospero:: | 236 | @c * prospero:: |
| 237 | * cid:: Content-ID. | 237 | * cid:: Content-ID. |
| 238 | * about:: | 238 | * about:: |
| 239 | * ldap:: Lightweight Directory Access Protocol | 239 | * ldap:: Lightweight Directory Access Protocol |
| 240 | * imap:: IMAP mailboxes. | 240 | * imap:: IMAP mailboxes. |
| 241 | * man:: Unix man pages. | 241 | * man:: Unix man pages. |
| @@ -273,10 +273,10 @@ otherwise the user will be asked on each request. | |||
| 273 | 273 | ||
| 274 | 274 | ||
| 275 | @menu | 275 | @menu |
| 276 | * Cookies:: | 276 | * Cookies:: |
| 277 | * HTTP language/coding:: | 277 | * HTTP language/coding:: |
| 278 | * HTTP URL Options:: | 278 | * HTTP URL Options:: |
| 279 | * Dealing with HTTP documents:: | 279 | * Dealing with HTTP documents:: |
| 280 | @end menu | 280 | @end menu |
| 281 | 281 | ||
| 282 | @node Cookies | 282 | @node Cookies |
| @@ -330,7 +330,7 @@ preferred character set encodings, e.g.@: Latin-9 or Big5, and these | |||
| 330 | can be weighted. In Emacs 21 this list is generated automatically | 330 | can be weighted. In Emacs 21 this list is generated automatically |
| 331 | from the list of defined coding systems which have associated MIME | 331 | from the list of defined coding systems which have associated MIME |
| 332 | types. These are sorted by coding priority. @xref{Recognize Coding, | 332 | types. These are sorted by coding priority. @xref{Recognize Coding, |
| 333 | , Recognizing Coding Systems, emacs, GNU Emacs Manual}. | 333 | , Recognizing Coding Systems, emacs, The GNU Emacs Manual}. |
| 334 | @end defopt | 334 | @end defopt |
| 335 | 335 | ||
| 336 | @defopt url-mime-language-string | 336 | @defopt url-mime-language-string |
| @@ -384,9 +384,9 @@ Currently this is just the raw header contents. | |||
| 384 | 384 | ||
| 385 | HTTP URLs are retrieved into a buffer containing the HTTP headers | 385 | HTTP URLs are retrieved into a buffer containing the HTTP headers |
| 386 | followed by the body. Since the headers are quasi-MIME, they may be | 386 | followed by the body. Since the headers are quasi-MIME, they may be |
| 387 | processed using the MIME library. @inforef{Top, The MIME library, | 387 | processed using the MIME library. @xref{Top,, Emacs MIME, |
| 388 | emacs-mime}. The URL package provides a function to do this in | 388 | emacs-mime, The Emacs MIME Manual}. The URL package provides a |
| 389 | general: | 389 | function to do this in general: |
| 390 | 390 | ||
| 391 | @defun url-decode-text-part handle &optional coding | 391 | @defun url-decode-text-part handle &optional coding |
| 392 | This function decodes charset-encoded text in the current buffer. In | 392 | This function decodes charset-encoded text in the current buffer. In |
| @@ -414,8 +414,8 @@ file://@var{user}:@var{password}@@@var{host}:@var{port}/@var{file} | |||
| 414 | @end example | 414 | @end example |
| 415 | 415 | ||
| 416 | These schemes are defined in RFC 1808. | 416 | These schemes are defined in RFC 1808. |
| 417 | @samp{ftp:} and @samp{file:} are synonomous in this library. They | 417 | @samp{ftp:} and @samp{file:} are synonymous in this library. They |
| 418 | allow reading arbitary files from hosts. Either @samp{ange-ftp} | 418 | allow reading arbitrary files from hosts. Either @samp{ange-ftp} |
| 419 | (Emacs) or @samp{efs} (XEmacs) is used to retrieve them from remote | 419 | (Emacs) or @samp{efs} (XEmacs) is used to retrieve them from remote |
| 420 | hosts. Local files are accessed directly. | 420 | hosts. Local files are accessed directly. |
| 421 | 421 | ||
| @@ -451,13 +451,13 @@ Info URLs are not officially defined. They invoke | |||
| 451 | @cindex email | 451 | @cindex email |
| 452 | A mailto URL will send an email message to the address in the | 452 | A mailto URL will send an email message to the address in the |
| 453 | URL, for example @samp{mailto:foo@@bar.com} would compose a | 453 | URL, for example @samp{mailto:foo@@bar.com} would compose a |
| 454 | message to @samp{foo@@bar.com}. | 454 | message to @samp{foo@@bar.com}. |
| 455 | 455 | ||
| 456 | @defopt url-mail-command | 456 | @defopt url-mail-command |
| 457 | @vindex mail-user-agent | 457 | @vindex mail-user-agent |
| 458 | The function called whenever url needs to send mail. This should | 458 | The function called whenever url needs to send mail. This should |
| 459 | normally be left to default from @var{mail-user-agent}. @xref{Mail | 459 | normally be left to default from @var{mail-user-agent}. @xref{Mail |
| 460 | Methods, , Mail-Composition Methods, emacs, GNU Emacs Manual}. | 460 | Methods, , Mail-Composition Methods, emacs, The GNU Emacs Manual}. |
| 461 | @end defopt | 461 | @end defopt |
| 462 | 462 | ||
| 463 | An @samp{X-Url-From} header field containing the URL of the document | 463 | An @samp{X-Url-From} header field containing the URL of the document |
| @@ -468,7 +468,7 @@ The form of a mailto URL is | |||
| 468 | @example | 468 | @example |
| 469 | @samp{mailto:@var{mailbox}[?@var{header}=@var{contents}[&@var{header}=@var{contents}]]} | 469 | @samp{mailto:@var{mailbox}[?@var{header}=@var{contents}[&@var{header}=@var{contents}]]} |
| 470 | @end example | 470 | @end example |
| 471 | @noindent where an arbitary number of @var{header}s can be added. If the | 471 | @noindent where an arbitrary number of @var{header}s can be added. If the |
| 472 | @var{header} is @samp{body}, then @var{contents} is put in the body | 472 | @var{header} is @samp{body}, then @var{contents} is put in the body |
| 473 | otherwise a @var{header} header field is created with @var{contents} | 473 | otherwise a @var{header} header field is created with @var{contents} |
| 474 | as its contents. Note that the URL library does not consider any | 474 | as its contents. Note that the URL library does not consider any |
| @@ -493,11 +493,11 @@ fields may be included in news URLs though they are properly only | |||
| 493 | allowed for nntp an snews. | 493 | allowed for nntp an snews. |
| 494 | 494 | ||
| 495 | @table @samp | 495 | @table @samp |
| 496 | @item news:@var{newsgroup} | 496 | @item news:@var{newsgroup} |
| 497 | Retrieves a list of messages in @var{newsgroup}; | 497 | Retrieves a list of messages in @var{newsgroup}; |
| 498 | @item news:@var{message-id} | 498 | @item news:@var{message-id} |
| 499 | Retrieves the message with the given @var{message-id}; | 499 | Retrieves the message with the given @var{message-id}; |
| 500 | @item news:* | 500 | @item news:* |
| 501 | Retrieves a list of all available newsgroups; | 501 | Retrieves a list of all available newsgroups; |
| 502 | @item nntp://@var{host}:@var{port}/@var{newsgroup} | 502 | @item nntp://@var{host}:@var{port}/@var{newsgroup} |
| 503 | @itemx nntp://@var{host}:@var{port}/@var{message-id} | 503 | @itemx nntp://@var{host}:@var{port}/@var{message-id} |
| @@ -510,7 +510,7 @@ Similar to the @samp{news} versions. | |||
| 510 | @samp{snews} is the same as @samp{nntp} except that the default port | 510 | @samp{snews} is the same as @samp{nntp} except that the default port |
| 511 | is :563. | 511 | is :563. |
| 512 | @cindex SSL | 512 | @cindex SSL |
| 513 | (It is tunnelled through SSL.) | 513 | (It is tunneled through SSL.) |
| 514 | 514 | ||
| 515 | An @samp{nntp} URL is the same as a news URL, except that the URL may | 515 | An @samp{nntp} URL is the same as a news URL, except that the URL may |
| 516 | specify an article by its number. | 516 | specify an article by its number. |
| @@ -550,9 +550,9 @@ Well-known ports are used if the URL does not specify a port. | |||
| 550 | @cindex IRC | 550 | @cindex IRC |
| 551 | @cindex Internet Relay Chat | 551 | @cindex Internet Relay Chat |
| 552 | @cindex ZEN IRC | 552 | @cindex ZEN IRC |
| 553 | @c Fixme: reference (was http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt) | 553 | @c Fixme: reference (was http://www.w3.org/Addressing/draft-mirashi-url-irc-01.txt) |
| 554 | @dfn{Internet Relay Chat} (IRC) is handled by handing off the @sc{irc} | 554 | @dfn{Internet Relay Chat} (IRC) is handled by handing off the @sc{irc} |
| 555 | session to a function named in @code{url-irc-function}. | 555 | session to a function named in @code{url-irc-function}. |
| 556 | 556 | ||
| 557 | @defopt url-irc-function | 557 | @defopt url-irc-function |
| 558 | A function to actually open an IRC connection. | 558 | A function to actually open an IRC connection. |
| @@ -582,7 +582,7 @@ including parameters. It defaults to | |||
| 582 | @samp{text/plain;charset=US-ASCII}. The @samp{text/plain} can be | 582 | @samp{text/plain;charset=US-ASCII}. The @samp{text/plain} can be |
| 583 | omitted but the charset parameter supplied. If @samp{;base64} is | 583 | omitted but the charset parameter supplied. If @samp{;base64} is |
| 584 | present, the @var{data} are base64-encoded. | 584 | present, the @var{data} are base64-encoded. |
| 585 | 585 | ||
| 586 | @node nfs | 586 | @node nfs |
| 587 | @section nfs | 587 | @section nfs |
| 588 | @cindex NFS | 588 | @cindex NFS |
| @@ -658,11 +658,11 @@ the Lisp @code{man} function. | |||
| 658 | @chapter Defining New URLs | 658 | @chapter Defining New URLs |
| 659 | 659 | ||
| 660 | @menu | 660 | @menu |
| 661 | * Naming conventions:: | 661 | * Naming conventions:: |
| 662 | * Required functions:: | 662 | * Required functions:: |
| 663 | * Optional functions:: | 663 | * Optional functions:: |
| 664 | * Asynchronous fetching:: | 664 | * Asynchronous fetching:: |
| 665 | * Supporting file-name-handlers:: | 665 | * Supporting file-name-handlers:: |
| 666 | @end menu | 666 | @end menu |
| 667 | 667 | ||
| 668 | @node Naming conventions | 668 | @node Naming conventions |
| @@ -684,10 +684,10 @@ the Lisp @code{man} function. | |||
| 684 | @chapter General Facilities | 684 | @chapter General Facilities |
| 685 | 685 | ||
| 686 | @menu | 686 | @menu |
| 687 | * Disk Caching:: | 687 | * Disk Caching:: |
| 688 | * Proxies:: | 688 | * Proxies:: |
| 689 | * Gateways in general:: | 689 | * Gateways in general:: |
| 690 | * History:: | 690 | * History:: |
| 691 | @end menu | 691 | @end menu |
| 692 | 692 | ||
| 693 | @node Disk Caching | 693 | @node Disk Caching |
| @@ -761,7 +761,7 @@ more likely to conflict with other files. | |||
| 761 | @end smallexample | 761 | @end smallexample |
| 762 | @end defun | 762 | @end defun |
| 763 | 763 | ||
| 764 | @c Fixme: never actually used currently? | 764 | @c Fixme: never actually used currently? |
| 765 | @c @defopt url-standalone-mode | 765 | @c @defopt url-standalone-mode |
| 766 | @c @cindex Relying on cache | 766 | @c @cindex Relying on cache |
| 767 | @c @cindex Cache only mode | 767 | @c @cindex Cache only mode |
| @@ -783,7 +783,7 @@ more likely to conflict with other files. | |||
| 783 | @node Proxies | 783 | @node Proxies |
| 784 | @section Proxies and Gatewaying | 784 | @section Proxies and Gatewaying |
| 785 | 785 | ||
| 786 | @c fixme: check/document url-ns stuff | 786 | @c fixme: check/document url-ns stuff |
| 787 | @cindex proxy servers | 787 | @cindex proxy servers |
| 788 | @cindex proxies | 788 | @cindex proxies |
| 789 | @cindex environment variables | 789 | @cindex environment variables |
| @@ -815,7 +815,7 @@ NO_PROXY="*.aventail.com,home.com,.seanet.com" | |||
| 815 | @noindent says to contact all machines in the @samp{aventail.com} and | 815 | @noindent says to contact all machines in the @samp{aventail.com} and |
| 816 | @samp{seanet.com} domains directly, as well as the machine named | 816 | @samp{seanet.com} domains directly, as well as the machine named |
| 817 | @samp{home.com}. If @code{NO_PROXY} isn't defined, @code{no_PROXY} | 817 | @samp{home.com}. If @code{NO_PROXY} isn't defined, @code{no_PROXY} |
| 818 | and @code{no_proxy} are also tried, in that order. | 818 | and @code{no_proxy} are also tried, in that order. |
| 819 | 819 | ||
| 820 | Proxies may also be specified directly in Lisp. | 820 | Proxies may also be specified directly in Lisp. |
| 821 | 821 | ||
| @@ -940,7 +940,7 @@ This specifies the default server, it takes the form | |||
| 940 | where @var{version} can be either 4 or 5. | 940 | where @var{version} can be either 4 or 5. |
| 941 | @end defopt | 941 | @end defopt |
| 942 | @defvar socks-password | 942 | @defvar socks-password |
| 943 | If this is @code{nil} then you will be asked for the passward, | 943 | If this is @code{nil} then you will be asked for the password, |
| 944 | otherwise it will be used as the password for authenticating you to | 944 | otherwise it will be used as the password for authenticating you to |
| 945 | the @sc{socks} server. | 945 | the @sc{socks} server. |
| 946 | @end defvar | 946 | @end defvar |
| @@ -980,9 +980,9 @@ This the @samp{nslookup} program. It is @code{"nslookup"} by default. | |||
| 980 | @end defopt | 980 | @end defopt |
| 981 | 981 | ||
| 982 | @menu | 982 | @menu |
| 983 | * Suppressing network connexions:: | 983 | * Suppressing network connexions:: |
| 984 | @end menu | 984 | @end menu |
| 985 | @c * Broken hostname resolution:: | 985 | @c * Broken hostname resolution:: |
| 986 | 986 | ||
| 987 | @node Suppressing network connexions | 987 | @node Suppressing network connexions |
| 988 | @subsection Suppressing Network Connexions | 988 | @subsection Suppressing Network Connexions |
| @@ -1010,7 +1010,7 @@ opened by the URL library. | |||
| 1010 | @c @cindex resolver, hostname | 1010 | @c @cindex resolver, hostname |
| 1011 | @c Some C libraries do not include the hostname resolver routines in | 1011 | @c Some C libraries do not include the hostname resolver routines in |
| 1012 | @c their static libraries. If Emacs was linked statically, and was not | 1012 | @c their static libraries. If Emacs was linked statically, and was not |
| 1013 | @c linked with the resolver libraries, it wil not be able to get to any | 1013 | @c linked with the resolver libraries, it will not be able to get to any |
| 1014 | @c machines off the local network. This is characterized by being able | 1014 | @c machines off the local network. This is characterized by being able |
| 1015 | @c to reach someplace with a raw ip number, but not its hostname | 1015 | @c to reach someplace with a raw ip number, but not its hostname |
| 1016 | @c (@url{http://129.79.254.191/} works, but | 1016 | @c (@url{http://129.79.254.191/} works, but |
| @@ -1052,8 +1052,8 @@ The history `list' is actually a hash table, | |||
| 1052 | strings. The times are in the format returned by @code{current-time}. | 1052 | strings. The times are in the format returned by @code{current-time}. |
| 1053 | 1053 | ||
| 1054 | @defun url-history-update-url url time | 1054 | @defun url-history-update-url url time |
| 1055 | This function updates the hsitory table with an entry for @var{url} | 1055 | This function updates the history table with an entry for @var{url} |
| 1056 | accessed at the gievn @var{time}. | 1056 | accessed at the given @var{time}. |
| 1057 | @end defun | 1057 | @end defun |
| 1058 | 1058 | ||
| 1059 | @defopt url-history-track | 1059 | @defopt url-history-track |
| @@ -1144,7 +1144,7 @@ function taking a single argument (the prompt) and returning @code{t} | |||
| 1144 | only if an affirmative answer is given. | 1144 | only if an affirmative answer is given. |
| 1145 | @end defopt | 1145 | @end defopt |
| 1146 | @defopt url-gateway-method | 1146 | @defopt url-gateway-method |
| 1147 | @c fixme: describe gatewaying | 1147 | @c fixme: describe gatewaying |
| 1148 | A symbol specifying the type of gateway support to use fro connexions | 1148 | A symbol specifying the type of gateway support to use fro connexions |
| 1149 | from the local machine. The supported methods are: | 1149 | from the local machine. The supported methods are: |
| 1150 | 1150 | ||
diff --git a/src/ChangeLog b/src/ChangeLog index 38a079989be..8d09c5bfd2f 100644 --- a/src/ChangeLog +++ b/src/ChangeLog | |||
| @@ -1,3 +1,159 @@ | |||
| 1 | 2004-12-22 Richard M. Stallman <rms@gnu.org> | ||
| 2 | |||
| 3 | * emacs.c (main): If batch mode, set Vundo_outer_limit to nil. | ||
| 4 | |||
| 5 | * lisp.h (Vundo_outer_limit): Fix decl. | ||
| 6 | |||
| 7 | * undo.c (Vundo_outer_limit): Replaces undo_outer_limit. | ||
| 8 | Uses changed. | ||
| 9 | (syms_of_undo): Initialize appropriately. | ||
| 10 | (truncate_undo_list): If it's nil, there's no limit. | ||
| 11 | |||
| 12 | 2004-12-22 Kenichi Handa <handa@m17n.org> | ||
| 13 | |||
| 14 | * xselect.c (Fx_get_cut_buffer_internal): Return a unibyte string. | ||
| 15 | |||
| 16 | 2004-12-21 Richard M. Stallman <rms@gnu.org> | ||
| 17 | |||
| 18 | * eval.c (unwind_to_catch): Clear immediate_quit. | ||
| 19 | |||
| 20 | * xdisp.c (get_next_display_element): Display codes 8a0 and 8ad | ||
| 21 | specially as `\ ' and `\-'. | ||
| 22 | |||
| 23 | * keyboard.c (kbd_buffer_store_event_hold): | ||
| 24 | In the code for while-no-input, handle immediate_quit. | ||
| 25 | |||
| 26 | * alloc.c (Fgarbage_collect): Update call to truncate_undo_list. | ||
| 27 | Call that at the very start. | ||
| 28 | (undo_limit, undo_strong_limit, undo_outer_limit): Moved to undo.c. | ||
| 29 | (syms_of_alloc): Don't define undo-limit, | ||
| 30 | undo-strong-limit and undo-outer-limit here. | ||
| 31 | |||
| 32 | * undo.c (truncate_undo_list): Return void. | ||
| 33 | Take just one argument, the buffer. | ||
| 34 | Make it current, and inhibit recursive GC. | ||
| 35 | Access and update the undo list directly; return void. | ||
| 36 | Refer to the undo...limit variables directly. | ||
| 37 | Test undo_outer_limit only after counting the whole current command. | ||
| 38 | When it's exceeded, call the function in undo-outer-limit-function. | ||
| 39 | (undo_limit, undo_strong_limit, undo_outer_limit): From alloc.c. | ||
| 40 | (Vundo_outer_limit_function): New variable. | ||
| 41 | (syms_of_undo): Define undo-limit, undo-strong-limit | ||
| 42 | and undo-outer-limit here, and undo-outer-limit-function. | ||
| 43 | Doc fixes. | ||
| 44 | |||
| 45 | * lisp.h (truncate_undo_list): Update decl. | ||
| 46 | |||
| 47 | 2004-12-21 Piet van Oostrum <piet@cs.uu.nl> | ||
| 48 | |||
| 49 | * fileio.c (Fread_file_name): Delete duplicates in | ||
| 50 | file-name-history when history_delete_duplicates is true. | ||
| 51 | |||
| 52 | 2004-12-20 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 53 | |||
| 54 | * macterm.c (mac_do_list_fonts): Fix memory leak | ||
| 55 | |||
| 56 | 2004-12-20 Richard M. Stallman <rms@gnu.org> | ||
| 57 | |||
| 58 | * regex.c (re_match_2_internal) <symend, wordend>: | ||
| 59 | Fix calls to UPDATE_SYNTAX_TABLE_FORWARD. | ||
| 60 | |||
| 61 | 2004-12-18 YAMAMOTO Mitsuharu <mituharu@math.s.chiba-u.ac.jp> | ||
| 62 | |||
| 63 | * macterm.c (endif, x_font_name_to_mac_font_name): Use | ||
| 64 | maccentraleurroman instead of maccentraleuropean | ||
| 65 | (mac_c_string_match, mac_do_list_fonts): Speed up font search by | ||
| 66 | quickly finding a specific font without needing regexps. | ||
| 67 | |||
| 68 | 2004-12-15 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 69 | |||
| 70 | * syssignal.h: Declare main_thread. | ||
| 71 | (SIGNAL_THREAD_CHECK): New macro. | ||
| 72 | |||
| 73 | * keyboard.c (input_available_signal): Move thread checking code | ||
| 74 | to macro SIGNAL_THREAD_CHECK and call that macro. | ||
| 75 | (interrupt_signal): Call SIGNAL_THREAD_CHECK. | ||
| 76 | |||
| 77 | * alloc.c (uninterrupt_malloc): Move main_thread to emacs.c. | ||
| 78 | |||
| 79 | * emacs.c: Define main_thread. | ||
| 80 | (main): Initialize main_thread. | ||
| 81 | (handle_USR1_signal, handle_USR2_signal, fatal_error_signal) | ||
| 82 | (memory_warning_signal): Call SIGNAL_THREAD_CHECK. | ||
| 83 | |||
| 84 | * floatfns.c (float_error): Call SIGNAL_THREAD_CHECK. | ||
| 85 | |||
| 86 | * dispnew.c (window_change_signal): Call SIGNAL_THREAD_CHECK. | ||
| 87 | |||
| 88 | * sysdep.c (select_alarm): Call SIGNAL_THREAD_CHECK. | ||
| 89 | |||
| 90 | * process.c (send_process_trap, sigchld_handler): Call | ||
| 91 | SIGNAL_THREAD_CHECK. | ||
| 92 | |||
| 93 | * data.c (arith_error): Call SIGNAL_THREAD_CHECK. | ||
| 94 | |||
| 95 | * atimer.c (alarm_signal_handler): Call SIGNAL_THREAD_CHECK. | ||
| 96 | |||
| 97 | * xterm.c (xg_scroll_callback): Update XG_LAST_SB_DATA before | ||
| 98 | returning when xg_ignore_gtk_scrollbar is true. | ||
| 99 | |||
| 100 | 2004-12-14 Kim F. Storm <storm@cua.dk> | ||
| 101 | |||
| 102 | * keyboard.c (read_char): Save and restore echo_string when | ||
| 103 | handling input method. | ||
| 104 | |||
| 105 | 2004-12-13 Richard M. Stallman <rms@gnu.org> | ||
| 106 | |||
| 107 | * eval.c (syms_of_eval) <quit-flag>: Doc fix. | ||
| 108 | |||
| 109 | * keyboard.c (Vthrow_on_input): New variable. | ||
| 110 | (syms_of_keyboard): Defvar and initialize it. | ||
| 111 | (kbd_buffer_store_event_hold): Handle Vthrow_on_input. | ||
| 112 | |||
| 113 | * lisp.h (QUIT): Check for Vthrow_on_input. | ||
| 114 | (Vthrow_on_input): Declare it. | ||
| 115 | |||
| 116 | 2004-12-13 Kim F. Storm <storm@cua.dk> | ||
| 117 | |||
| 118 | * xdisp.c (set_iterator_to_next): Reset stop_charpos after display | ||
| 119 | vector. | ||
| 120 | |||
| 121 | 2004-12-12 Richard M. Stallman <rms@gnu.org> | ||
| 122 | |||
| 123 | * indent.c (Fvertical_motion): Call move_it_by_lines even if LINES = 0. | ||
| 124 | |||
| 125 | * minibuf.c (Fall_completions): Add var `zero' and use it in loop. | ||
| 126 | (Ftry_completion): Really use outer `zero'; eliminate inner one. | ||
| 127 | |||
| 128 | 2004-12-12 Kenichi Handa <handa@m17n.org> | ||
| 129 | |||
| 130 | * term.c (encode_terminal_code): Fix previous change. | ||
| 131 | |||
| 132 | 2004-12-11 Stefan Monnier <monnier@iro.umontreal.ca> | ||
| 133 | |||
| 134 | * keyboard.c (handle_async_input): Remove pthread mutex handling. | ||
| 135 | (input_available_signal): Move pthread thingy to !SYNC_INPUT branch. | ||
| 136 | |||
| 137 | * syntax.c (Fforward_word): Avoid non-idempotent side-effects | ||
| 138 | in macro arguments. | ||
| 139 | |||
| 140 | * minibuf.c (Ftry_completion, Fall_completions): Don't use | ||
| 141 | XFASTINT blindly. | ||
| 142 | |||
| 143 | * emacs.c (main, Fdump_emacs): Don't touch malloc hooks if SYNC_INPUT. | ||
| 144 | |||
| 145 | 2004-12-11 Jan Dj,Ad(Brv <jan.h.d@swipnet.se> | ||
| 146 | |||
| 147 | * w32term.c (x_calc_absolute_position): Remove calculation of | ||
| 148 | difference between inner and outer window. Don't subtract difference | ||
| 149 | for left and top calculations. | ||
| 150 | |||
| 151 | * xterm.c (x_calc_absolute_position): Don't subtract outer_pixel_diff | ||
| 152 | for left and top calculations. Remove call to x_real_positions. | ||
| 153 | [Bug report by Drew Adams in November] | ||
| 154 | (x_check_expected_move): Do not set change_gravity to 1 when calling | ||
| 155 | x_set_offset. | ||
| 156 | |||
| 1 | 2004-12-08 Richard M. Stallman <rms@gnu.org> | 157 | 2004-12-08 Richard M. Stallman <rms@gnu.org> |
| 2 | 158 | ||
| 3 | * xdisp.c (get_next_display_element): Use `escape-glyph' for | 159 | * xdisp.c (get_next_display_element): Use `escape-glyph' for |
| @@ -17,8 +173,8 @@ | |||
| 17 | * emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around | 173 | * emacs.c (Fdump_emacs): Add ! defined (SYSTEM_MALLOC) around |
| 18 | reset_malloc_hooks. | 174 | reset_malloc_hooks. |
| 19 | 175 | ||
| 20 | * keyboard.c (handle_async_input, input_available_signal): Add | 176 | * keyboard.c (handle_async_input, input_available_signal): |
| 21 | ! defined (SYSTEM_MALLOC) around thread code. | 177 | Add ! defined (SYSTEM_MALLOC) around thread code. |
| 22 | 178 | ||
| 23 | * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC. | 179 | * alloc.c: Add comment about the reason for (UN)BLOCK_INPUT_ALLOC. |
| 24 | 180 | ||
| @@ -56,12 +212,11 @@ | |||
| 56 | * emacs.c (Fdump_emacs): Call reset_malloc_hooks. | 212 | * emacs.c (Fdump_emacs): Call reset_malloc_hooks. |
| 57 | 213 | ||
| 58 | * keyboard.c: Conditionally include pthread.h | 214 | * keyboard.c: Conditionally include pthread.h |
| 59 | (handle_async_inpu, input_available_signalt): If not in the main | 215 | (handle_async_input, input_available_signalt): If not in the main |
| 60 | thread, block signal, send signal to main thread and return. | 216 | thread, block signal, send signal to main thread and return. |
| 61 | 217 | ||
| 62 | * gtkutil.c (xg_get_file_with_chooser): Handle local files only. | 218 | * gtkutil.c (xg_get_file_with_chooser): Handle local files only. |
| 63 | Set current folder in file chooser if default_filename is a | 219 | Set current folder in file chooser if default_filename is a directory. |
| 64 | directory. | ||
| 65 | 220 | ||
| 66 | 2004-12-05 Stefan Monnier <monnier@iro.umontreal.ca> | 221 | 2004-12-05 Stefan Monnier <monnier@iro.umontreal.ca> |
| 67 | 222 | ||
| @@ -92,6 +247,7 @@ | |||
| 92 | * eval.c (Fcalled_interactively_p): Don't check INTERACTIVE. | 247 | * eval.c (Fcalled_interactively_p): Don't check INTERACTIVE. |
| 93 | (interactive_p): Skip Scalled_interactively_p frames | 248 | (interactive_p): Skip Scalled_interactively_p frames |
| 94 | like Sinteractive_p frames. | 249 | like Sinteractive_p frames. |
| 250 | (unwind_to_catch): Clear handling_signal. | ||
| 95 | 251 | ||
| 96 | * data.c (Fmake_variable_buffer_local): Doc fix. | 252 | * data.c (Fmake_variable_buffer_local): Doc fix. |
| 97 | (Fmake_local_variable): Doc fix. | 253 | (Fmake_local_variable): Doc fix. |
diff --git a/src/alloc.c b/src/alloc.c index 4cf5de46d21..7a6a1344d6c 100644 --- a/src/alloc.c +++ b/src/alloc.c | |||
| @@ -99,7 +99,7 @@ extern __malloc_size_t __malloc_extra_blocks; | |||
| 99 | If Emacs sets malloc hooks (! SYSTEM_MALLOC) and the emacs_blocked_* | 99 | If Emacs sets malloc hooks (! SYSTEM_MALLOC) and the emacs_blocked_* |
| 100 | functions below are called from malloc, there is a chance that one | 100 | functions below are called from malloc, there is a chance that one |
| 101 | of these threads preempts the Emacs main thread and the hook variables | 101 | of these threads preempts the Emacs main thread and the hook variables |
| 102 | end up in a inconsistent state. So we have a mutex to prevent that (note | 102 | end up in an inconsistent state. So we have a mutex to prevent that (note |
| 103 | that the backend handles concurrent access to malloc within its own threads | 103 | that the backend handles concurrent access to malloc within its own threads |
| 104 | but Emacs code running in the main thread is not included in that control). | 104 | but Emacs code running in the main thread is not included in that control). |
| 105 | 105 | ||
| @@ -109,7 +109,6 @@ extern __malloc_size_t __malloc_extra_blocks; | |||
| 109 | To prevent that, we only call BLOCK/UNBLOCK from the main thread. */ | 109 | To prevent that, we only call BLOCK/UNBLOCK from the main thread. */ |
| 110 | 110 | ||
| 111 | static pthread_mutex_t alloc_mutex; | 111 | static pthread_mutex_t alloc_mutex; |
| 112 | pthread_t main_thread; | ||
| 113 | 112 | ||
| 114 | #define BLOCK_INPUT_ALLOC \ | 113 | #define BLOCK_INPUT_ALLOC \ |
| 115 | do \ | 114 | do \ |
| @@ -201,12 +200,6 @@ extern | |||
| 201 | #endif /* VIRT_ADDR_VARIES */ | 200 | #endif /* VIRT_ADDR_VARIES */ |
| 202 | int malloc_sbrk_unused; | 201 | int malloc_sbrk_unused; |
| 203 | 202 | ||
| 204 | /* Two limits controlling how much undo information to keep. */ | ||
| 205 | |||
| 206 | EMACS_INT undo_limit; | ||
| 207 | EMACS_INT undo_strong_limit; | ||
| 208 | EMACS_INT undo_outer_limit; | ||
| 209 | |||
| 210 | /* Number of live and free conses etc. */ | 203 | /* Number of live and free conses etc. */ |
| 211 | 204 | ||
| 212 | static int total_conses, total_markers, total_symbols, total_vector_size; | 205 | static int total_conses, total_markers, total_symbols, total_vector_size; |
| @@ -1311,8 +1304,6 @@ uninterrupt_malloc () | |||
| 1311 | pthread_mutexattr_init (&attr); | 1304 | pthread_mutexattr_init (&attr); |
| 1312 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); | 1305 | pthread_mutexattr_settype (&attr, PTHREAD_MUTEX_RECURSIVE); |
| 1313 | pthread_mutex_init (&alloc_mutex, &attr); | 1306 | pthread_mutex_init (&alloc_mutex, &attr); |
| 1314 | |||
| 1315 | main_thread = pthread_self (); | ||
| 1316 | #endif /* HAVE_GTK_AND_PTHREAD */ | 1307 | #endif /* HAVE_GTK_AND_PTHREAD */ |
| 1317 | 1308 | ||
| 1318 | if (__free_hook != emacs_blocked_free) | 1309 | if (__free_hook != emacs_blocked_free) |
| @@ -4648,13 +4639,48 @@ returns nil, because real GC can't be done. */) | |||
| 4648 | if (abort_on_gc) | 4639 | if (abort_on_gc) |
| 4649 | abort (); | 4640 | abort (); |
| 4650 | 4641 | ||
| 4651 | EMACS_GET_TIME (t1); | ||
| 4652 | |||
| 4653 | /* Can't GC if pure storage overflowed because we can't determine | 4642 | /* Can't GC if pure storage overflowed because we can't determine |
| 4654 | if something is a pure object or not. */ | 4643 | if something is a pure object or not. */ |
| 4655 | if (pure_bytes_used_before_overflow) | 4644 | if (pure_bytes_used_before_overflow) |
| 4656 | return Qnil; | 4645 | return Qnil; |
| 4657 | 4646 | ||
| 4647 | /* Don't keep undo information around forever. | ||
| 4648 | Do this early on, so it is no problem if the user quits. */ | ||
| 4649 | { | ||
| 4650 | register struct buffer *nextb = all_buffers; | ||
| 4651 | |||
| 4652 | while (nextb) | ||
| 4653 | { | ||
| 4654 | /* If a buffer's undo list is Qt, that means that undo is | ||
| 4655 | turned off in that buffer. Calling truncate_undo_list on | ||
| 4656 | Qt tends to return NULL, which effectively turns undo back on. | ||
| 4657 | So don't call truncate_undo_list if undo_list is Qt. */ | ||
| 4658 | if (! EQ (nextb->undo_list, Qt)) | ||
| 4659 | truncate_undo_list (nextb); | ||
| 4660 | |||
| 4661 | /* Shrink buffer gaps, but skip indirect and dead buffers. */ | ||
| 4662 | if (nextb->base_buffer == 0 && !NILP (nextb->name)) | ||
| 4663 | { | ||
| 4664 | /* If a buffer's gap size is more than 10% of the buffer | ||
| 4665 | size, or larger than 2000 bytes, then shrink it | ||
| 4666 | accordingly. Keep a minimum size of 20 bytes. */ | ||
| 4667 | int size = min (2000, max (20, (nextb->text->z_byte / 10))); | ||
| 4668 | |||
| 4669 | if (nextb->text->gap_size > size) | ||
| 4670 | { | ||
| 4671 | struct buffer *save_current = current_buffer; | ||
| 4672 | current_buffer = nextb; | ||
| 4673 | make_gap (-(nextb->text->gap_size - size)); | ||
| 4674 | current_buffer = save_current; | ||
| 4675 | } | ||
| 4676 | } | ||
| 4677 | |||
| 4678 | nextb = nextb->next; | ||
| 4679 | } | ||
| 4680 | } | ||
| 4681 | |||
| 4682 | EMACS_GET_TIME (t1); | ||
| 4683 | |||
| 4658 | /* In case user calls debug_print during GC, | 4684 | /* In case user calls debug_print during GC, |
| 4659 | don't let that cause a recursive GC. */ | 4685 | don't let that cause a recursive GC. */ |
| 4660 | consing_since_gc = 0; | 4686 | consing_since_gc = 0; |
| @@ -4693,42 +4719,6 @@ returns nil, because real GC can't be done. */) | |||
| 4693 | 4719 | ||
| 4694 | shrink_regexp_cache (); | 4720 | shrink_regexp_cache (); |
| 4695 | 4721 | ||
| 4696 | /* Don't keep undo information around forever. */ | ||
| 4697 | { | ||
| 4698 | register struct buffer *nextb = all_buffers; | ||
| 4699 | |||
| 4700 | while (nextb) | ||
| 4701 | { | ||
| 4702 | /* If a buffer's undo list is Qt, that means that undo is | ||
| 4703 | turned off in that buffer. Calling truncate_undo_list on | ||
| 4704 | Qt tends to return NULL, which effectively turns undo back on. | ||
| 4705 | So don't call truncate_undo_list if undo_list is Qt. */ | ||
| 4706 | if (! EQ (nextb->undo_list, Qt)) | ||
| 4707 | nextb->undo_list | ||
| 4708 | = truncate_undo_list (nextb->undo_list, undo_limit, | ||
| 4709 | undo_strong_limit, undo_outer_limit); | ||
| 4710 | |||
| 4711 | /* Shrink buffer gaps, but skip indirect and dead buffers. */ | ||
| 4712 | if (nextb->base_buffer == 0 && !NILP (nextb->name)) | ||
| 4713 | { | ||
| 4714 | /* If a buffer's gap size is more than 10% of the buffer | ||
| 4715 | size, or larger than 2000 bytes, then shrink it | ||
| 4716 | accordingly. Keep a minimum size of 20 bytes. */ | ||
| 4717 | int size = min (2000, max (20, (nextb->text->z_byte / 10))); | ||
| 4718 | |||
| 4719 | if (nextb->text->gap_size > size) | ||
| 4720 | { | ||
| 4721 | struct buffer *save_current = current_buffer; | ||
| 4722 | current_buffer = nextb; | ||
| 4723 | make_gap (-(nextb->text->gap_size - size)); | ||
| 4724 | current_buffer = save_current; | ||
| 4725 | } | ||
| 4726 | } | ||
| 4727 | |||
| 4728 | nextb = nextb->next; | ||
| 4729 | } | ||
| 4730 | } | ||
| 4731 | |||
| 4732 | gc_in_progress = 1; | 4722 | gc_in_progress = 1; |
| 4733 | 4723 | ||
| 4734 | /* clear_marks (); */ | 4724 | /* clear_marks (); */ |
| @@ -6004,29 +5994,6 @@ prevent garbage collection during a part of the program. */); | |||
| 6004 | doc: /* Non-nil means loading Lisp code in order to dump an executable. | 5994 | doc: /* Non-nil means loading Lisp code in order to dump an executable. |
| 6005 | This means that certain objects should be allocated in shared (pure) space. */); | 5995 | This means that certain objects should be allocated in shared (pure) space. */); |
| 6006 | 5996 | ||
| 6007 | DEFVAR_INT ("undo-limit", &undo_limit, | ||
| 6008 | doc: /* Keep no more undo information once it exceeds this size. | ||
| 6009 | This limit is applied when garbage collection happens. | ||
| 6010 | The size is counted as the number of bytes occupied, | ||
| 6011 | which includes both saved text and other data. */); | ||
| 6012 | undo_limit = 20000; | ||
| 6013 | |||
| 6014 | DEFVAR_INT ("undo-strong-limit", &undo_strong_limit, | ||
| 6015 | doc: /* Don't keep more than this much size of undo information. | ||
| 6016 | A previous command which pushes the undo list past this size | ||
| 6017 | is entirely forgotten when GC happens. | ||
| 6018 | The size is counted as the number of bytes occupied, | ||
| 6019 | which includes both saved text and other data. */); | ||
| 6020 | undo_strong_limit = 30000; | ||
| 6021 | |||
| 6022 | DEFVAR_INT ("undo-outer-limit", &undo_outer_limit, | ||
| 6023 | doc: /* Don't keep more than this much size of undo information. | ||
| 6024 | If the current command has produced more than this much undo information, | ||
| 6025 | GC discards it. This is a last-ditch limit to prevent memory overflow. | ||
| 6026 | The size is counted as the number of bytes occupied, | ||
| 6027 | which includes both saved text and other data. */); | ||
| 6028 | undo_outer_limit = 300000; | ||
| 6029 | |||
| 6030 | DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages, | 5997 | DEFVAR_BOOL ("garbage-collection-messages", &garbage_collection_messages, |
| 6031 | doc: /* Non-nil means display messages at start and end of garbage collection. */); | 5998 | doc: /* Non-nil means display messages at start and end of garbage collection. */); |
| 6032 | garbage_collection_messages = 0; | 5999 | garbage_collection_messages = 0; |
diff --git a/src/atimer.c b/src/atimer.c index 7410cad0244..ff5b8faaf36 100644 --- a/src/atimer.c +++ b/src/atimer.c | |||
| @@ -364,6 +364,8 @@ alarm_signal_handler (signo) | |||
| 364 | { | 364 | { |
| 365 | EMACS_TIME now; | 365 | EMACS_TIME now; |
| 366 | 366 | ||
| 367 | SIGNAL_THREAD_CHECK (signo); | ||
| 368 | |||
| 367 | EMACS_GET_TIME (now); | 369 | EMACS_GET_TIME (now); |
| 368 | pending_atimers = 0; | 370 | pending_atimers = 0; |
| 369 | 371 | ||
diff --git a/src/data.c b/src/data.c index afbca80181d..811619b58b3 100644 --- a/src/data.c +++ b/src/data.c | |||
| @@ -3366,6 +3366,7 @@ arith_error (signo) | |||
| 3366 | sigsetmask (SIGEMPTYMASK); | 3366 | sigsetmask (SIGEMPTYMASK); |
| 3367 | #endif /* not BSD4_1 */ | 3367 | #endif /* not BSD4_1 */ |
| 3368 | 3368 | ||
| 3369 | SIGNAL_THREAD_CHECK (signo); | ||
| 3369 | Fsignal (Qarith_error, Qnil); | 3370 | Fsignal (Qarith_error, Qnil); |
| 3370 | } | 3371 | } |
| 3371 | 3372 | ||
diff --git a/src/dispnew.c b/src/dispnew.c index f2fac47a7c2..6813cda5a71 100644 --- a/src/dispnew.c +++ b/src/dispnew.c | |||
| @@ -6005,6 +6005,9 @@ window_change_signal (signalnum) /* If we don't have an argument, */ | |||
| 6005 | 6005 | ||
| 6006 | struct tty_display_info *tty; | 6006 | struct tty_display_info *tty; |
| 6007 | 6007 | ||
| 6008 | signal (SIGWINCH, window_change_signal); | ||
| 6009 | SIGNAL_THREAD_CHECK (signalnum); | ||
| 6010 | |||
| 6008 | /* The frame size change obviously applies to a single | 6011 | /* The frame size change obviously applies to a single |
| 6009 | termcap-controlled terminal, but we can't decide which. | 6012 | termcap-controlled terminal, but we can't decide which. |
| 6010 | Therefore, we resize the frames corresponding to each tty. | 6013 | Therefore, we resize the frames corresponding to each tty. |
| @@ -6028,7 +6031,6 @@ window_change_signal (signalnum) /* If we don't have an argument, */ | |||
| 6028 | } | 6031 | } |
| 6029 | } | 6032 | } |
| 6030 | 6033 | ||
| 6031 | signal (SIGWINCH, window_change_signal); | ||
| 6032 | errno = old_errno; | 6034 | errno = old_errno; |
| 6033 | } | 6035 | } |
| 6034 | #endif /* SIGWINCH */ | 6036 | #endif /* SIGWINCH */ |
diff --git a/src/emacs.c b/src/emacs.c index fb7c573836a..b16ea78b9b8 100644 --- a/src/emacs.c +++ b/src/emacs.c | |||
| @@ -343,6 +343,14 @@ int fatal_error_in_progress; | |||
| 343 | 343 | ||
| 344 | void (*fatal_error_signal_hook) P_ ((void)); | 344 | void (*fatal_error_signal_hook) P_ ((void)); |
| 345 | 345 | ||
| 346 | #ifdef HAVE_GTK_AND_PTHREAD | ||
| 347 | /* When compiled with GTK and running under Gnome, multiple threads meay be | ||
| 348 | created. Keep track of our main thread to make sure signals are delivered | ||
| 349 | to it (see syssignal.h). */ | ||
| 350 | |||
| 351 | pthread_t main_thread; | ||
| 352 | #endif | ||
| 353 | |||
| 346 | 354 | ||
| 347 | #ifdef SIGUSR1 | 355 | #ifdef SIGUSR1 |
| 348 | SIGTYPE | 356 | SIGTYPE |
| @@ -351,6 +359,7 @@ handle_USR1_signal (sig) | |||
| 351 | { | 359 | { |
| 352 | struct input_event buf; | 360 | struct input_event buf; |
| 353 | 361 | ||
| 362 | SIGNAL_THREAD_CHECK (sig); | ||
| 354 | bzero (&buf, sizeof buf); | 363 | bzero (&buf, sizeof buf); |
| 355 | buf.kind = USER_SIGNAL_EVENT; | 364 | buf.kind = USER_SIGNAL_EVENT; |
| 356 | buf.frame_or_window = selected_frame; | 365 | buf.frame_or_window = selected_frame; |
| @@ -366,6 +375,7 @@ handle_USR2_signal (sig) | |||
| 366 | { | 375 | { |
| 367 | struct input_event buf; | 376 | struct input_event buf; |
| 368 | 377 | ||
| 378 | SIGNAL_THREAD_CHECK (sig); | ||
| 369 | bzero (&buf, sizeof buf); | 379 | bzero (&buf, sizeof buf); |
| 370 | buf.kind = USER_SIGNAL_EVENT; | 380 | buf.kind = USER_SIGNAL_EVENT; |
| 371 | buf.code = 1; | 381 | buf.code = 1; |
| @@ -380,6 +390,7 @@ SIGTYPE | |||
| 380 | fatal_error_signal (sig) | 390 | fatal_error_signal (sig) |
| 381 | int sig; | 391 | int sig; |
| 382 | { | 392 | { |
| 393 | SIGNAL_THREAD_CHECK (sig); | ||
| 383 | fatal_error_code = sig; | 394 | fatal_error_code = sig; |
| 384 | signal (sig, SIG_DFL); | 395 | signal (sig, SIG_DFL); |
| 385 | 396 | ||
| @@ -419,6 +430,7 @@ memory_warning_signal (sig) | |||
| 419 | int sig; | 430 | int sig; |
| 420 | { | 431 | { |
| 421 | signal (sig, memory_warning_signal); | 432 | signal (sig, memory_warning_signal); |
| 433 | SIGNAL_THREAD_CHECK (sig); | ||
| 422 | 434 | ||
| 423 | malloc_warning ("Operating system warns that virtual memory is running low.\n"); | 435 | malloc_warning ("Operating system warns that virtual memory is running low.\n"); |
| 424 | 436 | ||
| @@ -1024,10 +1036,16 @@ main (argc, argv | |||
| 1024 | Also call realloc and free for consistency. */ | 1036 | Also call realloc and free for consistency. */ |
| 1025 | free (realloc (malloc (4), 4)); | 1037 | free (realloc (malloc (4), 4)); |
| 1026 | 1038 | ||
| 1039 | # ifndef SYNC_INPUT | ||
| 1027 | /* Arrange to disable interrupt input inside malloc etc. */ | 1040 | /* Arrange to disable interrupt input inside malloc etc. */ |
| 1028 | uninterrupt_malloc (); | 1041 | uninterrupt_malloc (); |
| 1042 | # endif /* not SYNC_INPUT */ | ||
| 1029 | #endif /* not SYSTEM_MALLOC */ | 1043 | #endif /* not SYSTEM_MALLOC */ |
| 1030 | 1044 | ||
| 1045 | #ifdef HAVE_GTK_AND_PTHREAD | ||
| 1046 | main_thread = pthread_self (); | ||
| 1047 | #endif /* HAVE_GTK_AND_PTHREAD */ | ||
| 1048 | |||
| 1031 | #if defined (MSDOS) || defined (WINDOWSNT) | 1049 | #if defined (MSDOS) || defined (WINDOWSNT) |
| 1032 | /* We do all file input/output as binary files. When we need to translate | 1050 | /* We do all file input/output as binary files. When we need to translate |
| 1033 | newlines, we do that manually. */ | 1051 | newlines, we do that manually. */ |
| @@ -1116,7 +1134,10 @@ main (argc, argv | |||
| 1116 | /* Handle the -batch switch, which means don't do interactive display. */ | 1134 | /* Handle the -batch switch, which means don't do interactive display. */ |
| 1117 | noninteractive = 0; | 1135 | noninteractive = 0; |
| 1118 | if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) | 1136 | if (argmatch (argv, argc, "-batch", "--batch", 5, NULL, &skip_args)) |
| 1119 | noninteractive = 1; | 1137 | { |
| 1138 | noninteractive = 1; | ||
| 1139 | Vundo_outer_limit = Qnil; | ||
| 1140 | } | ||
| 1120 | if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args)) | 1141 | if (argmatch (argv, argc, "-script", "--script", 3, &junk, &skip_args)) |
| 1121 | { | 1142 | { |
| 1122 | noninteractive = 1; /* Set batch mode. */ | 1143 | noninteractive = 1; /* Set batch mode. */ |
| @@ -2237,7 +2258,7 @@ You must run Emacs in batch mode in order to dump it. */) | |||
| 2237 | memory_warnings (my_edata, malloc_warning); | 2258 | memory_warnings (my_edata, malloc_warning); |
| 2238 | #endif /* not WINDOWSNT */ | 2259 | #endif /* not WINDOWSNT */ |
| 2239 | #endif | 2260 | #endif |
| 2240 | #if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | 2261 | #if !defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) && !defined SYNC_INPUT |
| 2241 | /* Pthread may call malloc before main, and then we will get an endless | 2262 | /* Pthread may call malloc before main, and then we will get an endless |
| 2242 | loop, because pthread_self (see alloc.c) calls malloc the first time | 2263 | loop, because pthread_self (see alloc.c) calls malloc the first time |
| 2243 | it is called on some systems. */ | 2264 | it is called on some systems. */ |
diff --git a/src/eval.c b/src/eval.c index 0eb519fbfca..df528e3da80 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1178,6 +1178,7 @@ unwind_to_catch (catch, value) | |||
| 1178 | set_poll_suppress_count (catch->poll_suppress_count); | 1178 | set_poll_suppress_count (catch->poll_suppress_count); |
| 1179 | interrupt_input_blocked = catch->interrupt_input_blocked; | 1179 | interrupt_input_blocked = catch->interrupt_input_blocked; |
| 1180 | handling_signal = 0; | 1180 | handling_signal = 0; |
| 1181 | immediate_quit = 0; | ||
| 1181 | 1182 | ||
| 1182 | do | 1183 | do |
| 1183 | { | 1184 | { |
| @@ -3331,7 +3332,11 @@ Emacs could overflow the real C stack, and crash. */); | |||
| 3331 | 3332 | ||
| 3332 | DEFVAR_LISP ("quit-flag", &Vquit_flag, | 3333 | DEFVAR_LISP ("quit-flag", &Vquit_flag, |
| 3333 | doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil. | 3334 | doc: /* Non-nil causes `eval' to abort, unless `inhibit-quit' is non-nil. |
| 3334 | Typing C-g sets `quit-flag' non-nil, regardless of `inhibit-quit'. */); | 3335 | If the value is t, that means do an ordinary quit. |
| 3336 | If the value equals `throw-on-input', that means quit by throwing | ||
| 3337 | to the tag specified in `throw-on-input'; it's for handling `while-no-input'. | ||
| 3338 | Typing C-g sets `quit-flag' to t, regardless of `inhibit-quit', | ||
| 3339 | but `inhibit-quit' non-nil prevents anything from taking notice of that. */); | ||
| 3335 | Vquit_flag = Qnil; | 3340 | Vquit_flag = Qnil; |
| 3336 | 3341 | ||
| 3337 | DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit, | 3342 | DEFVAR_LISP ("inhibit-quit", &Vinhibit_quit, |
diff --git a/src/fileio.c b/src/fileio.c index 587f36d537d..195cff2bc8c 100644 --- a/src/fileio.c +++ b/src/fileio.c | |||
| @@ -230,6 +230,8 @@ extern int minibuf_level; | |||
| 230 | 230 | ||
| 231 | extern int minibuffer_auto_raise; | 231 | extern int minibuffer_auto_raise; |
| 232 | 232 | ||
| 233 | extern int history_delete_duplicates; | ||
| 234 | |||
| 233 | /* These variables describe handlers that have "already" had a chance | 235 | /* These variables describe handlers that have "already" had a chance |
| 234 | to handle the current operation. | 236 | to handle the current operation. |
| 235 | 237 | ||
| @@ -6385,7 +6387,13 @@ and `read-file-name-function'. */) | |||
| 6385 | if (replace_in_history) | 6387 | if (replace_in_history) |
| 6386 | /* Replace what Fcompleting_read added to the history | 6388 | /* Replace what Fcompleting_read added to the history |
| 6387 | with what we will actually return. */ | 6389 | with what we will actually return. */ |
| 6388 | XSETCAR (Fsymbol_value (Qfile_name_history), double_dollars (val)); | 6390 | { |
| 6391 | Lisp_Object val1 = double_dollars (val); | ||
| 6392 | tem = Fsymbol_value (Qfile_name_history); | ||
| 6393 | if (history_delete_duplicates) | ||
| 6394 | XSETCDR (tem, Fdelete (val1, XCDR(tem))); | ||
| 6395 | XSETCAR (tem, val1); | ||
| 6396 | } | ||
| 6389 | else if (add_to_history) | 6397 | else if (add_to_history) |
| 6390 | { | 6398 | { |
| 6391 | /* Add the value to the history--but not if it matches | 6399 | /* Add the value to the history--but not if it matches |
| @@ -6393,8 +6401,10 @@ and `read-file-name-function'. */) | |||
| 6393 | Lisp_Object val1 = double_dollars (val); | 6401 | Lisp_Object val1 = double_dollars (val); |
| 6394 | tem = Fsymbol_value (Qfile_name_history); | 6402 | tem = Fsymbol_value (Qfile_name_history); |
| 6395 | if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) | 6403 | if (! CONSP (tem) || NILP (Fequal (XCAR (tem), val1))) |
| 6396 | Fset (Qfile_name_history, | 6404 | { |
| 6397 | Fcons (val1, tem)); | 6405 | if (history_delete_duplicates) tem = Fdelete (val1, tem); |
| 6406 | Fset (Qfile_name_history, Fcons (val1, tem)); | ||
| 6407 | } | ||
| 6398 | } | 6408 | } |
| 6399 | 6409 | ||
| 6400 | return val; | 6410 | return val; |
diff --git a/src/floatfns.c b/src/floatfns.c index 61879eabe39..8cd08106ef2 100644 --- a/src/floatfns.c +++ b/src/floatfns.c | |||
| @@ -981,6 +981,7 @@ float_error (signo) | |||
| 981 | signal (SIGILL, float_error); | 981 | signal (SIGILL, float_error); |
| 982 | #endif /* BSD_SYSTEM */ | 982 | #endif /* BSD_SYSTEM */ |
| 983 | 983 | ||
| 984 | SIGNAL_THREAD_CHECK (signo); | ||
| 984 | in_float = 0; | 985 | in_float = 0; |
| 985 | 986 | ||
| 986 | Fsignal (Qarith_error, Fcons (float_error_arg, Qnil)); | 987 | Fsignal (Qarith_error, Fcons (float_error_arg, Qnil)); |
diff --git a/src/indent.c b/src/indent.c index 4efb5445f7e..7cfe53d80bb 100644 --- a/src/indent.c +++ b/src/indent.c | |||
| @@ -2094,8 +2094,9 @@ whether or not it is currently displayed in some window. */) | |||
| 2094 | move_it_by_lines (&it, -1, 0); | 2094 | move_it_by_lines (&it, -1, 0); |
| 2095 | 2095 | ||
| 2096 | it.vpos = 0; | 2096 | it.vpos = 0; |
| 2097 | if (XINT (lines) != 0) | 2097 | /* Do this even if LINES is 0, so that we move back |
| 2098 | move_it_by_lines (&it, XINT (lines), 0); | 2098 | to the beginning of the current line as we ought. */ |
| 2099 | move_it_by_lines (&it, XINT (lines), 0); | ||
| 2099 | 2100 | ||
| 2100 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); | 2101 | SET_PT_BOTH (IT_CHARPOS (it), IT_BYTEPOS (it)); |
| 2101 | } | 2102 | } |
diff --git a/src/keyboard.c b/src/keyboard.c index 052ef2d38b7..122a8e6b025 100644 --- a/src/keyboard.c +++ b/src/keyboard.c | |||
| @@ -3038,6 +3038,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 3038 | /* Save the echo status. */ | 3038 | /* Save the echo status. */ |
| 3039 | int saved_immediate_echo = current_kboard->immediate_echo; | 3039 | int saved_immediate_echo = current_kboard->immediate_echo; |
| 3040 | struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause; | 3040 | struct kboard *saved_ok_to_echo = ok_to_echo_at_next_pause; |
| 3041 | Lisp_Object saved_echo_string = current_kboard->echo_string; | ||
| 3041 | int saved_echo_after_prompt = current_kboard->echo_after_prompt; | 3042 | int saved_echo_after_prompt = current_kboard->echo_after_prompt; |
| 3042 | 3043 | ||
| 3043 | #if 0 | 3044 | #if 0 |
| @@ -3092,6 +3093,7 @@ read_char (commandflag, nmaps, maps, prev_event, used_mouse_menu) | |||
| 3092 | 3093 | ||
| 3093 | cancel_echoing (); | 3094 | cancel_echoing (); |
| 3094 | ok_to_echo_at_next_pause = saved_ok_to_echo; | 3095 | ok_to_echo_at_next_pause = saved_ok_to_echo; |
| 3096 | current_kboard->echo_string = saved_echo_string; | ||
| 3095 | current_kboard->echo_after_prompt = saved_echo_after_prompt; | 3097 | current_kboard->echo_after_prompt = saved_echo_after_prompt; |
| 3096 | if (saved_immediate_echo) | 3098 | if (saved_immediate_echo) |
| 3097 | echo_now (); | 3099 | echo_now (); |
| @@ -3574,6 +3576,9 @@ event_to_kboard (event) | |||
| 3574 | } | 3576 | } |
| 3575 | #endif | 3577 | #endif |
| 3576 | 3578 | ||
| 3579 | |||
| 3580 | Lisp_Object Vthrow_on_input; | ||
| 3581 | |||
| 3577 | /* Store an event obtained at interrupt level into kbd_buffer, fifo */ | 3582 | /* Store an event obtained at interrupt level into kbd_buffer, fifo */ |
| 3578 | 3583 | ||
| 3579 | void | 3584 | void |
| @@ -3699,6 +3704,24 @@ kbd_buffer_store_event_hold (event, hold_quit) | |||
| 3699 | *kbd_store_ptr = *event; | 3704 | *kbd_store_ptr = *event; |
| 3700 | ++kbd_store_ptr; | 3705 | ++kbd_store_ptr; |
| 3701 | } | 3706 | } |
| 3707 | |||
| 3708 | /* If we're inside while-no-input, and this event qualifies | ||
| 3709 | as input, set quit-flag to cause an interrupt. */ | ||
| 3710 | if (!NILP (Vthrow_on_input) | ||
| 3711 | && event->kind != FOCUS_IN_EVENT | ||
| 3712 | && event->kind != HELP_EVENT | ||
| 3713 | && event->kind != DEICONIFY_EVENT) | ||
| 3714 | { | ||
| 3715 | Vquit_flag = Vthrow_on_input; | ||
| 3716 | /* If we're inside a function that wants immediate quits, | ||
| 3717 | do it now. */ | ||
| 3718 | if (immediate_quit && NILP (Vinhibit_quit)) | ||
| 3719 | { | ||
| 3720 | immediate_quit = 0; | ||
| 3721 | sigfree (); | ||
| 3722 | QUIT; | ||
| 3723 | } | ||
| 3724 | } | ||
| 3702 | } | 3725 | } |
| 3703 | 3726 | ||
| 3704 | 3727 | ||
| @@ -6849,24 +6872,6 @@ handle_async_input () | |||
| 6849 | #ifdef BSD4_1 | 6872 | #ifdef BSD4_1 |
| 6850 | extern int select_alarmed; | 6873 | extern int select_alarmed; |
| 6851 | #endif | 6874 | #endif |
| 6852 | #if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | ||
| 6853 | extern pthread_t main_thread; | ||
| 6854 | if (pthread_self () != main_thread) | ||
| 6855 | { | ||
| 6856 | /* POSIX says any thread can receive the signal. On GNU/Linux that is | ||
| 6857 | not true, but for other systems (FreeBSD at least) it is. So direct | ||
| 6858 | the signal to the correct thread and block it from this thread. */ | ||
| 6859 | #ifdef SIGIO | ||
| 6860 | sigset_t new_mask; | ||
| 6861 | |||
| 6862 | sigemptyset (&new_mask); | ||
| 6863 | sigaddset (&new_mask, SIGIO); | ||
| 6864 | pthread_sigmask (SIG_BLOCK, &new_mask, 0); | ||
| 6865 | pthread_kill (main_thread, SIGIO); | ||
| 6866 | #endif | ||
| 6867 | return; | ||
| 6868 | } | ||
| 6869 | #endif | ||
| 6870 | 6875 | ||
| 6871 | interrupt_input_pending = 0; | 6876 | interrupt_input_pending = 0; |
| 6872 | 6877 | ||
| @@ -6895,22 +6900,6 @@ input_available_signal (signo) | |||
| 6895 | { | 6900 | { |
| 6896 | /* Must preserve main program's value of errno. */ | 6901 | /* Must preserve main program's value of errno. */ |
| 6897 | int old_errno = errno; | 6902 | int old_errno = errno; |
| 6898 | #if ! defined (SYSTEM_MALLOC) && defined (HAVE_GTK_AND_PTHREAD) | ||
| 6899 | extern pthread_t main_thread; | ||
| 6900 | if (pthread_self () != main_thread) | ||
| 6901 | { | ||
| 6902 | /* POSIX says any thread can receive the signal. On GNU/Linux that is | ||
| 6903 | not true, but for other systems (FreeBSD at least) it is. So direct | ||
| 6904 | the signal to the correct thread and block it from this thread. */ | ||
| 6905 | sigset_t new_mask; | ||
| 6906 | |||
| 6907 | sigemptyset (&new_mask); | ||
| 6908 | sigaddset (&new_mask, SIGIO); | ||
| 6909 | pthread_sigmask (SIG_BLOCK, &new_mask, 0); | ||
| 6910 | pthread_kill (main_thread, SIGIO); | ||
| 6911 | return; | ||
| 6912 | } | ||
| 6913 | #endif /* HAVE_GTK_AND_PTHREAD */ | ||
| 6914 | #if defined (USG) && !defined (POSIX_SIGNALS) | 6903 | #if defined (USG) && !defined (POSIX_SIGNALS) |
| 6915 | /* USG systems forget handlers when they are used; | 6904 | /* USG systems forget handlers when they are used; |
| 6916 | must reestablish each time */ | 6905 | must reestablish each time */ |
| @@ -6927,6 +6916,8 @@ input_available_signal (signo) | |||
| 6927 | #ifdef SYNC_INPUT | 6916 | #ifdef SYNC_INPUT |
| 6928 | interrupt_input_pending = 1; | 6917 | interrupt_input_pending = 1; |
| 6929 | #else | 6918 | #else |
| 6919 | |||
| 6920 | SIGNAL_THREAD_CHECK (signo); | ||
| 6930 | handle_async_input (); | 6921 | handle_async_input (); |
| 6931 | #endif | 6922 | #endif |
| 6932 | 6923 | ||
| @@ -10379,6 +10370,7 @@ handle_interrupt () | |||
| 10379 | char c; | 10370 | char c; |
| 10380 | struct frame *sf = SELECTED_FRAME (); | 10371 | struct frame *sf = SELECTED_FRAME (); |
| 10381 | 10372 | ||
| 10373 | SIGNAL_THREAD_CHECK (signalnum); | ||
| 10382 | cancel_echoing (); | 10374 | cancel_echoing (); |
| 10383 | 10375 | ||
| 10384 | /* XXX This code needs to be revised for multi-tty support. */ | 10376 | /* XXX This code needs to be revised for multi-tty support. */ |
| @@ -11525,6 +11517,12 @@ Used during Emacs' startup. */); | |||
| 11525 | doc: /* *How long to display an echo-area message when the minibuffer is active. | 11517 | doc: /* *How long to display an echo-area message when the minibuffer is active. |
| 11526 | If the value is not a number, such messages don't time out. */); | 11518 | If the value is not a number, such messages don't time out. */); |
| 11527 | Vminibuffer_message_timeout = make_number (2); | 11519 | Vminibuffer_message_timeout = make_number (2); |
| 11520 | |||
| 11521 | DEFVAR_LISP ("throw-on-input", &Vthrow_on_input, | ||
| 11522 | doc: /* If non-nil, any keyboard input throws to this symbol. | ||
| 11523 | The value of that variable is passed to `quit-flag' and later causes a | ||
| 11524 | peculiar kind of quitting. */); | ||
| 11525 | Vthrow_on_input = Qnil; | ||
| 11528 | } | 11526 | } |
| 11529 | 11527 | ||
| 11530 | void | 11528 | void |
diff --git a/src/lisp.h b/src/lisp.h index 8be6b910a5e..59ce03435f5 100644 --- a/src/lisp.h +++ b/src/lisp.h | |||
| @@ -1768,11 +1768,15 @@ extern char *stack_bottom; | |||
| 1768 | #ifdef SYNC_INPUT | 1768 | #ifdef SYNC_INPUT |
| 1769 | extern void handle_async_input P_ ((void)); | 1769 | extern void handle_async_input P_ ((void)); |
| 1770 | extern int interrupt_input_pending; | 1770 | extern int interrupt_input_pending; |
| 1771 | |||
| 1771 | #define QUIT \ | 1772 | #define QUIT \ |
| 1772 | do { \ | 1773 | do { \ |
| 1773 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 1774 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 1774 | { \ | 1775 | { \ |
| 1776 | Lisp_Object flag = Vquit_flag; \ | ||
| 1775 | Vquit_flag = Qnil; \ | 1777 | Vquit_flag = Qnil; \ |
| 1778 | if (EQ (Vthrow_on_input, flag)) \ | ||
| 1779 | Fthrow (Vthrow_on_input, Qnil); \ | ||
| 1776 | Fsignal (Qquit, Qnil); \ | 1780 | Fsignal (Qquit, Qnil); \ |
| 1777 | } \ | 1781 | } \ |
| 1778 | else if (interrupt_input_pending) \ | 1782 | else if (interrupt_input_pending) \ |
| @@ -1785,7 +1789,10 @@ extern int interrupt_input_pending; | |||
| 1785 | do { \ | 1789 | do { \ |
| 1786 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ | 1790 | if (!NILP (Vquit_flag) && NILP (Vinhibit_quit)) \ |
| 1787 | { \ | 1791 | { \ |
| 1792 | Lisp_Object flag = Vquit_flag; \ | ||
| 1788 | Vquit_flag = Qnil; \ | 1793 | Vquit_flag = Qnil; \ |
| 1794 | if (EQ (Vthrow_on_input, flag)) \ | ||
| 1795 | Fthrow (Vthrow_on_input, Qnil); \ | ||
| 1789 | Fsignal (Qquit, Qnil); \ | 1796 | Fsignal (Qquit, Qnil); \ |
| 1790 | } \ | 1797 | } \ |
| 1791 | } while (0) | 1798 | } while (0) |
| @@ -2876,6 +2883,7 @@ extern struct kboard *echo_kboard; | |||
| 2876 | extern void cancel_echoing P_ ((void)); | 2883 | extern void cancel_echoing P_ ((void)); |
| 2877 | extern Lisp_Object Qdisabled, QCfilter; | 2884 | extern Lisp_Object Qdisabled, QCfilter; |
| 2878 | extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level; | 2885 | extern Lisp_Object Vtty_erase_char, Vhelp_form, Vtop_level; |
| 2886 | extern Lisp_Object Vthrow_on_input; | ||
| 2879 | extern int input_pending; | 2887 | extern int input_pending; |
| 2880 | EXFUN (Fdiscard_input, 0); | 2888 | EXFUN (Fdiscard_input, 0); |
| 2881 | EXFUN (Frecursive_edit, 0); | 2889 | EXFUN (Frecursive_edit, 0); |
| @@ -3041,7 +3049,7 @@ extern void syms_of_macros P_ ((void)); | |||
| 3041 | /* defined in undo.c */ | 3049 | /* defined in undo.c */ |
| 3042 | extern Lisp_Object Qinhibit_read_only; | 3050 | extern Lisp_Object Qinhibit_read_only; |
| 3043 | EXFUN (Fundo_boundary, 0); | 3051 | EXFUN (Fundo_boundary, 0); |
| 3044 | extern Lisp_Object truncate_undo_list P_ ((Lisp_Object, int, int, int)); | 3052 | extern void truncate_undo_list P_ ((struct buffer *)); |
| 3045 | extern void record_marker_adjustment P_ ((Lisp_Object, int)); | 3053 | extern void record_marker_adjustment P_ ((Lisp_Object, int)); |
| 3046 | extern void record_insert P_ ((int, int)); | 3054 | extern void record_insert P_ ((int, int)); |
| 3047 | extern void record_delete P_ ((int, Lisp_Object)); | 3055 | extern void record_delete P_ ((int, Lisp_Object)); |
| @@ -3050,6 +3058,7 @@ extern void record_change P_ ((int, int)); | |||
| 3050 | extern void record_property_change P_ ((int, int, Lisp_Object, Lisp_Object, | 3058 | extern void record_property_change P_ ((int, int, Lisp_Object, Lisp_Object, |
| 3051 | Lisp_Object)); | 3059 | Lisp_Object)); |
| 3052 | extern void syms_of_undo P_ ((void)); | 3060 | extern void syms_of_undo P_ ((void)); |
| 3061 | extern Lisp_Object Vundo_outer_limit; | ||
| 3053 | 3062 | ||
| 3054 | /* defined in textprop.c */ | 3063 | /* defined in textprop.c */ |
| 3055 | extern Lisp_Object Qfont, Qmouse_face; | 3064 | extern Lisp_Object Qfont, Qmouse_face; |
diff --git a/src/macterm.c b/src/macterm.c index b0a7edeb516..da3dcb15ee8 100644 --- a/src/macterm.c +++ b/src/macterm.c | |||
| @@ -5976,7 +5976,7 @@ mac_to_x_fontname (name, size, style, scriptcode, encoding_base) | |||
| 5976 | strcpy(cs, "mac-cyrillic"); | 5976 | strcpy(cs, "mac-cyrillic"); |
| 5977 | break; | 5977 | break; |
| 5978 | case kTextEncodingMacCentralEurRoman: | 5978 | case kTextEncodingMacCentralEurRoman: |
| 5979 | strcpy(cs, "mac-centraleuropean"); | 5979 | strcpy(cs, "mac-centraleurroman"); |
| 5980 | break; | 5980 | break; |
| 5981 | case kTextEncodingMacSymbol: | 5981 | case kTextEncodingMacSymbol: |
| 5982 | case kTextEncodingMacDingbats: | 5982 | case kTextEncodingMacDingbats: |
| @@ -6034,7 +6034,7 @@ x_font_name_to_mac_font_name (char *xf, char *mf) | |||
| 6034 | coding_system = Qeuc_kr; | 6034 | coding_system = Qeuc_kr; |
| 6035 | else if (strcmp (cs, "mac-roman") == 0 | 6035 | else if (strcmp (cs, "mac-roman") == 0 |
| 6036 | || strcmp (cs, "mac-cyrillic") == 0 | 6036 | || strcmp (cs, "mac-cyrillic") == 0 |
| 6037 | || strcmp (cs, "mac-centraleuropean") == 0 | 6037 | || strcmp (cs, "mac-centraleurroman") == 0 |
| 6038 | || strcmp (cs, "adobe-fontspecific") == 0) | 6038 | || strcmp (cs, "adobe-fontspecific") == 0) |
| 6039 | strcpy (mf, family); | 6039 | strcpy (mf, family); |
| 6040 | else | 6040 | else |
| @@ -6276,6 +6276,28 @@ static int xlfd_scalable_fields[] = | |||
| 6276 | }; | 6276 | }; |
| 6277 | 6277 | ||
| 6278 | static Lisp_Object | 6278 | static Lisp_Object |
| 6279 | mac_c_string_match (regexp, string, nonspecial, exact) | ||
| 6280 | Lisp_Object regexp; | ||
| 6281 | const char *string, *nonspecial; | ||
| 6282 | int exact; | ||
| 6283 | { | ||
| 6284 | if (exact) | ||
| 6285 | { | ||
| 6286 | if (strcmp (string, nonspecial) == 0) | ||
| 6287 | return build_string (string); | ||
| 6288 | } | ||
| 6289 | else if (strstr (string, nonspecial)) | ||
| 6290 | { | ||
| 6291 | Lisp_Object str = build_string (string); | ||
| 6292 | |||
| 6293 | if (fast_string_match (regexp, str) >= 0) | ||
| 6294 | return str; | ||
| 6295 | } | ||
| 6296 | |||
| 6297 | return Qnil; | ||
| 6298 | } | ||
| 6299 | |||
| 6300 | static Lisp_Object | ||
| 6279 | mac_do_list_fonts (pattern, maxnames) | 6301 | mac_do_list_fonts (pattern, maxnames) |
| 6280 | char *pattern; | 6302 | char *pattern; |
| 6281 | int maxnames; | 6303 | int maxnames; |
| @@ -6286,6 +6308,8 @@ mac_do_list_fonts (pattern, maxnames) | |||
| 6286 | char scaled[256]; | 6308 | char scaled[256]; |
| 6287 | char *ptr; | 6309 | char *ptr; |
| 6288 | int scl_val[XLFD_SCL_LAST], *field, *val; | 6310 | int scl_val[XLFD_SCL_LAST], *field, *val; |
| 6311 | char *longest_start, *cur_start, *nonspecial; | ||
| 6312 | int longest_len, cur_len, exact; | ||
| 6289 | 6313 | ||
| 6290 | for (i = 0; i < XLFD_SCL_LAST; i++) | 6314 | for (i = 0; i < XLFD_SCL_LAST; i++) |
| 6291 | scl_val[i] = -1; | 6315 | scl_val[i] = -1; |
| @@ -6343,34 +6367,66 @@ mac_do_list_fonts (pattern, maxnames) | |||
| 6343 | ptr = regex; | 6367 | ptr = regex; |
| 6344 | *ptr++ = '^'; | 6368 | *ptr++ = '^'; |
| 6345 | 6369 | ||
| 6346 | /* Turn pattern into a regexp and do a regexp match. */ | 6370 | longest_start = cur_start = ptr; |
| 6371 | longest_len = cur_len = 0; | ||
| 6372 | exact = 1; | ||
| 6373 | |||
| 6374 | /* Turn pattern into a regexp and do a regexp match. Also find the | ||
| 6375 | longest substring containing no special characters. */ | ||
| 6347 | for (; *pattern; pattern++) | 6376 | for (; *pattern; pattern++) |
| 6348 | { | 6377 | { |
| 6349 | if (*pattern == '?') | 6378 | if (*pattern == '?' || *pattern == '*') |
| 6350 | *ptr++ = '.'; | 6379 | { |
| 6351 | else if (*pattern == '*') | 6380 | if (cur_len > longest_len) |
| 6352 | { | 6381 | { |
| 6353 | *ptr++ = '.'; | 6382 | longest_start = cur_start; |
| 6354 | *ptr++ = '*'; | 6383 | longest_len = cur_len; |
| 6355 | } | 6384 | } |
| 6385 | cur_len = 0; | ||
| 6386 | exact = 0; | ||
| 6387 | |||
| 6388 | if (*pattern == '?') | ||
| 6389 | *ptr++ = '.'; | ||
| 6390 | else /* if (*pattern == '*') */ | ||
| 6391 | { | ||
| 6392 | *ptr++ = '.'; | ||
| 6393 | *ptr++ = '*'; | ||
| 6394 | } | ||
| 6395 | } | ||
| 6356 | else | 6396 | else |
| 6357 | *ptr++ = tolower (*pattern); | 6397 | { |
| 6398 | if (cur_len == 0) | ||
| 6399 | cur_start = ptr; | ||
| 6400 | cur_len++; | ||
| 6401 | |||
| 6402 | *ptr++ = tolower (*pattern); | ||
| 6403 | } | ||
| 6358 | } | 6404 | } |
| 6405 | |||
| 6406 | if (cur_len > longest_len) | ||
| 6407 | { | ||
| 6408 | longest_start = cur_start; | ||
| 6409 | longest_len = cur_len; | ||
| 6410 | } | ||
| 6411 | |||
| 6359 | *ptr = '$'; | 6412 | *ptr = '$'; |
| 6360 | *(ptr + 1) = '\0'; | 6413 | *(ptr + 1) = '\0'; |
| 6361 | 6414 | ||
| 6415 | nonspecial = xmalloc (longest_len + 1); | ||
| 6416 | strncpy (nonspecial, longest_start, longest_len); | ||
| 6417 | nonspecial[longest_len] = '\0'; | ||
| 6418 | |||
| 6362 | pattern_regex = build_string (regex); | 6419 | pattern_regex = build_string (regex); |
| 6363 | 6420 | ||
| 6364 | for (i = 0; i < font_name_count; i++) | 6421 | for (i = 0; i < font_name_count; i++) |
| 6365 | { | 6422 | { |
| 6366 | fontname = build_string (font_name_table[i]); | 6423 | fontname = mac_c_string_match (pattern_regex, font_name_table[i], |
| 6367 | if (fast_string_match (pattern_regex, fontname) >= 0) | 6424 | nonspecial, exact); |
| 6425 | if (!NILP (fontname)) | ||
| 6368 | { | 6426 | { |
| 6369 | font_list = Fcons (fontname, font_list); | 6427 | font_list = Fcons (fontname, font_list); |
| 6370 | 6428 | if (exact || maxnames > 0 && ++n_fonts >= maxnames) | |
| 6371 | n_fonts++; | 6429 | break; |
| 6372 | if (maxnames > 0 && n_fonts >= maxnames) | ||
| 6373 | break; | ||
| 6374 | } | 6430 | } |
| 6375 | else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 | 6431 | else if (scl_val[XLFD_SCL_PIXEL_SIZE] > 0 |
| 6376 | && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) | 6432 | && (ptr = strstr (font_name_table[i], "-0-0-75-75-m-0-"))) |
| @@ -6384,17 +6440,19 @@ mac_do_list_fonts (pattern, maxnames) | |||
| 6384 | scl_val[XLFD_SCL_POINT_SIZE], | 6440 | scl_val[XLFD_SCL_POINT_SIZE], |
| 6385 | scl_val[XLFD_SCL_AVGWIDTH], | 6441 | scl_val[XLFD_SCL_AVGWIDTH], |
| 6386 | ptr + sizeof ("-0-0-75-75-m-0-") - 1); | 6442 | ptr + sizeof ("-0-0-75-75-m-0-") - 1); |
| 6387 | fontname = build_string (scaled); | 6443 | fontname = mac_c_string_match (pattern_regex, scaled, |
| 6388 | if (fast_string_match (pattern_regex, fontname) >= 0) | 6444 | nonspecial, exact); |
| 6445 | if (!NILP (fontname)) | ||
| 6389 | { | 6446 | { |
| 6390 | font_list = Fcons (fontname, font_list); | 6447 | font_list = Fcons (fontname, font_list); |
| 6391 | 6448 | if (exact || maxnames > 0 && ++n_fonts >= maxnames) | |
| 6392 | n_fonts++; | ||
| 6393 | if (maxnames > 0 && n_fonts >= maxnames) | ||
| 6394 | break; | 6449 | break; |
| 6395 | } | 6450 | } |
| 6396 | } | 6451 | } |
| 6397 | } | 6452 | } |
| 6453 | |||
| 6454 | xfree (nonspecial); | ||
| 6455 | |||
| 6398 | return font_list; | 6456 | return font_list; |
| 6399 | } | 6457 | } |
| 6400 | 6458 | ||
diff --git a/src/minibuf.c b/src/minibuf.c index 375fa3622b3..463c083cb5e 100644 --- a/src/minibuf.c +++ b/src/minibuf.c | |||
| @@ -1232,6 +1232,7 @@ is used to further constrain the set of candidates. */) | |||
| 1232 | return call3 (alist, string, predicate, Qnil); | 1232 | return call3 (alist, string, predicate, Qnil); |
| 1233 | 1233 | ||
| 1234 | bestmatch = bucket = Qnil; | 1234 | bestmatch = bucket = Qnil; |
| 1235 | zero = make_number (0); | ||
| 1235 | 1236 | ||
| 1236 | /* If ALIST is not a list, set TAIL just for gc pro. */ | 1237 | /* If ALIST is not a list, set TAIL just for gc pro. */ |
| 1237 | tail = alist; | 1238 | tail = alist; |
| @@ -1258,7 +1259,7 @@ is used to further constrain the set of candidates. */) | |||
| 1258 | } | 1259 | } |
| 1259 | else if (type == 2) | 1260 | else if (type == 2) |
| 1260 | { | 1261 | { |
| 1261 | if (XFASTINT (bucket) != 0) | 1262 | if (!EQ (bucket, zero)) |
| 1262 | { | 1263 | { |
| 1263 | elt = bucket; | 1264 | elt = bucket; |
| 1264 | eltstring = Fsymbol_name (elt); | 1265 | eltstring = Fsymbol_name (elt); |
| @@ -1290,16 +1291,14 @@ is used to further constrain the set of candidates. */) | |||
| 1290 | 1291 | ||
| 1291 | if (STRINGP (eltstring) | 1292 | if (STRINGP (eltstring) |
| 1292 | && SCHARS (string) <= SCHARS (eltstring) | 1293 | && SCHARS (string) <= SCHARS (eltstring) |
| 1293 | && (tem = Fcompare_strings (eltstring, make_number (0), | 1294 | && (tem = Fcompare_strings (eltstring, zero, |
| 1294 | make_number (SCHARS (string)), | 1295 | make_number (SCHARS (string)), |
| 1295 | string, make_number (0), Qnil, | 1296 | string, zero, Qnil, |
| 1296 | completion_ignore_case ? Qt : Qnil), | 1297 | completion_ignore_case ? Qt : Qnil), |
| 1297 | EQ (Qt, tem))) | 1298 | EQ (Qt, tem))) |
| 1298 | { | 1299 | { |
| 1299 | /* Yes. */ | 1300 | /* Yes. */ |
| 1300 | Lisp_Object regexps; | 1301 | Lisp_Object regexps; |
| 1301 | Lisp_Object zero; | ||
| 1302 | XSETFASTINT (zero, 0); | ||
| 1303 | 1302 | ||
| 1304 | /* Ignore this element if it fails to match all the regexps. */ | 1303 | /* Ignore this element if it fails to match all the regexps. */ |
| 1305 | { | 1304 | { |
| @@ -1353,9 +1352,9 @@ is used to further constrain the set of candidates. */) | |||
| 1353 | else | 1352 | else |
| 1354 | { | 1353 | { |
| 1355 | compare = min (bestmatchsize, SCHARS (eltstring)); | 1354 | compare = min (bestmatchsize, SCHARS (eltstring)); |
| 1356 | tem = Fcompare_strings (bestmatch, make_number (0), | 1355 | tem = Fcompare_strings (bestmatch, zero, |
| 1357 | make_number (compare), | 1356 | make_number (compare), |
| 1358 | eltstring, make_number (0), | 1357 | eltstring, zero, |
| 1359 | make_number (compare), | 1358 | make_number (compare), |
| 1360 | completion_ignore_case ? Qt : Qnil); | 1359 | completion_ignore_case ? Qt : Qnil); |
| 1361 | if (EQ (tem, Qt)) | 1360 | if (EQ (tem, Qt)) |
| @@ -1386,15 +1385,15 @@ is used to further constrain the set of candidates. */) | |||
| 1386 | ((matchsize == SCHARS (eltstring)) | 1385 | ((matchsize == SCHARS (eltstring)) |
| 1387 | == | 1386 | == |
| 1388 | (matchsize == SCHARS (bestmatch)) | 1387 | (matchsize == SCHARS (bestmatch)) |
| 1389 | && (tem = Fcompare_strings (eltstring, make_number (0), | 1388 | && (tem = Fcompare_strings (eltstring, zero, |
| 1390 | make_number (SCHARS (string)), | 1389 | make_number (SCHARS (string)), |
| 1391 | string, make_number (0), | 1390 | string, zero, |
| 1392 | Qnil, | 1391 | Qnil, |
| 1393 | Qnil), | 1392 | Qnil), |
| 1394 | EQ (Qt, tem)) | 1393 | EQ (Qt, tem)) |
| 1395 | && (tem = Fcompare_strings (bestmatch, make_number (0), | 1394 | && (tem = Fcompare_strings (bestmatch, zero, |
| 1396 | make_number (SCHARS (string)), | 1395 | make_number (SCHARS (string)), |
| 1397 | string, make_number (0), | 1396 | string, zero, |
| 1398 | Qnil, | 1397 | Qnil, |
| 1399 | Qnil), | 1398 | Qnil), |
| 1400 | ! EQ (Qt, tem)))) | 1399 | ! EQ (Qt, tem)))) |
| @@ -1481,13 +1480,14 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1481 | || NILP (XCAR (alist)))); | 1480 | || NILP (XCAR (alist)))); |
| 1482 | int index = 0, obsize = 0; | 1481 | int index = 0, obsize = 0; |
| 1483 | int bindcount = -1; | 1482 | int bindcount = -1; |
| 1484 | Lisp_Object bucket, tem; | 1483 | Lisp_Object bucket, tem, zero; |
| 1485 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; | 1484 | struct gcpro gcpro1, gcpro2, gcpro3, gcpro4; |
| 1486 | 1485 | ||
| 1487 | CHECK_STRING (string); | 1486 | CHECK_STRING (string); |
| 1488 | if (type == 0) | 1487 | if (type == 0) |
| 1489 | return call3 (alist, string, predicate, Qt); | 1488 | return call3 (alist, string, predicate, Qt); |
| 1490 | allmatches = bucket = Qnil; | 1489 | allmatches = bucket = Qnil; |
| 1490 | zero = make_number (0); | ||
| 1491 | 1491 | ||
| 1492 | /* If ALIST is not a list, set TAIL just for gc pro. */ | 1492 | /* If ALIST is not a list, set TAIL just for gc pro. */ |
| 1493 | tail = alist; | 1493 | tail = alist; |
| @@ -1514,7 +1514,7 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1514 | } | 1514 | } |
| 1515 | else if (type == 2) | 1515 | else if (type == 2) |
| 1516 | { | 1516 | { |
| 1517 | if (XFASTINT (bucket) != 0) | 1517 | if (!EQ (bucket, zero)) |
| 1518 | { | 1518 | { |
| 1519 | elt = bucket; | 1519 | elt = bucket; |
| 1520 | eltstring = Fsymbol_name (elt); | 1520 | eltstring = Fsymbol_name (elt); |
| @@ -1552,9 +1552,9 @@ are ignored unless STRING itself starts with a space. */) | |||
| 1552 | && SREF (string, 0) == ' ') | 1552 | && SREF (string, 0) == ' ') |
| 1553 | || SREF (eltstring, 0) != ' ' | 1553 | || SREF (eltstring, 0) != ' ' |
| 1554 | || NILP (hide_spaces)) | 1554 | || NILP (hide_spaces)) |
| 1555 | && (tem = Fcompare_strings (eltstring, make_number (0), | 1555 | && (tem = Fcompare_strings (eltstring, zero, |
| 1556 | make_number (SCHARS (string)), | 1556 | make_number (SCHARS (string)), |
| 1557 | string, make_number (0), | 1557 | string, zero, |
| 1558 | make_number (SCHARS (string)), | 1558 | make_number (SCHARS (string)), |
| 1559 | completion_ignore_case ? Qt : Qnil), | 1559 | completion_ignore_case ? Qt : Qnil), |
| 1560 | EQ (Qt, tem))) | 1560 | EQ (Qt, tem))) |
diff --git a/src/process.c b/src/process.c index 65dec1457b0..646b9aed6a8 100644 --- a/src/process.c +++ b/src/process.c | |||
| @@ -5104,6 +5104,7 @@ Lisp_Object process_sent_to; | |||
| 5104 | SIGTYPE | 5104 | SIGTYPE |
| 5105 | send_process_trap () | 5105 | send_process_trap () |
| 5106 | { | 5106 | { |
| 5107 | SIGNAL_THREAD_CHECK (SIGPIPE); | ||
| 5107 | #ifdef BSD4_1 | 5108 | #ifdef BSD4_1 |
| 5108 | sigrelse (SIGPIPE); | 5109 | sigrelse (SIGPIPE); |
| 5109 | sigrelse (SIGALRM); | 5110 | sigrelse (SIGALRM); |
| @@ -6146,6 +6147,8 @@ sigchld_handler (signo) | |||
| 6146 | register struct Lisp_Process *p; | 6147 | register struct Lisp_Process *p; |
| 6147 | extern EMACS_TIME *input_available_clear_time; | 6148 | extern EMACS_TIME *input_available_clear_time; |
| 6148 | 6149 | ||
| 6150 | SIGNAL_THREAD_CHECK (signo); | ||
| 6151 | |||
| 6149 | #ifdef BSD4_1 | 6152 | #ifdef BSD4_1 |
| 6150 | extern int sigheld; | 6153 | extern int sigheld; |
| 6151 | sigheld |= sigbit (SIGCHLD); | 6154 | sigheld |= sigbit (SIGCHLD); |
diff --git a/src/regex.c b/src/regex.c index 1009c837dcf..a223f170765 100644 --- a/src/regex.c +++ b/src/regex.c | |||
| @@ -5860,7 +5860,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) | |||
| 5860 | PREFETCH_NOLIMIT (); | 5860 | PREFETCH_NOLIMIT (); |
| 5861 | c2 = RE_STRING_CHAR (d, dend - d); | 5861 | c2 = RE_STRING_CHAR (d, dend - d); |
| 5862 | #ifdef emacs | 5862 | #ifdef emacs |
| 5863 | UPDATE_SYNTAX_TABLE_FORWARD (charpos); | 5863 | UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1); |
| 5864 | #endif | 5864 | #endif |
| 5865 | s2 = SYNTAX (c2); | 5865 | s2 = SYNTAX (c2); |
| 5866 | 5866 | ||
| @@ -5947,7 +5947,7 @@ re_match_2_internal (bufp, string1, size1, string2, size2, pos, regs, stop) | |||
| 5947 | PREFETCH_NOLIMIT (); | 5947 | PREFETCH_NOLIMIT (); |
| 5948 | c2 = RE_STRING_CHAR (d, dend - d); | 5948 | c2 = RE_STRING_CHAR (d, dend - d); |
| 5949 | #ifdef emacs | 5949 | #ifdef emacs |
| 5950 | UPDATE_SYNTAX_TABLE_FORWARD (charpos); | 5950 | UPDATE_SYNTAX_TABLE_FORWARD (charpos + 1); |
| 5951 | #endif | 5951 | #endif |
| 5952 | s2 = SYNTAX (c2); | 5952 | s2 = SYNTAX (c2); |
| 5953 | 5953 | ||
diff --git a/src/syntax.c b/src/syntax.c index 8bfa62b49fc..fa34c2433c1 100644 --- a/src/syntax.c +++ b/src/syntax.c | |||
| @@ -1295,6 +1295,7 @@ and the function returns nil. Field boundaries are not noticed if | |||
| 1295 | (arg) | 1295 | (arg) |
| 1296 | Lisp_Object arg; | 1296 | Lisp_Object arg; |
| 1297 | { | 1297 | { |
| 1298 | Lisp_Object tmp; | ||
| 1298 | int orig_val, val; | 1299 | int orig_val, val; |
| 1299 | 1300 | ||
| 1300 | if (NILP (arg)) | 1301 | if (NILP (arg)) |
| @@ -1307,8 +1308,9 @@ and the function returns nil. Field boundaries are not noticed if | |||
| 1307 | val = XINT (arg) > 0 ? ZV : BEGV; | 1308 | val = XINT (arg) > 0 ? ZV : BEGV; |
| 1308 | 1309 | ||
| 1309 | /* Avoid jumping out of an input field. */ | 1310 | /* Avoid jumping out of an input field. */ |
| 1310 | val = XFASTINT (Fconstrain_to_field (make_number (val), make_number (PT), | 1311 | tmp = Fconstrain_to_field (make_number (val), make_number (PT), |
| 1311 | Qt, Qnil, Qnil)); | 1312 | Qt, Qnil, Qnil); |
| 1313 | val = XFASTINT (tmp); | ||
| 1312 | 1314 | ||
| 1313 | SET_PT (val); | 1315 | SET_PT (val); |
| 1314 | return val == orig_val ? Qt : Qnil; | 1316 | return val == orig_val ? Qt : Qnil; |
diff --git a/src/sysdep.c b/src/sysdep.c index fb7b9275fc7..55b333bfbc9 100644 --- a/src/sysdep.c +++ b/src/sysdep.c | |||
| @@ -2567,6 +2567,7 @@ select_alarm () | |||
| 2567 | #else /* not BSD4_1 */ | 2567 | #else /* not BSD4_1 */ |
| 2568 | signal (SIGALRM, SIG_IGN); | 2568 | signal (SIGALRM, SIG_IGN); |
| 2569 | #endif /* not BSD4_1 */ | 2569 | #endif /* not BSD4_1 */ |
| 2570 | SIGNAL_THREAD_CHECK (SIGALRM); | ||
| 2570 | if (read_alarm_should_throw) | 2571 | if (read_alarm_should_throw) |
| 2571 | longjmp (read_alarm_throw, 1); | 2572 | longjmp (read_alarm_throw, 1); |
| 2572 | } | 2573 | } |
diff --git a/src/syssignal.h b/src/syssignal.h index 8d58325c02c..ab61d111398 100644 --- a/src/syssignal.h +++ b/src/syssignal.h | |||
| @@ -20,6 +20,11 @@ Boston, MA 02111-1307, USA. */ | |||
| 20 | 20 | ||
| 21 | extern void init_signals P_ ((void)); | 21 | extern void init_signals P_ ((void)); |
| 22 | 22 | ||
| 23 | #ifdef HAVE_GTK_AND_PTHREAD | ||
| 24 | #include <pthread.h> | ||
| 25 | extern pthread_t main_thread; | ||
| 26 | #endif | ||
| 27 | |||
| 23 | #ifdef POSIX_SIGNALS | 28 | #ifdef POSIX_SIGNALS |
| 24 | 29 | ||
| 25 | /* Don't #include <signal.h>. That header should always be #included | 30 | /* Don't #include <signal.h>. That header should always be #included |
| @@ -199,5 +204,27 @@ extern SIGMASKTYPE sigprocmask_set; | |||
| 199 | char *strsignal (); | 204 | char *strsignal (); |
| 200 | #endif | 205 | #endif |
| 201 | 206 | ||
| 207 | #ifdef HAVE_GTK_AND_PTHREAD | ||
| 208 | #define SIGNAL_THREAD_CHECK(signo) \ | ||
| 209 | do { \ | ||
| 210 | if (pthread_self () != main_thread) \ | ||
| 211 | { \ | ||
| 212 | /* POSIX says any thread can receive the signal. On GNU/Linux \ | ||
| 213 | that is not true, but for other systems (FreeBSD at least) \ | ||
| 214 | it is. So direct the signal to the correct thread and block \ | ||
| 215 | it from this thread. */ \ | ||
| 216 | sigset_t new_mask; \ | ||
| 217 | \ | ||
| 218 | sigemptyset (&new_mask); \ | ||
| 219 | sigaddset (&new_mask, signo); \ | ||
| 220 | pthread_sigmask (SIG_BLOCK, &new_mask, 0); \ | ||
| 221 | pthread_kill (main_thread, signo); \ | ||
| 222 | return; \ | ||
| 223 | } \ | ||
| 224 | } while (0) | ||
| 225 | |||
| 226 | #else /* not HAVE_GTK_AND_PTHREAD */ | ||
| 227 | #define SIGNAL_THREAD_CHECK(signo) | ||
| 228 | #endif /* not HAVE_GTK_AND_PTHREAD */ | ||
| 202 | /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 | 229 | /* arch-tag: 4580e86a-340d-4574-9e11-a742b6e1a152 |
| 203 | (do not change this comment) */ | 230 | (do not change this comment) */ |
diff --git a/src/term.c b/src/term.c index cf79ea43531..fc60b993ea4 100644 --- a/src/term.c +++ b/src/term.c | |||
| @@ -640,11 +640,11 @@ encode_terminal_code (src, src_len, coding) | |||
| 640 | required = MAX_MULTIBYTE_LENGTH * src_len; | 640 | required = MAX_MULTIBYTE_LENGTH * src_len; |
| 641 | if (encode_terminal_bufsize < required) | 641 | if (encode_terminal_bufsize < required) |
| 642 | { | 642 | { |
| 643 | encode_terminal_bufsize = required; | ||
| 644 | if (encode_terminal_bufsize == 0) | 643 | if (encode_terminal_bufsize == 0) |
| 645 | encode_terminal_buf = xmalloc (required); | 644 | encode_terminal_buf = xmalloc (required); |
| 646 | else | 645 | else |
| 647 | encode_terminal_buf = xrealloc (encode_terminal_buf, required); | 646 | encode_terminal_buf = xrealloc (encode_terminal_buf, required); |
| 647 | encode_terminal_bufsize = required; | ||
| 648 | } | 648 | } |
| 649 | 649 | ||
| 650 | buf = encode_terminal_buf; | 650 | buf = encode_terminal_buf; |
diff --git a/src/undo.c b/src/undo.c index 9fdc46a3b13..df4b8d08cd6 100644 --- a/src/undo.c +++ b/src/undo.c | |||
| @@ -24,6 +24,17 @@ Boston, MA 02111-1307, USA. */ | |||
| 24 | #include "buffer.h" | 24 | #include "buffer.h" |
| 25 | #include "commands.h" | 25 | #include "commands.h" |
| 26 | 26 | ||
| 27 | /* Limits controlling how much undo information to keep. */ | ||
| 28 | |||
| 29 | EMACS_INT undo_limit; | ||
| 30 | EMACS_INT undo_strong_limit; | ||
| 31 | |||
| 32 | Lisp_Object Vundo_outer_limit; | ||
| 33 | |||
| 34 | /* Function to call when undo_outer_limit is exceeded. */ | ||
| 35 | |||
| 36 | Lisp_Object Vundo_outer_limit_function; | ||
| 37 | |||
| 27 | /* Last buffer for which undo information was recorded. */ | 38 | /* Last buffer for which undo information was recorded. */ |
| 28 | Lisp_Object last_undo_buffer; | 39 | Lisp_Object last_undo_buffer; |
| 29 | 40 | ||
| @@ -291,31 +302,35 @@ but another undo command will undo to the previous boundary. */) | |||
| 291 | } | 302 | } |
| 292 | 303 | ||
| 293 | /* At garbage collection time, make an undo list shorter at the end, | 304 | /* At garbage collection time, make an undo list shorter at the end, |
| 294 | returning the truncated list. | 305 | returning the truncated list. How this is done depends on the |
| 295 | MINSIZE, MAXSIZE and LIMITSIZE are the limits on size allowed, | 306 | variables undo-limit, undo-strong-limit and undo-outer-limit. |
| 296 | as described below. | 307 | In some cases this works by calling undo-outer-limit-function. */ |
| 297 | In practice, these are the values of undo-limit, | 308 | |
| 298 | undo-strong-limit, and undo-outer-limit. */ | 309 | void |
| 299 | 310 | truncate_undo_list (b) | |
| 300 | Lisp_Object | 311 | struct buffer *b; |
| 301 | truncate_undo_list (list, minsize, maxsize, limitsize) | ||
| 302 | Lisp_Object list; | ||
| 303 | int minsize, maxsize, limitsize; | ||
| 304 | { | 312 | { |
| 313 | Lisp_Object list; | ||
| 305 | Lisp_Object prev, next, last_boundary; | 314 | Lisp_Object prev, next, last_boundary; |
| 306 | int size_so_far = 0; | 315 | int size_so_far = 0; |
| 307 | 316 | ||
| 317 | /* Make sure that calling undo-outer-limit-function | ||
| 318 | won't cause another GC. */ | ||
| 319 | int count = inhibit_garbage_collection (); | ||
| 320 | |||
| 321 | /* Make the buffer current to get its local values of variables such | ||
| 322 | as undo_limit. Also so that Vundo_outer_limit_function can | ||
| 323 | tell which buffer to operate on. */ | ||
| 324 | record_unwind_protect (set_buffer_if_live, Fcurrent_buffer ()); | ||
| 325 | set_buffer_internal (b); | ||
| 326 | |||
| 327 | list = b->undo_list; | ||
| 328 | |||
| 308 | prev = Qnil; | 329 | prev = Qnil; |
| 309 | next = list; | 330 | next = list; |
| 310 | last_boundary = Qnil; | 331 | last_boundary = Qnil; |
| 311 | 332 | ||
| 312 | /* Always preserve at least the most recent undo record | 333 | /* If the first element is an undo boundary, skip past it. */ |
| 313 | unless it is really horribly big. | ||
| 314 | If the first element is an undo boundary, skip past it. | ||
| 315 | |||
| 316 | Skip, skip, skip the undo, skip, skip, skip the undo, | ||
| 317 | Skip, skip, skip the undo, skip to the undo bound'ry. | ||
| 318 | (Get it? "Skip to my Loo?") */ | ||
| 319 | if (CONSP (next) && NILP (XCAR (next))) | 334 | if (CONSP (next) && NILP (XCAR (next))) |
| 320 | { | 335 | { |
| 321 | /* Add in the space occupied by this element and its chain link. */ | 336 | /* Add in the space occupied by this element and its chain link. */ |
| @@ -326,6 +341,12 @@ truncate_undo_list (list, minsize, maxsize, limitsize) | |||
| 326 | next = XCDR (next); | 341 | next = XCDR (next); |
| 327 | } | 342 | } |
| 328 | 343 | ||
| 344 | /* Always preserve at least the most recent undo record | ||
| 345 | unless it is really horribly big. | ||
| 346 | |||
| 347 | Skip, skip, skip the undo, skip, skip, skip the undo, | ||
| 348 | Skip, skip, skip the undo, skip to the undo bound'ry. */ | ||
| 349 | |||
| 329 | while (CONSP (next) && ! NILP (XCAR (next))) | 350 | while (CONSP (next) && ! NILP (XCAR (next))) |
| 330 | { | 351 | { |
| 331 | Lisp_Object elt; | 352 | Lisp_Object elt; |
| @@ -341,35 +362,53 @@ truncate_undo_list (list, minsize, maxsize, limitsize) | |||
| 341 | + SCHARS (XCAR (elt))); | 362 | + SCHARS (XCAR (elt))); |
| 342 | } | 363 | } |
| 343 | 364 | ||
| 344 | /* If we reach LIMITSIZE before the first boundary, | ||
| 345 | we're heading for memory full, so truncate the list to nothing. */ | ||
| 346 | if (size_so_far > limitsize) | ||
| 347 | return Qnil; | ||
| 348 | |||
| 349 | /* Advance to next element. */ | 365 | /* Advance to next element. */ |
| 350 | prev = next; | 366 | prev = next; |
| 351 | next = XCDR (next); | 367 | next = XCDR (next); |
| 352 | } | 368 | } |
| 353 | 369 | ||
| 370 | /* If by the first boundary we have already passed undo_outer_limit, | ||
| 371 | we're heading for memory full, so offer to clear out the list. */ | ||
| 372 | if (INTEGERP (Vundo_outer_limit) | ||
| 373 | && size_so_far > XINT (Vundo_outer_limit) | ||
| 374 | && !NILP (Vundo_outer_limit_function)) | ||
| 375 | { | ||
| 376 | Lisp_Object temp = last_undo_buffer; | ||
| 377 | |||
| 378 | /* Normally the function this calls is undo-outer-limit-truncate. */ | ||
| 379 | if (! NILP (call1 (Vundo_outer_limit_function, | ||
| 380 | make_number (size_so_far)))) | ||
| 381 | { | ||
| 382 | /* The function is responsible for making | ||
| 383 | any desired changes in buffer-undo-list. */ | ||
| 384 | unbind_to (count, Qnil); | ||
| 385 | return; | ||
| 386 | } | ||
| 387 | /* That function probably used the minibuffer, and if so, that | ||
| 388 | changed last_undo_buffer. Change it back so that we don't | ||
| 389 | force next change to make an undo boundary here. */ | ||
| 390 | last_undo_buffer = temp; | ||
| 391 | } | ||
| 392 | |||
| 354 | if (CONSP (next)) | 393 | if (CONSP (next)) |
| 355 | last_boundary = prev; | 394 | last_boundary = prev; |
| 356 | 395 | ||
| 357 | /* Keep more if it fits. */ | 396 | /* Keep additional undo data, if it fits in the limits. */ |
| 358 | while (CONSP (next)) | 397 | while (CONSP (next)) |
| 359 | { | 398 | { |
| 360 | Lisp_Object elt; | 399 | Lisp_Object elt; |
| 361 | elt = XCAR (next); | 400 | elt = XCAR (next); |
| 362 | 401 | ||
| 363 | /* When we get to a boundary, decide whether to truncate | 402 | /* When we get to a boundary, decide whether to truncate |
| 364 | either before or after it. The lower threshold, MINSIZE, | 403 | either before or after it. The lower threshold, undo_limit, |
| 365 | tells us to truncate after it. If its size pushes past | 404 | tells us to truncate after it. If its size pushes past |
| 366 | the higher threshold MAXSIZE as well, we truncate before it. */ | 405 | the higher threshold undo_strong_limit, we truncate before it. */ |
| 367 | if (NILP (elt)) | 406 | if (NILP (elt)) |
| 368 | { | 407 | { |
| 369 | if (size_so_far > maxsize) | 408 | if (size_so_far > undo_strong_limit) |
| 370 | break; | 409 | break; |
| 371 | last_boundary = prev; | 410 | last_boundary = prev; |
| 372 | if (size_so_far > minsize) | 411 | if (size_so_far > undo_limit) |
| 373 | break; | 412 | break; |
| 374 | } | 413 | } |
| 375 | 414 | ||
| @@ -390,16 +429,15 @@ truncate_undo_list (list, minsize, maxsize, limitsize) | |||
| 390 | 429 | ||
| 391 | /* If we scanned the whole list, it is short enough; don't change it. */ | 430 | /* If we scanned the whole list, it is short enough; don't change it. */ |
| 392 | if (NILP (next)) | 431 | if (NILP (next)) |
| 393 | return list; | 432 | ; |
| 394 | |||
| 395 | /* Truncate at the boundary where we decided to truncate. */ | 433 | /* Truncate at the boundary where we decided to truncate. */ |
| 396 | if (!NILP (last_boundary)) | 434 | else if (!NILP (last_boundary)) |
| 397 | { | 435 | XSETCDR (last_boundary, Qnil); |
| 398 | XSETCDR (last_boundary, Qnil); | 436 | /* There's nothing we decided to keep, so clear it out. */ |
| 399 | return list; | ||
| 400 | } | ||
| 401 | else | 437 | else |
| 402 | return Qnil; | 438 | b->undo_list = Qnil; |
| 439 | |||
| 440 | unbind_to (count, Qnil); | ||
| 403 | } | 441 | } |
| 404 | 442 | ||
| 405 | DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0, | 443 | DEFUN ("primitive-undo", Fprimitive_undo, Sprimitive_undo, 2, 2, 0, |
| @@ -563,6 +601,54 @@ syms_of_undo () | |||
| 563 | 601 | ||
| 564 | defsubr (&Sprimitive_undo); | 602 | defsubr (&Sprimitive_undo); |
| 565 | defsubr (&Sundo_boundary); | 603 | defsubr (&Sundo_boundary); |
| 604 | |||
| 605 | DEFVAR_INT ("undo-limit", &undo_limit, | ||
| 606 | doc: /* Keep no more undo information once it exceeds this size. | ||
| 607 | This limit is applied when garbage collection happens. | ||
| 608 | When a previous command increases the total undo list size past this | ||
| 609 | value, the earlier commands that came before it are forgotten. | ||
| 610 | |||
| 611 | The size is counted as the number of bytes occupied, | ||
| 612 | which includes both saved text and other data. */); | ||
| 613 | undo_limit = 20000; | ||
| 614 | |||
| 615 | DEFVAR_INT ("undo-strong-limit", &undo_strong_limit, | ||
| 616 | doc: /* Don't keep more than this much size of undo information. | ||
| 617 | This limit is applied when garbage collection happens. | ||
| 618 | When a previous command increases the total undo list size past this | ||
| 619 | value, that command and the earlier commands that came before it are forgotten. | ||
| 620 | However, the most recent buffer-modifying command's undo info | ||
| 621 | is never discarded for this reason. | ||
| 622 | |||
| 623 | The size is counted as the number of bytes occupied, | ||
| 624 | which includes both saved text and other data. */); | ||
| 625 | undo_strong_limit = 30000; | ||
| 626 | |||
| 627 | DEFVAR_LISP ("undo-outer-limit", &Vundo_outer_limit, | ||
| 628 | doc: /* Outer limit on size of undo information for one command. | ||
| 629 | At garbage collection time, if the current command has produced | ||
| 630 | more than this much undo information, it asks you whether to delete | ||
| 631 | the information. This is a last-ditch limit to prevent memory overflow. | ||
| 632 | |||
| 633 | The size is counted as the number of bytes occupied, | ||
| 634 | which includes both saved text and other data. | ||
| 635 | |||
| 636 | In fact, this calls the function which is the value of | ||
| 637 | `undo-outer-limit-function' with one argument, the size. | ||
| 638 | The text above describes the behavior of the function | ||
| 639 | that variable usually specifies. */); | ||
| 640 | Vundo_outer_limit = make_number (300000); | ||
| 641 | |||
| 642 | DEFVAR_LISP ("undo-outer-limit-function", &Vundo_outer_limit_function, | ||
| 643 | doc: /* Function to call when an undo list exceeds `undo-outer-limit'. | ||
| 644 | This function is called with one argument, the current undo list size | ||
| 645 | for the most recent command (since the last undo boundary). | ||
| 646 | If the function returns t, that means truncation has been fully handled. | ||
| 647 | If it returns nil, the other forms of truncation are done. | ||
| 648 | |||
| 649 | Garbage collection is inhibited around the call to this function, | ||
| 650 | so it must make sure not to do a lot of consing. */); | ||
| 651 | Vundo_outer_limit_function = Qnil; | ||
| 566 | } | 652 | } |
| 567 | 653 | ||
| 568 | /* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a | 654 | /* arch-tag: d546ee01-4aed-4ffb-bb8b-eefaae50d38a |
diff --git a/src/w32term.c b/src/w32term.c index 0f6e9f67a66..e02019f45b9 100644 --- a/src/w32term.c +++ b/src/w32term.c | |||
| @@ -5374,47 +5374,17 @@ void | |||
| 5374 | x_calc_absolute_position (f) | 5374 | x_calc_absolute_position (f) |
| 5375 | struct frame *f; | 5375 | struct frame *f; |
| 5376 | { | 5376 | { |
| 5377 | POINT pt; | ||
| 5378 | int flags = f->size_hint_flags; | 5377 | int flags = f->size_hint_flags; |
| 5379 | 5378 | ||
| 5380 | pt.x = pt.y = 0; | ||
| 5381 | |||
| 5382 | /* Find the position of the outside upper-left corner of | ||
| 5383 | the inner window, with respect to the outer window. | ||
| 5384 | But do this only if we will need the results. */ | ||
| 5385 | if (f->output_data.w32->parent_desc != FRAME_W32_DISPLAY_INFO (f)->root_window) | ||
| 5386 | { | ||
| 5387 | BLOCK_INPUT; | ||
| 5388 | MapWindowPoints (FRAME_W32_WINDOW (f), | ||
| 5389 | f->output_data.w32->parent_desc, | ||
| 5390 | &pt, 1); | ||
| 5391 | UNBLOCK_INPUT; | ||
| 5392 | } | ||
| 5393 | |||
| 5394 | { | ||
| 5395 | RECT rt; | ||
| 5396 | rt.left = rt.right = rt.top = rt.bottom = 0; | ||
| 5397 | |||
| 5398 | BLOCK_INPUT; | ||
| 5399 | AdjustWindowRect(&rt, f->output_data.w32->dwStyle, | ||
| 5400 | FRAME_EXTERNAL_MENU_BAR (f)); | ||
| 5401 | UNBLOCK_INPUT; | ||
| 5402 | |||
| 5403 | pt.x += (rt.right - rt.left); | ||
| 5404 | pt.y += (rt.bottom - rt.top); | ||
| 5405 | } | ||
| 5406 | |||
| 5407 | /* Treat negative positions as relative to the leftmost bottommost | 5379 | /* Treat negative positions as relative to the leftmost bottommost |
| 5408 | position that fits on the screen. */ | 5380 | position that fits on the screen. */ |
| 5409 | if (flags & XNegative) | 5381 | if (flags & XNegative) |
| 5410 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width | 5382 | f->left_pos = (FRAME_W32_DISPLAY_INFO (f)->width |
| 5411 | - 2 * f->border_width - pt.x | ||
| 5412 | - FRAME_PIXEL_WIDTH (f) | 5383 | - FRAME_PIXEL_WIDTH (f) |
| 5413 | + f->left_pos); | 5384 | + f->left_pos); |
| 5414 | 5385 | ||
| 5415 | if (flags & YNegative) | 5386 | if (flags & YNegative) |
| 5416 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height | 5387 | f->top_pos = (FRAME_W32_DISPLAY_INFO (f)->height |
| 5417 | - 2 * f->border_width - pt.y | ||
| 5418 | - FRAME_PIXEL_HEIGHT (f) | 5388 | - FRAME_PIXEL_HEIGHT (f) |
| 5419 | + f->top_pos); | 5389 | + f->top_pos); |
| 5420 | /* The left_pos and top_pos | 5390 | /* The left_pos and top_pos |
diff --git a/src/xdisp.c b/src/xdisp.c index c58e8088141..b0a8f953c9c 100644 --- a/src/xdisp.c +++ b/src/xdisp.c | |||
| @@ -4914,7 +4914,9 @@ get_next_display_element (it) | |||
| 4914 | || (it->multibyte_p | 4914 | || (it->multibyte_p |
| 4915 | ? ((it->c >= 127 | 4915 | ? ((it->c >= 127 |
| 4916 | && it->len == 1) | 4916 | && it->len == 1) |
| 4917 | || !CHAR_PRINTABLE_P (it->c)) | 4917 | || !CHAR_PRINTABLE_P (it->c) |
| 4918 | || it->c == 0x8ad | ||
| 4919 | || it->c == 0x8a0) | ||
| 4918 | : (it->c >= 127 | 4920 | : (it->c >= 127 |
| 4919 | && (!unibyte_display_via_language_environment | 4921 | && (!unibyte_display_via_language_environment |
| 4920 | || it->c == unibyte_char_to_multibyte (it->c))))) | 4922 | || it->c == unibyte_char_to_multibyte (it->c))))) |
| @@ -4957,6 +4959,21 @@ get_next_display_element (it) | |||
| 4957 | XSETINT (it->ctl_chars[1], g); | 4959 | XSETINT (it->ctl_chars[1], g); |
| 4958 | ctl_len = 2; | 4960 | ctl_len = 2; |
| 4959 | } | 4961 | } |
| 4962 | else if (it->c == 0x8a0 || it->c == 0x8ad) | ||
| 4963 | { | ||
| 4964 | /* Set IT->ctl_chars[0] to the glyph for `\\'. */ | ||
| 4965 | if (it->dp | ||
| 4966 | && INTEGERP (DISP_ESCAPE_GLYPH (it->dp)) | ||
| 4967 | && GLYPH_CHAR_VALID_P (XINT (DISP_ESCAPE_GLYPH (it->dp)))) | ||
| 4968 | g = XINT (DISP_ESCAPE_GLYPH (it->dp)); | ||
| 4969 | else | ||
| 4970 | g = FAST_MAKE_GLYPH ('\\', face_id); | ||
| 4971 | XSETINT (it->ctl_chars[0], g); | ||
| 4972 | |||
| 4973 | g = FAST_MAKE_GLYPH (it->c == 0x8ad ? '-' : ' ', face_id); | ||
| 4974 | XSETINT (it->ctl_chars[1], g); | ||
| 4975 | ctl_len = 2; | ||
| 4976 | } | ||
| 4960 | else | 4977 | else |
| 4961 | { | 4978 | { |
| 4962 | unsigned char str[MAX_MULTIBYTE_LENGTH]; | 4979 | unsigned char str[MAX_MULTIBYTE_LENGTH]; |
| @@ -5139,6 +5156,9 @@ set_iterator_to_next (it, reseat_p) | |||
| 5139 | it->dpvec = NULL; | 5156 | it->dpvec = NULL; |
| 5140 | it->current.dpvec_index = -1; | 5157 | it->current.dpvec_index = -1; |
| 5141 | 5158 | ||
| 5159 | /* Recheck faces after display vector */ | ||
| 5160 | it->stop_charpos = 0; | ||
| 5161 | |||
| 5142 | /* Skip over characters which were displayed via IT->dpvec. */ | 5162 | /* Skip over characters which were displayed via IT->dpvec. */ |
| 5143 | if (it->dpvec_char_len < 0) | 5163 | if (it->dpvec_char_len < 0) |
| 5144 | reseat_at_next_visible_line_start (it, 1); | 5164 | reseat_at_next_visible_line_start (it, 1); |
diff --git a/src/xselect.c b/src/xselect.c index cd059e81979..1a033f1d973 100644 --- a/src/xselect.c +++ b/src/xselect.c | |||
| @@ -2348,7 +2348,7 @@ DEFUN ("x-get-cut-buffer-internal", Fx_get_cut_buffer_internal, | |||
| 2348 | Fcons (x_atom_to_symbol (display, type), | 2348 | Fcons (x_atom_to_symbol (display, type), |
| 2349 | Fcons (make_number (format), Qnil)))); | 2349 | Fcons (make_number (format), Qnil)))); |
| 2350 | 2350 | ||
| 2351 | ret = (bytes ? make_string ((char *) data, bytes) : Qnil); | 2351 | ret = (bytes ? make_unibyte_string ((char *) data, bytes) : Qnil); |
| 2352 | /* Use xfree, not XFree, because x_get_window_property | 2352 | /* Use xfree, not XFree, because x_get_window_property |
| 2353 | calls xmalloc itself. */ | 2353 | calls xmalloc itself. */ |
| 2354 | xfree (data); | 2354 | xfree (data); |
diff --git a/src/xterm.c b/src/xterm.c index 480ee1c624a..51feed59ac4 100644 --- a/src/xterm.c +++ b/src/xterm.c | |||
| @@ -4286,8 +4286,6 @@ xg_scroll_callback (widget, data) | |||
| 4286 | int part = -1, whole = 0, portion = 0; | 4286 | int part = -1, whole = 0, portion = 0; |
| 4287 | GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (widget)); | 4287 | GtkAdjustment *adj = GTK_ADJUSTMENT (gtk_range_get_adjustment (widget)); |
| 4288 | 4288 | ||
| 4289 | if (xg_ignore_gtk_scrollbar) return; | ||
| 4290 | |||
| 4291 | position = gtk_adjustment_get_value (adj); | 4289 | position = gtk_adjustment_get_value (adj); |
| 4292 | 4290 | ||
| 4293 | p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); | 4291 | p = g_object_get_data (G_OBJECT (widget), XG_LAST_SB_DATA); |
| @@ -4301,6 +4299,8 @@ xg_scroll_callback (widget, data) | |||
| 4301 | previous = *p; | 4299 | previous = *p; |
| 4302 | *p = position; | 4300 | *p = position; |
| 4303 | 4301 | ||
| 4302 | if (xg_ignore_gtk_scrollbar) return; | ||
| 4303 | |||
| 4304 | diff = (int) (position - previous); | 4304 | diff = (int) (position - previous); |
| 4305 | 4305 | ||
| 4306 | if (diff == (int) adj->step_increment) | 4306 | if (diff == (int) adj->step_increment) |
| @@ -4332,7 +4332,7 @@ xg_scroll_callback (widget, data) | |||
| 4332 | } | 4332 | } |
| 4333 | 4333 | ||
| 4334 | if (part >= 0) | 4334 | if (part >= 0) |
| 4335 | { | 4335 | { |
| 4336 | window_being_scrolled = bar->window; | 4336 | window_being_scrolled = bar->window; |
| 4337 | last_scroll_bar_part = part; | 4337 | last_scroll_bar_part = part; |
| 4338 | x_send_scroll_bar_event (bar->window, part, portion, whole); | 4338 | x_send_scroll_bar_event (bar->window, part, portion, whole); |
| @@ -8155,20 +8155,11 @@ x_calc_absolute_position (f) | |||
| 8155 | if (! ((flags & XNegative) || (flags & YNegative))) | 8155 | if (! ((flags & XNegative) || (flags & YNegative))) |
| 8156 | return; | 8156 | return; |
| 8157 | 8157 | ||
| 8158 | /* Find the offsets of the outside upper-left corner of | ||
| 8159 | the inner window, with respect to the outer window. | ||
| 8160 | But do this only if we will need the results. */ | ||
| 8161 | if (f->output_data.x->parent_desc != FRAME_X_DISPLAY_INFO (f)->root_window) | ||
| 8162 | /* This is to get *_pixels_outer_diff. */ | ||
| 8163 | x_real_positions (f, &win_x, &win_y); | ||
| 8164 | |||
| 8165 | /* Treat negative positions as relative to the leftmost bottommost | 8158 | /* Treat negative positions as relative to the leftmost bottommost |
| 8166 | position that fits on the screen. */ | 8159 | position that fits on the screen. */ |
| 8167 | if (flags & XNegative) | 8160 | if (flags & XNegative) |
| 8168 | f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width | 8161 | f->left_pos = (FRAME_X_DISPLAY_INFO (f)->width |
| 8169 | - 2 * FRAME_X_OUTPUT (f)->x_pixels_outer_diff | 8162 | - FRAME_PIXEL_WIDTH (f) + f->left_pos); |
| 8170 | - FRAME_PIXEL_WIDTH (f) | ||
| 8171 | + f->left_pos); | ||
| 8172 | 8163 | ||
| 8173 | { | 8164 | { |
| 8174 | int height = FRAME_PIXEL_HEIGHT (f); | 8165 | int height = FRAME_PIXEL_HEIGHT (f); |
| @@ -8190,15 +8181,7 @@ x_calc_absolute_position (f) | |||
| 8190 | #endif | 8181 | #endif |
| 8191 | 8182 | ||
| 8192 | if (flags & YNegative) | 8183 | if (flags & YNegative) |
| 8193 | f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height | 8184 | f->top_pos = (FRAME_X_DISPLAY_INFO (f)->height - height + f->top_pos); |
| 8194 | - FRAME_X_OUTPUT (f)->y_pixels_outer_diff | ||
| 8195 | |||
| 8196 | /* Assume the window manager decorations are the same size on | ||
| 8197 | three sides, i.e. left, right and bottom. This is to | ||
| 8198 | compensate for the bottom part. */ | ||
| 8199 | - FRAME_X_OUTPUT (f)->x_pixels_outer_diff | ||
| 8200 | - height | ||
| 8201 | + f->top_pos); | ||
| 8202 | } | 8185 | } |
| 8203 | 8186 | ||
| 8204 | /* The left_pos and top_pos | 8187 | /* The left_pos and top_pos |
| @@ -8314,7 +8297,9 @@ x_check_expected_move (f) | |||
| 8314 | FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; | 8297 | FRAME_X_OUTPUT (f)->move_offset_left = expect_left - f->left_pos; |
| 8315 | FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; | 8298 | FRAME_X_OUTPUT (f)->move_offset_top = expect_top - f->top_pos; |
| 8316 | 8299 | ||
| 8317 | x_set_offset (f, expect_left, expect_top, 1); | 8300 | f->left_pos = expect_left; |
| 8301 | f->top_pos = expect_top; | ||
| 8302 | x_set_offset (f, expect_left, expect_top, 0); | ||
| 8318 | } | 8303 | } |
| 8319 | else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) | 8304 | else if (FRAME_X_DISPLAY_INFO (f)->wm_type == X_WMTYPE_UNKNOWN) |
| 8320 | FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; | 8305 | FRAME_X_DISPLAY_INFO (f)->wm_type = X_WMTYPE_B; |