Proposal for `define-toggle-variable'
17 years, 6 months
Zajcev Evgeny
Hello there!
I would like to see macro like below, defined somewhere in (S)XEmacs
distribution:
(defmacro define-toggle-variable (var value doc &rest args)
"Define new toggle variable.
VAR is either a symbol, or list of two symbols in form
(VARNAME FUNCNAME), where VARNAME specifies name for variable and
FUNCNAME specifies name for toggle command.
VALUE, DOC and ARGS are same as for `defcustom'.
ARGS may content additional :message keyword of boolean value.
If value for :message keyword is non-nil then display message in echo
area when toggling value."
(let ((funame (or (and (listp var) (cadr var)) var))
(var (or (and (listp var) (car var)) var))
(msg (plist-get args :message)))
(setq args (plist-remprop args :message))
`(progn
(defcustom ,var ,value ,doc
:type 'boolean ,@args)
(defun ,funame (arg)
,(format "Toggle `%s' on or off." var)
(interactive "_P")
(customize-set-variable
',var (if (null arg)
(not ,var)
(> (prefix-numeric-value arg) 0)))
,(when msg
`(message "%S is %s" ',var (if ,var "ON" "OFF")))))))
this macro simplifies definition of toggle variables/commands. For
example:
(define-toggle-variable (debug-on-error toggle-debug-on-error) nil
"Toggle debugger on error."
:message t)
or
(define-toggle-variable
(whitespace-check-buffer-trailing whitespace-toggle-trailing-check) nil
"Toggle checking for trailing space in buffer."
:message nil
:set (lambda (s v)
(set s v)
(message "Will%s check for trailing space in buffer."
(if v "" " not"))
(when v (whitespace-buffer-trailing))))
What do you think guys, do we need that stuff? And if we do, what is
the best place to put it in?
Thanks!
--
lg
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
Scrollbar Left Side
17 years, 6 months
David Raleigh Arnold
It should be obvious that it is better to have the vertical scrollbar
on the left side, because there is more text on the left side than
the right and because it is more common to want to access the beginning
of a line than the end. Bill Gates puts scrollbars on the right so that
the window will seem more like the page of a written book. This makes
no sense, but it's done that way so that windows users won't be afraid.
That's fine. Why can't I persuade xemacs to put the vertical scrollbar
on the left side, where I want it? I can't find any option, or
documentation for one, anywhere on the xemacs web site.
There is a way with emacs, but it's not in their menus either. daveA
--
Free download of technical exercises worth a lifetime of practice:
http://www.openguitar.com/dynamic.html :::: You can play the cards
you're dealt, or improve your hand with DGT. Very easy guitar
music, solos, duets, exercises, etc. draTrapVISIT(a)openguitar.com
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
[RFC] whitespace.el
17 years, 6 months
Didier Verna
Hello,
I have some extensions to whitespace.el that I'd like to commit, but I
would like to know the status wrt GNU Emacs:
- No news from the apparent maintainer: Rajesh Vaidheeswarran <rv(a)gnu.org>
- Last incorporation in packages seems to be 2 years old:
$Id: whitespace.el,v 1.3 2005/03/25 17:09:08 aidan Exp $
- But it says: Synched up with: FSF 21.3.
- Advertised URL is inoperative: http://www.dsmit.com/lisp/
So, should I just commit my changes, propose them to the GNU Emacs team,
or what ?
--
Read the Jazz Blog !! http://jazzblog.didierverna.com
Didier Verna, didier(a)lrde.epita.fr, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier(a)xemacs.org
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
XEmacs Packages have been pre-released (2007-05-02-12)
17 years, 6 months
Norbert Koch
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
Hey there everyone.
I have just added the following packages to the 'Pre-Releases'
directory:
New Packages in Pre-Release:
===========================
text-modes-1.94-pkg.tar.gz upstream version: none
Previously Announced Packages Still in Pre-Release:
==================================================
Detailed Changes:
================
- ------- ChangeLog Entries from xemacs-packages/text-modes/ChangeLog -------
2007-05-02 Norbert Koch <viteno(a)xemacs.org>
* Makefile (VERSION): XEmacs package 1.94 released.
2007-05-02 Didier Verna <didier(a)xemacs.org>
* whitespace.el (whitespace-buffer): Fix and improve the
documentation string.
* whitespace.el (whitespace-cleanup): Advertise
`whitespace-buffer' for whitespace problems description.
Installing These:
================
Manually:
- --------
1) Download the packages that you want to install from:
/ftp.xemacs.org:/pub/xemacs/beta/experimental/packages/
2) Unpack them to: [1]
/usr/local/lib/xemacs/xemacs-packages/
3) Re-start XEmacs.
Using XEmacs Package Tools (XEmacs 21.[245].x):
- ----------------------------------------------
1) Tools -> Packages -> Add Download Site -> Pre-Releases
2) Tools -> Packages -> List and Install
3) Select the packages you wish to install (there are brief
instructions at the bottom of the packages buffer).
4) Packages -> Install/Remove Selected
5) Re-start XEmacs.
Using XEmacs Package Tools (XEmacs 21.1.14):
- -------------------------------------------
1) Options -> Manage Packages -> Add Download Site -> Pre-Releases
2) Options -> Manage Packages -> List and Install
3 - 5) As per XEmacs 21.[245].x.
norbert - XEmacs Package Release Manager.
Footnotes:
[1] Note: Mule packages should be installed into:
/usr/local/lib/xemacs/mule-packages/
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.6 (GNU/Linux)
iD8DBQFGOG74gu3ywdHdhM0RAi3HAKDFyfZIbupP80+v6YxZd9J7uhf+xACbBRch
f8zHYMN9jplqWnzGSYBj3VA=
=679V
-----END PGP SIGNATURE-----
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta
[AC FIXED] Re: [Bug: 21.5-b27] whitespace-describe function is missing
17 years, 6 months
Didier Verna
NOTE: This patch has been committed. The version below is
informational only (whitespace differences have been removed).
skip(a)pobox.com wrote:
> The whitespace module is missing whitespace-describe but the docstring
> for whitespace-cleanup refers the user to it as a way to get a summary
> of the various whitespace problems the module purports to solve.
Fixed (see patch below). Sorry, Norbert !! :-/
xemacs-packages/text-modes/ChangeLog addition:
2007-05-02 Didier Verna <didier(a)xemacs.org>
* whitespace.el (whitespace-buffer): Fix and improve the
documentation string.
* whitespace.el (whitespace-cleanup): Advertise
`whitespace-buffer' for whitespace problems description.
XEmacs Packages source patch:
Diff command: cvs -q diff -u -t -b -B -w
Files affected: xemacs-packages/text-modes/whitespace.el
Index: xemacs-packages/text-modes/whitespace.el
===================================================================
RCS file: /pack/xemacscvs/XEmacs/packages/xemacs-packages/text-modes/whitespace.el,v
retrieving revision 1.4
diff -u -u -t -b -B -w -r1.4 whitespace.el
--- xemacs-packages/text-modes/whitespace.el 30 Apr 2007 15:50:35 -0000 1.4
+++ xemacs-packages/text-modes/whitespace.el 2 May 2007 08:12:12 -0000
@@ -6,7 +6,7 @@
;; Maintainer: Didier Verna <didier(a)xemacs.org>
;; Keywords: convenience
-;; $Id: whitespace.el,v 1.3 2005/03/25 17:09:08 aidan Exp $
+;; $Id: whitespace.el,v 1.4 2007/04/30 15:50:35 didierv Exp $
;; This file is part of GNU Emacs.
;; GNU Emacs is free software; you can redistribute it and/or modify
@@ -509,17 +509,19 @@
;;;###autoload
(defun whitespace-buffer (&optional quiet)
"Find five different types of white spaces in buffer.
+
These are:
-1. Leading space \(empty lines at the top of a file\).
-2. Trailing space \(empty lines at the end of a file\).
-3. Indentation space \(8 or more spaces, that should be replaced with TABS\).
-4. Spaces followed by a TAB. \(Almost always, we never want that\).
-5. Spaces or TABS at the end of a line.
-
-Check for whitespace only if this buffer really contains a non-empty file
-and:
-1. the major mode is one of the whitespace-modes, or
-2. `whitespace-buffer' was explicitly called with a prefix argument."
+1. Leading space: empty lines at the top of a file (should be removed).
+2. Trailing space: empty lines at the end of a file (should be removed).
+3. Indentation space: 8 or more spaces at beginning of line
+ (should be replaced with TABS).
+4. Spaces followed by a TAB (should be replaced by TABS).
+5. Spaces or TABS at the end of a line (should be removed).
+
+Check for whitespace only if buffer really contains a non-empty file, and:
+1. the file matches one item of `whitespace-files', or
+2. the major mode matches one item of `whitespace-modes', or
+3. `whitespace-buffer' was explicitly called with a prefix argument."
(interactive)
(let ((whitespace-error nil))
(whitespace-check-whitespace-mode current-prefix-arg)
@@ -624,7 +626,7 @@
(defun whitespace-cleanup ()
"Cleanup the five different kinds of whitespace problems.
-Use \\[describe-function] whitespace-describe to read a summary of the
+Use \`\\[describe-function] whitespace-buffer' to read a summary of the
whitespace problems."
(interactive)
;; If this buffer really contains a file, then run, else quit.
--
Read the Jazz Blog !! http://jazzblog.didierverna.com
Didier Verna, didier(a)lrde.epita.fr, http://www.lrde.epita.fr/~didier
EPITA / LRDE, 14-16 rue Voltaire Tel.+33 (1) 44 08 01 85
94276 Le Kremlin-Bicêtre, France Fax.+33 (1) 53 14 59 22 didier(a)xemacs.org
_______________________________________________
XEmacs-Beta mailing list
XEmacs-Beta(a)xemacs.org
http://calypso.tux.org/cgi-bin/mailman/listinfo/xemacs-beta