Mercurial > emacs
comparison etc/NEWS @ 99994:178782cd97e1
Explain why region-active-p is often not the best function to use.
author | Chong Yidong <cyd@stupidchicken.com> |
---|---|
date | Thu, 27 Nov 2008 17:08:44 +0000 |
parents | 821cd83f08ea |
children | 40a45069dd91 |
comparison
equal
deleted
inserted
replaced
99993:26f94bce1bab | 99994:178782cd97e1 |
---|---|
1242 +++ | 1242 +++ |
1243 *** Commands should use `use-region-p' to test whether there is | 1243 *** Commands should use `use-region-p' to test whether there is |
1244 an active region that they should operate on. | 1244 an active region that they should operate on. |
1245 | 1245 |
1246 *** `region-active-p' returns non-nil when Transient Mark mode is | 1246 *** `region-active-p' returns non-nil when Transient Mark mode is |
1247 enabled and there is an active region. This is NOT the best function | 1247 enabled and the mark is active. Most commands that act specially on |
1248 to use to test whether a command should operate on the region instead | 1248 the active region in Transient Mark mode should use `use-region-p' |
1249 of the usual behavior -- for that, use `use-region-p'. | 1249 instead of `region-active-p', because `use-region-p' obeys the new |
1250 user option `use-empty-active-region' (see Editing Changes, above). | |
1250 | 1251 |
1251 +++ | 1252 +++ |
1252 *** If a command sets `transient-mark-mode' to (only . OLDVAL), that | 1253 *** If a command sets `transient-mark-mode' to (only . OLDVAL), that |
1253 means to activate transient-mark-mode temporarily, until the next | 1254 means to activate transient-mark-mode temporarily, until the next |
1254 unshifted point motion command or mark deactivation. Afterwards, | 1255 unshifted point motion command or mark deactivation. Afterwards, |