/[emacs]/emacs/lisp/bindings.el
ViewVC logotype

Diff of /emacs/lisp/bindings.el

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.151 by ttn, Sat Aug 6 22:13:41 2005 UTC revision 1.152 by nickrob, Thu Sep 15 04:12:27 2005 UTC
# Line 123  corresponding to the mode line clicked." Line 123  corresponding to the mode line clicked."
123    
124  (defvar mode-line-coding-system-map  (defvar mode-line-coding-system-map
125    (let ((map (make-sparse-keymap)))    (let ((map (make-sparse-keymap)))
126      (define-key map [mode-line mouse-3]      (define-key map [mode-line mouse-1]
127        (lambda (e)        (lambda (e)
128          (interactive "e")          (interactive "e")
129          (save-selected-window          (save-selected-window
# Line 156  corresponding to the mode line clicked." Line 156  corresponding to the mode line clicked."
156        (setq desc        (setq desc
157              (propertize              (propertize
158               mnemonic               mnemonic
159               'help-echo (format "%s end-of-line; mouse-3 to cycle"               'help-echo (format "%s end-of-line; mouse-1 to cycle"
160                                  (if (eq eol 0) "Unix-style LF"                                  (if (eq eol 0) "Unix-style LF"
161                                    (if (eq eol 1) "Dos-style CRLF"                                    (if (eq eol 1) "Dos-style CRLF"
162                                      (if (eq eol 2) "Mac-style CR"                                      (if (eq eol 2) "Mac-style CR"
# Line 164  corresponding to the mode line clicked." Line 164  corresponding to the mode line clicked."
164               'keymap               'keymap
165               (eval-when-compile               (eval-when-compile
166                 (let ((map (make-sparse-keymap)))                 (let ((map (make-sparse-keymap)))
167                   (define-key map [mode-line mouse-3] 'mode-line-change-eol)                   (define-key map [mode-line mouse-1] 'mode-line-change-eol)
168                   map))                   map))
169               'mouse-face 'mode-line-highlight))               'mouse-face 'mode-line-highlight))
170        (push (cons eol (cons mnemonic desc)) mode-line-eol-desc-cache)        (push (cons eol (cons mnemonic desc)) mode-line-eol-desc-cache)
# Line 190  corresponding to the mode line clicked." Line 190  corresponding to the mode line clicked."
190              (when buffer-file-coding-system              (when buffer-file-coding-system
191                (if enable-multibyte-characters                (if enable-multibyte-characters
192                    (concat (symbol-name buffer-file-coding-system)                    (concat (symbol-name buffer-file-coding-system)
193                            " buffer; mouse-3: describe coding system")                            " buffer; mouse-1: describe coding system")
194                  (concat "Unibyte " (symbol-name buffer-file-coding-system)                  (concat "Unibyte " (symbol-name buffer-file-coding-system)
195                          " buffer")))))                          " buffer")))))
196        'mouse-face 'mode-line-highlight        'mouse-face 'mode-line-highlight
# Line 230  Normally nil in most modes, since there Line 230  Normally nil in most modes, since there
230    (list (propertize    (list (propertize
231           "%1*"           "%1*"
232           'help-echo (purecopy (lambda (window object point)           'help-echo (purecopy (lambda (window object point)
233                                  (format "%sead-only: mouse-3 toggles"                                  (format "%sead-only: mouse-1 toggles"
234                                          (save-selected-window                                          (save-selected-window
235                                            (select-window window)                                            (select-window window)
236                                            (if buffer-read-only                                            (if buffer-read-only
237                                                "R"                                                "R"
238                                              "Not r")))))                                              "Not r")))))
239           'local-map (purecopy (make-mode-line-mouse-map           'local-map (purecopy (make-mode-line-mouse-map
240                                 'mouse-3                                 'mouse-1
241                                 #'mode-line-toggle-read-only))                                 #'mode-line-toggle-read-only))
242           'mouse-face 'mode-line-highlight)           'mouse-face 'mode-line-highlight)
243          (propertize          (propertize
244           "%1+"           "%1+"
245           'help-echo  (purecopy (lambda (window object point)           'help-echo  (purecopy (lambda (window object point)
246                                   (format "%sodified: mouse-3 toggles"                                   (format "%sodified: mouse-1 toggles"
247                                           (save-selected-window                                           (save-selected-window
248                                             (select-window window)                                             (select-window window)
249                                             (if (buffer-modified-p)                                             (if (buffer-modified-p)
250                                               "M"                                               "M"
251                                             "Not m")))))                                             "Not m")))))
252           'local-map (purecopy (make-mode-line-mouse-map           'local-map (purecopy (make-mode-line-mouse-map
253                                 'mouse-3 #'mode-line-toggle-modified))                                 'mouse-1 #'mode-line-toggle-modified))
254           'mouse-face 'mode-line-highlight))           'mouse-face 'mode-line-highlight))
255    "Mode-line control for displaying whether current buffer is modified.")    "Mode-line control for displaying whether current buffer is modified.")
256    

Legend:
Removed from v.1.151  
changed lines
  Added in v.1.152

savannah-hackers-public@gnu.org
ViewVC Help
Powered by ViewVC 1.1.26