unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
* No coding system in the modeline for unibyte buffers.
@ 2009-01-16 15:59 Juanma Barranquero
  2009-01-16 16:36 ` Eli Zaretskii
  2009-01-16 16:42 ` Stefan Monnier
  0 siblings, 2 replies; 10+ messages in thread
From: Juanma Barranquero @ 2009-01-16 15:59 UTC (permalink / raw)
  To: Emacs developers

Obviously, not a bug:

1997-07-29  Richard Stallman  <rms@psilocin.gnu.ai.mit.edu>

        * xdisp.c (decode_mode_spec_coding): If multibyte chars disabled.
        display only the eol flag.

But, why?

Currently,

 C-x C-b new <RET>
 -*- coding: raw-text-unix -*- <RET>
 C-x C-s new.txt <RET>   ;; -t(Unix)---  new.txt [etc]
 C-x C-k
 C-x C-f new.txt <RET>   ;; -(Unix)---  new.txt [etc]

which works as expected but it's weird.

Is there any downside to just removing the code that forces that behavior?

    Juanma



Index: src/xdisp.c
===================================================================
RCS file: /sources/emacs/emacs/src/xdisp.c,v
retrieving revision 1.1275
diff -u -2 -r1.1275 xdisp.c
--- src/xdisp.c	10 Jan 2009 18:41:07 -0000	1.1275
+++ src/xdisp.c	16 Jan 2009 12:24:56 -0000
@@ -18238,5 +18238,4 @@
 {
   Lisp_Object val;
-  int multibyte = !NILP (current_buffer->enable_multibyte_characters);
   const unsigned char *eol_str;
   int eol_str_len;
@@ -18249,6 +18248,5 @@
   if (!VECTORP (val))		/* Not yet decided.  */
     {
-      if (multibyte)
-	*buf++ = '-';
+      *buf++ = '-';
       if (eol_flag)
 	eoltype = eol_mnemonic_undecided;
@@ -18263,6 +18261,5 @@
       eolvalue = AREF (val, 2);

-      if (multibyte)
-	*buf++ = XFASTINT (CODING_ATTR_MNEMONIC (attrs));
+      *buf++ = XFASTINT (CODING_ATTR_MNEMONIC (attrs));

       if (eol_flag)




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

end of thread, other threads:[~2009-01-17 17:03 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-01-16 15:59 No coding system in the modeline for unibyte buffers Juanma Barranquero
2009-01-16 16:36 ` Eli Zaretskii
2009-01-16 16:42   ` Juanma Barranquero
2009-01-16 16:42 ` Stefan Monnier
2009-01-16 16:46   ` Juanma Barranquero
2009-01-16 20:45     ` Stefan Monnier
2009-01-16 23:47       ` Juanma Barranquero
2009-01-17  2:11         ` Stefan Monnier
2009-01-17  2:24           ` Juanma Barranquero
2009-01-17 17:03   ` Richard M Stallman

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).