Mercurial > emacs
comparison lisp/buff-menu.el @ 76023:70e00d4c1216
(list-buffers-noselect): Use explicit unicode code rather than the
corresponding unicode char, to make the code more readable.
author | Stefan Monnier <monnier@iro.umontreal.ca> |
---|---|
date | Mon, 19 Feb 2007 15:46:25 +0000 |
parents | e3694f1cb928 |
children | 086fe0d6a1ea dd7c098af727 |
comparison
equal
deleted
inserted
replaced
76022:e892213b9815 | 76023:70e00d4c1216 |
---|---|
719 header))) | 719 header))) |
720 ;; Try to better align the one-char headers. | 720 ;; Try to better align the one-char headers. |
721 (put-text-property 0 3 'face 'fixed-pitch header) | 721 (put-text-property 0 3 'face 'fixed-pitch header) |
722 ;; Add a "dummy" leading space to align the beginning of the header | 722 ;; Add a "dummy" leading space to align the beginning of the header |
723 ;; line with the beginning of the text (rather than with the left | 723 ;; line with the beginning of the text (rather than with the left |
724 ;; scrollbar or the left fringe). –-Stef | 724 ;; scrollbar or the left fringe). --Stef |
725 (setq header (concat (propertize " " 'display '(space :align-to 0)) | 725 (setq header (concat (propertize " " 'display '(space :align-to 0)) |
726 header))) | 726 header))) |
727 (with-current-buffer (get-buffer-create "*Buffer List*") | 727 (with-current-buffer (get-buffer-create "*Buffer List*") |
728 (setq buffer-read-only nil) | 728 (setq buffer-read-only nil) |
729 (erase-buffer) | 729 (erase-buffer) |
730 (setq standard-output (current-buffer)) | 730 (setq standard-output (current-buffer)) |
731 (unless Buffer-menu-use-header-line | 731 (unless Buffer-menu-use-header-line |
732 ;; Use U+2014 (EM DASH) to underline if possible, else U+002D (HYPHEN-MINUS) | 732 ;; Use U+2014 (EM DASH) to underline if possible, else use ASCII |
733 (let ((underline (if (char-displayable-p ?—) ?— ?-))) | 733 ;; (i.e. U+002D, HYPHEN-MINUS). |
734 (let ((underline (if (char-displayable-p ?\u2014) ?\u2014 ?-))) | |
734 (insert header | 735 (insert header |
735 (apply 'string | 736 (apply 'string |
736 (mapcar (lambda (c) | 737 (mapcar (lambda (c) |
737 (if (memq c '(?\n ?\s)) c underline)) | 738 (if (memq c '(?\n ?\s)) c underline)) |
738 header))))) | 739 header))))) |