unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* Dashes in mode-line
@ 2010-10-18 13:36 Julien Danjou
  2010-10-18 14:52 ` Eli Zaretskii
  0 siblings, 1 reply; 17+ messages in thread
From: Julien Danjou @ 2010-10-18 13:36 UTC (permalink / raw)
  To: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 386 bytes --]

Hi,

What's the current status and rational about keeping the dashes in
mode-line?

Reading the mail archives, I've seen Miles claiming it was only needed
for vt52 which we hope are not used anymore nowadays.

It seems rather useless now, so I propose to remove them. Attached is a
first version of a patch implementing this removal. It really makes the
mode-line easier to read IMHO.


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #2: 0001-bindings-remove-dashes-in-mode-line.patch --]
[-- Type: text/x-diff, Size: 3413 bytes --]

From c33afb4c39717145a604951068a1e2824ec1138c Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 18 Oct 2010 15:33:31 +0200
Subject: [PATCH] bindings: remove dashes in mode-line

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 etc/tutorials/TUTORIAL |   12 ++++++------
 lisp/ChangeLog         |    4 ++++
 lisp/bindings.el       |    9 ++++-----
 3 files changed, 14 insertions(+), 11 deletions(-)

diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL
index 1d80f4e..f566df9 100644
--- a/etc/tutorials/TUTORIAL
+++ b/etc/tutorials/TUTORIAL
@@ -498,12 +498,12 @@ you save, Emacs leaves the original file under a changed name in case
 you later decide that your changes were a mistake.
 
 If you look near the bottom of the screen you will see a line that
-begins and ends with dashes, and starts with "--:--- TUTORIAL" or
-something like that.  This part of the screen normally shows the name
-of the file that you are visiting.  Right now, you are visiting a file
-called "TUTORIAL" which is your personal scratch copy of the Emacs
-tutorial.  When you find a file with Emacs, that file's name will
-appear in that precise spot.
+begins with dashes, and starts with "--:--- TUTORIAL" or something
+like that.  This part of the screen normally shows the name of the
+file that you are visiting.  Right now, you are visiting a file called
+"TUTORIAL" which is your personal scratch copy of the Emacs tutorial.
+When you find a file with Emacs, that file's name will appear in that
+precise spot.
 
 One special thing about the command for finding a file is that you
 have to say what file name you want.  We say the command "reads an
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 1195fe8..be65819 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-18  Julien Danjou  <julien@danjou.info>
+
+	* bindings.el: Replaces dashes by spaces in default `mode-line-format'.
+
 2010-10-16  Chong Yidong  <cyd@stupidchicken.com>
 
 	* cus-theme.el (custom-theme--migrate-settings): New var.
diff --git a/lisp/bindings.el b/lisp/bindings.el
index d19db2c..2f8c8aa 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -318,7 +318,7 @@ Keymap to display on column and line numbers.")
 mouse-2: Make current window occupy the whole frame\n\
 mouse-3: Remove current window from display")
        (recursive-edit-help-echo "Recursive edit, type C-M-c to get out")
