From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Glenn Morris Newsgroups: gmane.emacs.bugs Subject: bug#11226: format-mode-line, %z, mode-line-mule-info, and unibyte Date: Wed, 11 Apr 2012 15:16:34 -0400 Message-ID: <72ty0qf59p.fsf@fencepost.gnu.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: dough.gmane.org 1334171824 5579 80.91.229.3 (11 Apr 2012 19:17:04 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Wed, 11 Apr 2012 19:17:04 +0000 (UTC) To: 11226@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Apr 11 21:17:03 2012 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1SI32K-0003Fs-3U for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 21:17:00 +0200 Original-Received: from localhost ([::1]:43265 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI32J-0007jc-E8 for geb-bug-gnu-emacs@m.gmane.org; Wed, 11 Apr 2012 15:16:59 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:38393) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI32H-0007jQ-4m for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 15:16:58 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1SI32E-0004hC-4e for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 15:16:56 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:56088) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1SI32E-0004h6-0x for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 15:16:54 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.72) (envelope-from ) id 1SI33J-0006wK-Qt for bug-gnu-emacs@gnu.org; Wed, 11 Apr 2012 15:18:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Glenn Morris Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 11 Apr 2012 19:18:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 11226 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: X-Debbugs-Original-To: submit@debbugs.gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.133417186826648 (code B ref -1); Wed, 11 Apr 2012 19:18:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 11 Apr 2012 19:17:48 +0000 Original-Received: from localhost ([127.0.0.1]:52625 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SI334-0006vk-Oa for submit@debbugs.gnu.org; Wed, 11 Apr 2012 15:17:47 -0400 Original-Received: from fencepost.gnu.org ([208.118.235.10]:48385) by debbugs.gnu.org with esmtp (Exim 4.72) (envelope-from ) id 1SI332-0006vc-6i for submit@debbugs.gnu.org; Wed, 11 Apr 2012 15:17:45 -0400 Original-Received: from rgm by fencepost.gnu.org with local (Exim 4.71) (envelope-from ) id 1SI31u-0001LH-G1; Wed, 11 Apr 2012 15:16:34 -0400 X-Spook: Leuken-Baden Lon Horiuchi bank War on Terrorism FIPS140 X-Ran: Q:`YSZ~ofTV|QU"Sr.;u#V!Y}}J~}1x@Q@6Zf;VN$ X-Hue: green X-Attribution: GM User-Agent: Gnus (www.gnus.org), GNU Emacs (www.gnu.org/software/emacs/) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.13 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:58844 Archived-At: Package: emacs Version: 24.0.95 mode-line-mule-info contains this: (propertize "%z" 'help-echo [...] (format "Buffer coding system %s\nmouse-1: describe coding system" (if enable-multibyte-characters (concat "(multi-byte): " (symbol-name buffer-file-coding-system)) (concat "(unibyte): " (symbol-name buffer-file-coding-system)))) The intent is obviously that you see (multibyte) in the mode-line tooltip in a multibyte buffer, and (unibyte) otherwise. However, you will never see the unibyte tooltip, because: (set-buffer-multibyte nil) (format-mode-line "%z") -> "" ie, the empty string, so there is nowhere for the help-echo to display. Compare with "-" in multibyte buffers. If it returned " " instead of "", you would see the tooltip.