Re: Aliasing zmacs-regions, providing a transient-mark-mode
Brian Palmer <[email protected]> 08 Apr 2004 21:44:32 -0700
| Newsgroups | gmane.emacs.xemacs.design |
|---|---|
| Message-ID | <[email protected]> |
"Stephen J. Turnbull" <[email protected]> writes: > Brian> some people ignore the function in their code and simply > Brian> set transient-mark-mode the variable directly. Would that > Brian> be supported? ie., have > > Oh, wonderful. [They _set_ it, not _bind_ it?] Well, I may have been overly swayed by not applying a scale-check on the google results. I did a search for the quoted phrase "setq transient-mark-mode" (yes, there are other ways to set it, but my feeling is that this should capture the majority of times people would set the variable). It returns 426 results. Of those, the clear majority are people's individual .emacs files, which are not likely to be a big issue, if you assume that people are mostly stable with which emacs branch they're working with. Of those that aren't people's .emacs, there's cua-mode (whose latest form already doesn't work with xemacs, judging from http://www.cua.dk/cua.html). There are references, bizarrely enough, in the xemacs lispref manual, which uses the function transient-mark-mode as an example of how to write a toggleable minor mode. "let ((transient-mark-mode" is even fewer hits, at 120. "boundp 'transient-mark-mode" is 354 In other words, it doesn't seem to be that common, at least in pages or files distributed along the google-visible web. That suggests to me we could skip having the variable. As Hrvoje pointed out, a lot of those people or packages who care about it are using a guard (checking boundp or fboundp as appropriate), anyway. > No, it's gonna have to be transient-mark-mode or nothing. If I were > rms I certainly wouldn't s/mark/region/; it's not that bad a name that > it justifies a global substitution on a user variable, so the only > reason to do it would be make things equally painful for XEmacs users > and GNU Emacs users. In light of the relatively scanty google results, do you still say that, or would a (defvaralias 'transient-region-mode 'zmacs-regions) (defun transient-region-mode () (interactive "P") (setq transient-mark-mode (if (null arg) (not transient-mark-mode) (> (prefix-numeric-value arg) 0))) and then an alias set up for transient-mark-mode do ? And, if the latter, should the alias be provided with a define-compatible-function-alias ? And in a package in fsf-compat, or just in simple.el ? -- I'm awfully glad I'm a Beta, because I don't work so hard.