-       (dashes (propertize "--" 'help-echo help-echo))
+       (spaces (propertize "  " 'help-echo help-echo))
        (standard-mode-line-format
 	(list
 	 "%e"
@@ -334,9 +334,8 @@ mouse-3: Remove current window from display")
 	 '(vc-mode vc-mode)
 	 (propertize "  " 'help-echo help-echo)
 	 'mode-line-modes
-	 `(which-func-mode ("" which-func-format ,dashes))
-	 `(global-mode-string ("" global-mode-string ,dashes))
-	 (propertize "-%-" 'help-echo help-echo)))
+	 `(which-func-mode ("" which-func-format ,spaces))
+	 `(global-mode-string ("" global-mode-string ,spaces))))
        (standard-mode-line-modes
 	(list
 	 (propertize "%[" 'help-echo recursive-edit-help-echo)
@@ -362,7 +361,7 @@ mouse-3: Toggle minor modes"
 				 'mouse-2 #'mode-line-widen))
 	 (propertize ")" 'help-echo help-echo)
 	 (propertize "%]" 'help-echo recursive-edit-help-echo)
-	 (propertize "--" 'help-echo help-echo)))
+         spaces))
 
        (standard-mode-line-position
 	`((-3 ,(propertize
-- 
1.7.1


[-- Attachment #3: Type: text/plain, Size: 79 bytes --]


-- 
Julien Danjou
// ᐰ <julien@danjou.info>   http://julien.danjou.info

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-18 13:36 Dashes in mode-line Julien Danjou
@ 2010-10-18 14:52 ` Eli Zaretskii
  2010-10-19 10:32   ` Julien Danjou
                     ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-18 14:52 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-devel

> From: Julien Danjou <julien@danjou.info>
> Date: Mon, 18 Oct 2010 15:36:20 +0200
> 
> What's the current status and rational about keeping the dashes in
> mode-line?
> 
> Reading the mail archives, I've seen Miles claiming it was only needed
> for vt52 which we hope are not used anymore nowadays.
> 
> It seems rather useless now, so I propose to remove them. Attached is a
> first version of a patch implementing this removal. It really makes the
> mode-line easier to read IMHO.

I would support removing it in GUI sessions, but doing that on a TTY
sounds too drastic.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-18 14:52 ` Eli Zaretskii
@ 2010-10-19 10:32   ` Julien Danjou
  2010-10-19 13:09     ` Eli Zaretskii
  2010-10-19 12:29   ` Dashes in mode-line Deniz Dogan
  2010-10-19 13:49   ` Deniz Dogan
  2 siblings, 1 reply; 17+ messages in thread
From: Julien Danjou @ 2010-10-19 10:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 182 bytes --]

On Mon, Oct 18 2010, Eli Zaretskii wrote:

> I would support removing it in GUI sessions, but doing that on a TTY
> sounds too drastic.

What do you think about the following then?


[-- Attachment #2: 0001-bindings-remove-dashes-in-mode-line.patch --]
[-- Type: text/x-diff, Size: 3619 bytes --]

From 5b9a4ab22ee3928072c23218ae64f54549c0838a Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 18 Oct 2010 15:33:31 +0200
Subject: [PATCH] bindings: remove dashes in mode-line

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 etc/tutorials/TUTORIAL |   12 ++++++------
 lisp/ChangeLog         |    4 ++++
 lisp/bindings.el       |   11 ++++++-----
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL
index 1d80f4e..f566df9 100644
--- a/etc/tutorials/TUTORIAL
+++ b/etc/tutorials/TUTORIAL
@@ -498,12 +498,12 @@ you save, Emacs leaves the original file under a changed name in case
 you later decide that your changes were a mistake.
 
 If you look near the bottom of the screen you will see a line that
-begins and ends with dashes, and starts with "--:--- TUTORIAL" or
-something like that.  This part of the screen normally shows the name
-of the file that you are visiting.  Right now, you are visiting a file
-called "TUTORIAL" which is your personal scratch copy of the Emacs
-tutorial.  When you find a file with Emacs, that file's name will
-appear in that precise spot.
+begins with dashes, and starts with "--:--- TUTORIAL" or something
+like that.  This part of the screen normally shows the name of the
+file that you are visiting.  Right now, you are visiting a file called
+"TUTORIAL" which is your personal scratch copy of the Emacs tutorial.
+When you find a file with Emacs, that file's name will appear in that
+precise spot.
 
 One special thing about the command for finding a file is that you
 have to say what file name you want.  We say the command "reads an
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0e20ffd..2316a22 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-18  Julien Danjou  <julien@danjou.info>
+
+	* bindings.el: Replaces dashes by spaces in default `mode-line-format'.
+
 2010-10-17  Agustín Martín  <agustin.martin@hispalinux.es>
 
 	* textmodes/ispell.el (ispell-aspell-find-dictionary): Fix
diff --git a/lisp/bindings.el b/lisp/bindings.el
index d19db2c..2b11f44 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -318,7 +318,7 @@ Keymap to display on column and line numbers.")
 mouse-2: Make current window occupy the whole frame\n\
 mouse-3: Remove current window from display")
        (recursive-edit-help-echo "Recursive edit, type C-M-c to get out")
-       (dashes (propertize "--" 'help-echo help-echo))
+       (spaces (propertize "  " 'help-echo help-echo))
        (standard-mode-line-format
 	(list
 	 "%e"
@@ -334,9 +334,10 @@ mouse-3: Remove current window from display")
 	 '(vc-mode vc-mode)
 	 (propertize "  " 'help-echo help-echo)
 	 'mode-line-modes
-	 `(which-func-mode ("" which-func-format ,dashes))
-	 `(global-mode-string ("" global-mode-string ,dashes))
-	 (propertize "-%-" 'help-echo help-echo)))
+	 `(which-func-mode ("" which-func-format ,spaces))
+	 `(global-mode-string ("" global-mode-string ,spaces))
+         `(:eval (unless window-system
+                   ,(propertize "-%-" 'help-echo help-echo)))))
        (standard-mode-line-modes
 	(list
 	 (propertize "%[" 'help-echo recursive-edit-help-echo)
@@ -362,7 +363,7 @@ mouse-3: Toggle minor modes"
 				 'mouse-2 #'mode-line-widen))
 	 (propertize ")" 'help-echo help-echo)
 	 (propertize "%]" 'help-echo recursive-edit-help-echo)
-	 (propertize "--" 'help-echo help-echo)))
+         spaces))
 
        (standard-mode-line-position
 	`((-3 ,(propertize
-- 
1.7.2.3


[-- Attachment #3: Type: text/plain, Size: 79 bytes --]


-- 
Julien Danjou
// ᐰ <julien@danjou.info>   http://julien.danjou.info

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-18 14:52 ` Eli Zaretskii
  2010-10-19 10:32   ` Julien Danjou
@ 2010-10-19 12:29   ` Deniz Dogan
  2010-10-19 13:08     ` Eli Zaretskii
  2010-10-19 13:49   ` Deniz Dogan
  2 siblings, 1 reply; 17+ messages in thread
From: Deniz Dogan @ 2010-10-19 12:29 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Julien Danjou, emacs-devel

2010/10/18 Eli Zaretskii <eliz@gnu.org>:
>> From: Julien Danjou <julien@danjou.info>
>> Date: Mon, 18 Oct 2010 15:36:20 +0200
>>
>> What's the current status and rational about keeping the dashes in
>> mode-line?
>>
>> Reading the mail archives, I've seen Miles claiming it was only needed
>> for vt52 which we hope are not used anymore nowadays.
>>
>> It seems rather useless now, so I propose to remove them. Attached is a
>> first version of a patch implementing this removal. It really makes the
>> mode-line easier to read IMHO.
>
> I would support removing it in GUI sessions, but doing that on a TTY
> sounds too drastic.
>

Would you be in favor of making it easily configurable and make GUI
Emacs use spaces by default and TTY Emacs dashes?

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 12:29   ` Dashes in mode-line Deniz Dogan
@ 2010-10-19 13:08     ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-19 13:08 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: julien, emacs-devel

> From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
> Date: Tue, 19 Oct 2010 14:29:10 +0200
> Cc: Julien Danjou <julien@danjou.info>, emacs-devel@gnu.org
> 
> > I would support removing it in GUI sessions, but doing that on a TTY
> > sounds too drastic.
> >
> 
> Would you be in favor of making it easily configurable and make GUI
> Emacs use spaces by default and TTY Emacs dashes?

No.  Making an option out of every disagreement is silly, IMO.  We
should decide what to do and go with that.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 10:32   ` Julien Danjou
@ 2010-10-19 13:09     ` Eli Zaretskii
  2010-10-19 14:59       ` Julien Danjou
                         ` (2 more replies)
  0 siblings, 3 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-19 13:09 UTC (permalink / raw)
  To: Julien Danjou; +Cc: emacs-devel

> From: Julien Danjou <julien@danjou.info>
> Cc: emacs-devel@gnu.org
> Date: Tue, 19 Oct 2010 12:32:33 +0200
> 
> +         `(:eval (unless window-system
> +                   ,(propertize "-%-" 'help-echo help-echo)))))

Using window-system is not right here, because the DOS port defines a
non-nil value, but uses a text terminal.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-18 14:52 ` Eli Zaretskii
  2010-10-19 10:32   ` Julien Danjou
  2010-10-19 12:29   ` Dashes in mode-line Deniz Dogan
@ 2010-10-19 13:49   ` Deniz Dogan
  2010-10-19 14:31     ` Eli Zaretskii
  2 siblings, 1 reply; 17+ messages in thread
From: Deniz Dogan @ 2010-10-19 13:49 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Julien Danjou, emacs-devel

2010/10/18 Eli Zaretskii <eliz@gnu.org>:
>> From: Julien Danjou <julien@danjou.info>
>> Date: Mon, 18 Oct 2010 15:36:20 +0200
>>
>> What's the current status and rational about keeping the dashes in
>> mode-line?
>>
>> Reading the mail archives, I've seen Miles claiming it was only needed
>> for vt52 which we hope are not used anymore nowadays.
>>
>> It seems rather useless now, so I propose to remove them. Attached is a
>> first version of a patch implementing this removal. It really makes the
>> mode-line easier to read IMHO.
>
> I would support removing it in GUI sessions, but doing that on a TTY
> sounds too drastic.
>

Why is it drastic to do this in a TTY? The vt52 problem?

-- 
Deniz Dogan



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 13:49   ` Deniz Dogan
@ 2010-10-19 14:31     ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-19 14:31 UTC (permalink / raw)
  To: Deniz Dogan; +Cc: julien, emacs-devel

> From: Deniz Dogan <deniz.a.m.dogan@gmail.com>
> Date: Tue, 19 Oct 2010 15:49:17 +0200
> Cc: Julien Danjou <julien@danjou.info>, emacs-devel@gnu.org
> 
> Why is it drastic to do this in a TTY?

Because, depending on the screen colors, the mode line may not stand
out well enough without the dashes.  TTYs lack the 3D appearance of
the mode line we have in GUI sessions; they need something to replace
that.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 13:09     ` Eli Zaretskii
@ 2010-10-19 14:59       ` Julien Danjou
  2010-10-19 19:21         ` Chong Yidong
  2010-10-19 15:51       ` Jason Rumney
  2010-10-20 13:05       ` Misleading `window-system' docstring (was Re: Dashes in mode-line) Štěpán Němec
  2 siblings, 1 reply; 17+ messages in thread
From: Julien Danjou @ 2010-10-19 14:59 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: emacs-devel

[-- Attachment #1: Type: text/plain, Size: 188 bytes --]

On Tue, Oct 19 2010, Eli Zaretskii wrote:

> Using window-system is not right here, because the DOS port defines a
> non-nil value, but uses a text terminal.

Fine, new version attached.


[-- Attachment #2: 0001-bindings-remove-dashes-in-mode-line.patch --]
[-- Type: text/x-diff, Size: 3651 bytes --]

From 52ffac3b023140720b76c0e4b20c681c0754e26c Mon Sep 17 00:00:00 2001
From: Julien Danjou <julien@danjou.info>
Date: Mon, 18 Oct 2010 15:33:31 +0200
Subject: [PATCH] bindings: remove dashes in mode-line

Signed-off-by: Julien Danjou <julien@danjou.info>
---
 etc/tutorials/TUTORIAL |   12 ++++++------
 lisp/ChangeLog         |    4 ++++
 lisp/bindings.el       |   11 ++++++-----
 3 files changed, 16 insertions(+), 11 deletions(-)

diff --git a/etc/tutorials/TUTORIAL b/etc/tutorials/TUTORIAL
index 1d80f4e..f566df9 100644
--- a/etc/tutorials/TUTORIAL
+++ b/etc/tutorials/TUTORIAL
@@ -498,12 +498,12 @@ you save, Emacs leaves the original file under a changed name in case
 you later decide that your changes were a mistake.
 
 If you look near the bottom of the screen you will see a line that
-begins and ends with dashes, and starts with "--:--- TUTORIAL" or
-something like that.  This part of the screen normally shows the name
-of the file that you are visiting.  Right now, you are visiting a file
-called "TUTORIAL" which is your personal scratch copy of the Emacs
-tutorial.  When you find a file with Emacs, that file's name will
-appear in that precise spot.
+begins with dashes, and starts with "--:--- TUTORIAL" or something
+like that.  This part of the screen normally shows the name of the
+file that you are visiting.  Right now, you are visiting a file called
+"TUTORIAL" which is your personal scratch copy of the Emacs tutorial.
+When you find a file with Emacs, that file's name will appear in that
+precise spot.
 
 One special thing about the command for finding a file is that you
 have to say what file name you want.  We say the command "reads an
diff --git a/lisp/ChangeLog b/lisp/ChangeLog
index 0e20ffd..2316a22 100644
--- a/lisp/ChangeLog
+++ b/lisp/ChangeLog
@@ -1,3 +1,7 @@
+2010-10-18  Julien Danjou  <julien@danjou.info>
+
+	* bindings.el: Replaces dashes by spaces in default `mode-line-format'.
+
 2010-10-17  Agustín Martín  <agustin.martin@hispalinux.es>
 
 	* textmodes/ispell.el (ispell-aspell-find-dictionary): Fix
diff --git a/lisp/bindings.el b/lisp/bindings.el
index d19db2c..753e8a5 100644
--- a/lisp/bindings.el
+++ b/lisp/bindings.el
@@ -318,7 +318,7 @@ Keymap to display on column and line numbers.")
 mouse-2: Make current window occupy the whole frame\n\
 mouse-3: Remove current window from display")
        (recursive-edit-help-echo "Recursive edit, type C-M-c to get out")
-       (dashes (propertize "--" 'help-echo help-echo))
+       (spaces (propertize "  " 'help-echo help-echo))
        (standard-mode-line-format
 	(list
 	 "%e"
@@ -334,9 +334,10 @@ mouse-3: Remove current window from display")
 	 '(vc-mode vc-mode)
 	 (propertize "  " 'help-echo help-echo)
 	 'mode-line-modes
-	 `(which-func-mode ("" which-func-format ,dashes))
-	 `(global-mode-string ("" global-mode-string ,dashes))
-	 (propertize "-%-" 'help-echo help-echo)))
+	 `(which-func-mode ("" which-func-format ,spaces))
+	 `(global-mode-string ("" global-mode-string ,spaces))
+         `(:eval (when (or (not window-system) (eq window-system 'pc))
+                   ,(propertize "-%-" 'help-echo help-echo)))))
        (standard-mode-line-modes
 	(list
 	 (propertize "%[" 'help-echo recursive-edit-help-echo)
@@ -362,7 +363,7 @@ mouse-3: Toggle minor modes"
 				 'mouse-2 #'mode-line-widen))
 	 (propertize ")" 'help-echo help-echo)
 	 (propertize "%]" 'help-echo recursive-edit-help-echo)
-	 (propertize "--" 'help-echo help-echo)))
+         spaces))
 
        (standard-mode-line-position
 	`((-3 ,(propertize
-- 
1.7.2.3


[-- Attachment #3: Type: text/plain, Size: 81 bytes --]



-- 
Julien Danjou
// ᐰ <julien@danjou.info>   http://julien.danjou.info

^ permalink raw reply related	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 13:09     ` Eli Zaretskii
  2010-10-19 14:59       ` Julien Danjou
@ 2010-10-19 15:51       ` Jason Rumney
  2010-10-19 18:30         ` Eli Zaretskii
  2010-10-20 13:05       ` Misleading `window-system' docstring (was Re: Dashes in mode-line) Štěpán Němec
  2 siblings, 1 reply; 17+ messages in thread
From: Jason Rumney @ 2010-10-19 15:51 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Julien Danjou, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Julien Danjou <julien@danjou.info>
>> Cc: emacs-devel@gnu.org
>> Date: Tue, 19 Oct 2010 12:32:33 +0200
>> 
>> +         `(:eval (unless window-system
>> +                   ,(propertize "-%-" 'help-echo help-echo)))))
>
> Using window-system is not right here, because the DOS port defines a
> non-nil value, but uses a text terminal.

Can we fix that if we intend on keeping the DOS port around?

I know defining window-system to non-nil used to be the only way to
get font-lock and other features that the DOS port has had for longer
than other text terminals, but is there any reason for it now other than
historical continuity?
 



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 15:51       ` Jason Rumney
@ 2010-10-19 18:30         ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-19 18:30 UTC (permalink / raw)
  To: Jason Rumney; +Cc: julien, emacs-devel

> From: Jason Rumney <jasonr@gnu.org>
> Cc: Julien Danjou <julien@danjou.info>,  emacs-devel@gnu.org
> Date: Tue, 19 Oct 2010 23:51:14 +0800
> 
> > Using window-system is not right here, because the DOS port defines a
> > non-nil value, but uses a text terminal.
> 
> Can we fix that if we intend on keeping the DOS port around?

You mean, can _I_ fix it?  Yes, but is that an efficient use of my
time?  There are alternative (better) methods of testing whether a
display can support graphics.  These methods exist since Emacs 21, and
if we want to clean this up, it could be a better idea to deprecate
window-system and replace it with the appropriate display-*-p
predicates all over.

> I know defining window-system to non-nil used to be the only way to
> get font-lock and other features that the DOS port has had for longer
> than other text terminals, but is there any reason for it now other than
> historical continuity?

Probably not, at least not important reasons.  The DOS port can
actually work in -nw mode, whereby it does not use direct screen
access routines, but that serves only as a debugging aid for quite
some time now.

The main reason it remains is that I would need to go through every
Lisp source that references it and decide what to do instead there.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Dashes in mode-line
  2010-10-19 14:59       ` Julien Danjou
@ 2010-10-19 19:21         ` Chong Yidong
  0 siblings, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2010-10-19 19:21 UTC (permalink / raw)
  To: emacs-devel

Julien Danjou <julien@danjou.info> writes:

> On Tue, Oct 19 2010, Eli Zaretskii wrote:
>
>> Using window-system is not right here, because the DOS port defines a
>> non-nil value, but uses a text terminal.
>
> Fine, new version attached.

I think `display-graphic-p' is what you want.  I've checked in your
patch, with that correction.  Thanks.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Misleading `window-system' docstring (was Re: Dashes in mode-line)
  2010-10-19 13:09     ` Eli Zaretskii
  2010-10-19 14:59       ` Julien Danjou
  2010-10-19 15:51       ` Jason Rumney
@ 2010-10-20 13:05       ` Štěpán Němec
  2010-10-20 18:20         ` Misleading `window-system' docstring Eli Zaretskii
  2 siblings, 1 reply; 17+ messages in thread
From: Štěpán Němec @ 2010-10-20 13:05 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: Julien Danjou, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> From: Julien Danjou <julien@danjou.info>
>> Cc: emacs-devel@gnu.org
>> Date: Tue, 19 Oct 2010 12:32:33 +0200
>> 
>> +         `(:eval (unless window-system
>> +                   ,(propertize "-%-" 'help-echo help-echo)))))
>
> Using window-system is not right here, because the DOS port defines a
> non-nil value, but uses a text terminal.

Could you please fix the docstring of `window-system' to reflect that?
It seems to be widely used that (incorrect, as you point out) way, and
its docstring is pretty clear (and thus incorrect) on the matter:

  The value is nil if the selected frame is on a text-only-terminal.

Štěpán



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Misleading `window-system' docstring
  2010-10-20 13:05       ` Misleading `window-system' docstring (was Re: Dashes in mode-line) Štěpán Němec
@ 2010-10-20 18:20         ` Eli Zaretskii
  2010-10-20 18:32           ` Chong Yidong
  2010-10-21  0:58           ` Stefan Monnier
  0 siblings, 2 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-20 18:20 UTC (permalink / raw)
  To: Štěpán Němec; +Cc: julien, emacs-devel

> From: Štěpán Němec <stepnem@gmail.com>
> Cc: Julien Danjou <julien@danjou.info>,  emacs-devel@gnu.org
> Date: Wed, 20 Oct 2010 15:05:02 +0200
> 
> Eli Zaretskii <eliz@gnu.org> writes:
> 
> >> From: Julien Danjou <julien@danjou.info>
> >> Cc: emacs-devel@gnu.org
> >> Date: Tue, 19 Oct 2010 12:32:33 +0200
> >> 
> >> +         `(:eval (unless window-system
> >> +                   ,(propertize "-%-" 'help-echo help-echo)))))
> >
> > Using window-system is not right here, because the DOS port defines a
> > non-nil value, but uses a text terminal.
> 
> Could you please fix the docstring of `window-system' to reflect that?
> It seems to be widely used that (incorrect, as you point out) way

Actually, there are only a handful of places that use it incorrectly.
Most of the uses compare its value with `x', `w32', etc., which is the
right usage.

> its docstring is pretty clear (and thus incorrect) on the matter:
> 
>   The value is nil if the selected frame is on a text-only-terminal.

I don't mind spelling out the exception, but I actually would like to
add there that using it as a predicate is deprecated, and point to
display-*-p predicates as TRT.  Stefan and Chong, any objections?




^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Misleading `window-system' docstring
  2010-10-20 18:20         ` Misleading `window-system' docstring Eli Zaretskii
@ 2010-10-20 18:32           ` Chong Yidong
  2010-10-21  0:58           ` Stefan Monnier
  1 sibling, 0 replies; 17+ messages in thread
From: Chong Yidong @ 2010-10-20 18:32 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: julien, Štěpán Němec, emacs-devel

Eli Zaretskii <eliz@gnu.org> writes:

>> its docstring is pretty clear (and thus incorrect) on the matter:
>>
>>   The value is nil if the selected frame is on a text-only-terminal.
>
> I don't mind spelling out the exception, but I actually would like to
> add there that using it as a predicate is deprecated, and point to
> display-*-p predicates as TRT.  Stefan and Chong, any objections?

Please go ahead.  Thanks.



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Misleading `window-system' docstring
  2010-10-20 18:20         ` Misleading `window-system' docstring Eli Zaretskii
  2010-10-20 18:32           ` Chong Yidong
@ 2010-10-21  0:58           ` Stefan Monnier
  2010-10-22 10:38             ` Eli Zaretskii
  1 sibling, 1 reply; 17+ messages in thread
From: Stefan Monnier @ 2010-10-21  0:58 UTC (permalink / raw)
  To: Eli Zaretskii; +Cc: julien, Štěpán Němec, emacs-devel

>> The value is nil if the selected frame is on a text-only-terminal.
> I don't mind spelling out the exception, but I actually would like to
> add there that using it as a predicate is deprecated, and point to
> display-*-p predicates as TRT.  Stefan and Chong, any objections?

I don't care about spelling out "the exception" (seems better to just
list the possible values, in that case, tho), but pointing to
display-*-p predicates sounds good.


        Stefan



^ permalink raw reply	[flat|nested] 17+ messages in thread

* Re: Misleading `window-system' docstring
  2010-10-21  0:58           ` Stefan Monnier
@ 2010-10-22 10:38             ` Eli Zaretskii
  0 siblings, 0 replies; 17+ messages in thread
From: Eli Zaretskii @ 2010-10-22 10:38 UTC (permalink / raw)
  To: Stefan Monnier; +Cc: julien, stepnem, emacs-devel

> From: Stefan Monnier <monnier@iro.umontreal.ca>
> Cc: Štěpán Němec <stepnem@gmail.com>,
>   julien@danjou.info,  emacs-devel@gnu.org
> Date: Wed, 20 Oct 2010 20:58:26 -0400
> 
> >> The value is nil if the selected frame is on a text-only-terminal.
> > I don't mind spelling out the exception, but I actually would like to
> > add there that using it as a predicate is deprecated, and point to
> > display-*-p predicates as TRT.  Stefan and Chong, any objections?
> 
> I don't care about spelling out "the exception" (seems better to just
> list the possible values, in that case, tho), but pointing to
> display-*-p predicates sounds good.

Done on the emacs-23 branch (revno 100128 there).




^ permalink raw reply	[flat|nested] 17+ messages in thread

end of thread, other threads:[~2010-10-22 10:38 UTC | newest]

Thread overview: 17+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-10-18 13:36 Dashes in mode-line Julien Danjou
2010-10-18 14:52 ` Eli Zaretskii
2010-10-19 10:32   ` Julien Danjou
2010-10-19 13:09     ` Eli Zaretskii
2010-10-19 14:59       ` Julien Danjou
2010-10-19 19:21         ` Chong Yidong
2010-10-19 15:51       ` Jason Rumney
2010-10-19 18:30         ` Eli Zaretskii
2010-10-20 13:05       ` Misleading `window-system' docstring (was Re: Dashes in mode-line) Štěpán Němec
2010-10-20 18:20         ` Misleading `window-system' docstring Eli Zaretskii
2010-10-20 18:32           ` Chong Yidong
2010-10-21  0:58           ` Stefan Monnier
2010-10-22 10:38             ` Eli Zaretskii
2010-10-19 12:29   ` Dashes in mode-line Deniz Dogan
2010-10-19 13:08     ` Eli Zaretskii
2010-10-19 13:49   ` Deniz Dogan
2010-10-19 14:31     ` Eli Zaretskii

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).