/[emacs]/emacs/lisp/buff-menu.el
ViewVC logotype

Diff of /emacs/lisp/buff-menu.el

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

revision 1.86 by lute, Mon Jul 4 23:08:52 2005 UTC revision 1.87 by lektu, Wed Jul 20 11:32:17 2005 UTC
# Line 305  For more information, see the function ` Line 305  For more information, see the function `
305    
306  (defun Buffer-menu-unmark (&optional backup)  (defun Buffer-menu-unmark (&optional backup)
307    "Cancel all requested operations on buffer on this line and move down.    "Cancel all requested operations on buffer on this line and move down.
308  Optional ARG means move up."  Optional prefix arg means move up."
309    (interactive "P")    (interactive "P")
310    (when (Buffer-menu-no-header)    (when (Buffer-menu-no-header)
311      (let* ((buf (Buffer-menu-buffer t))      (let* ((buf (Buffer-menu-buffer t))
# Line 369  and then move up one line.  Prefix arg m Line 369  and then move up one line.  Prefix arg m
369    (save-excursion    (save-excursion
370     (beginning-of-line)     (beginning-of-line)
371     (forward-char 2)     (forward-char 2)
372     (if (= (char-after) (if arg ?  ?*))     (if (= (char-after) (if arg ?\s ?*))
373         (let ((buffer-read-only nil))         (let ((buffer-read-only nil))
374           (delete-char 1)           (delete-char 1)
375           (insert (if arg ?* ? ))))))           (insert (if arg ?* ?\s))))))
376    
377  (defun Buffer-menu-beginning ()  (defun Buffer-menu-beginning ()
378    (goto-char (point-min))    (goto-char (point-min))
# Line 392  and then move up one line.  Prefix arg m Line 392  and then move up one line.  Prefix arg m
392            (setq modp (buffer-modified-p)))            (setq modp (buffer-modified-p)))
393          (let ((buffer-read-only nil))          (let ((buffer-read-only nil))
394            (delete-char -1)            (delete-char -1)
395            (insert (if modp ?* ? ))))))            (insert (if modp ?* ?\s))))))
396    (save-excursion    (save-excursion
397      (Buffer-menu-beginning)      (Buffer-menu-beginning)
398      (let ((buff-menu-buffer (current-buffer))      (let ((buff-menu-buffer (current-buffer))
# Line 405  and then move up one line.  Prefix arg m Line 405  and then move up one line.  Prefix arg m
405                (save-excursion (kill-buffer buf)))                (save-excursion (kill-buffer buf)))
406            (if (and buf (buffer-name buf))            (if (and buf (buffer-name buf))
407              (progn (delete-char 1)              (progn (delete-char 1)
408                     (insert ? ))                     (insert ?\s))
409            (delete-region (point) (progn (forward-line 1) (point)))            (delete-region (point) (progn (forward-line 1) (point)))
410              (unless (bobp)              (unless (bobp)
411                (forward-char -1))))))))                (forward-char -1))))))))
# Line 425  in the selected frame." Line 425  in the selected frame."
425        (setq tem (Buffer-menu-buffer t))        (setq tem (Buffer-menu-buffer t))
426        (let ((buffer-read-only nil))        (let ((buffer-read-only nil))
427          (delete-char -1)          (delete-char -1)
428          (insert ?\ ))          (insert ?\s))
429        (or (eq tem buff) (memq tem others) (setq others (cons tem others))))        (or (eq tem buff) (memq tem others) (setq others (cons tem others))))
430      (setq others (nreverse others)      (setq others (nreverse others)
431            tem (/ (1- (frame-height)) (1+ (length others))))            tem (/ (1- (frame-height)) (1+ (length others))))
# Line 521  The current window remains selected." Line 521  The current window remains selected."
521      (save-excursion      (save-excursion
522        (set-buffer (Buffer-menu-buffer t))        (set-buffer (Buffer-menu-buffer t))
523        (vc-toggle-read-only)        (vc-toggle-read-only)
524        (setq char (if buffer-read-only ?% ? )))        (setq char (if buffer-read-only ?% ?\s)))
525      (save-excursion      (save-excursion
526        (beginning-of-line)        (beginning-of-line)
527        (forward-char 1)        (forward-char 1)
# Line 594  For more information, see the function ` Line 594  For more information, see the function `
594            (make-string (- Buffer-menu-buffer+size-width            (make-string (- Buffer-menu-buffer+size-width
595                            (length name)                            (length name)
596                            (length size))                            (length size))
597                         ? )                         ?\s)
598            size))            size))
599    
600  (defun Buffer-menu-sort (column)  (defun Buffer-menu-sort (column)
# Line 677  it means list those buffers and no other Line 677  it means list those buffers and no other
677  For more information, see the function `buffer-menu'."  For more information, see the function `buffer-menu'."
678    (let* ((old-buffer (current-buffer))    (let* ((old-buffer (current-buffer))
679           (standard-output standard-output)           (standard-output standard-output)
680           (mode-end (make-string (- Buffer-menu-mode-width 2) ? ))           (mode-end (make-string (- Buffer-menu-mode-width 2) ?\s))
681           (header (concat "CRM "           (header (concat "CRM "
682                           (Buffer-menu-buffer+size                           (Buffer-menu-buffer+size
683                            (Buffer-menu-make-sort-button "Buffer" 2)                            (Buffer-menu-make-sort-button "Buffer" 2)
# Line 712  For more information, see the function ` Line 712  For more information, see the function `
712            (insert header            (insert header
713                    (apply 'string                    (apply 'string
714                           (mapcar (lambda (c)                           (mapcar (lambda (c)
715                                     (if (memq c '(?\n ?\ )) c underline))                                     (if (memq c '(?\n ?\s)) c underline))
716                                   header)))))                                   header)))))
717        ;; Collect info for every buffer we're interested in.        ;; Collect info for every buffer we're interested in.
718        (dolist (buffer (or buffer-list (buffer-list)))        (dolist (buffer (or buffer-list (buffer-list)))
# Line 732  For more information, see the function ` Line 732  For more information, see the function `
732                                        (format-mode-line mode-line-process                                        (format-mode-line mode-line-process
733                                                          nil nil buffer))))                                                          nil nil buffer))))
734                      (bits (string                      (bits (string
735                             (if (eq buffer old-buffer) ?. ?\ )                             (if (eq buffer old-buffer) ?. ?\s)
736                             ;; Handle readonly status.  The output buffer                             ;; Handle readonly status.  The output buffer
737                             ;; is special cased to appear readonly; it is                             ;; is special cased to appear readonly; it is
738                             ;; actually made so at a later date.                             ;; actually made so at a later date.
739                             (if (or (eq buffer standard-output)                             (if (or (eq buffer standard-output)
740                                     buffer-read-only)                                     buffer-read-only)
741                                 ?% ?\ )                                 ?% ?\s)
742                             ;; Identify modified buffers.                             ;; Identify modified buffers.
743                             (if (buffer-modified-p) ?* ?\ )                             (if (buffer-modified-p) ?* ?\s)
744                             ;; Space separator.                             ;; Space separator.
745                             ?\ )))                             ?\s)))
746                  (unless file                  (unless file
747                    ;; No visited file.  Check local value of                    ;; No visited file.  Check local value of
748                    ;; list-buffers-directory.                    ;; list-buffers-directory.

Legend:
Removed from v.1.86  
changed lines
  Added in v.1.87

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