Mercurial > emacs
changeset 65089:b4238c551ea7
(ibuffer-compile-make-eliding-form, ibuffer-check-formats): Use
`with-no-warnings' to hide references to `ibuffer-elide-long-columns' (which is
defined on ibuffer.el, so it's silly to get warnings for it).
(ibuffer-auto-mode, ibuffer-cached-filter-formats,
ibuffer-compiled-filter-formats, ibuffer-filter-format-alist,
ibuffer-filter-group-kill-ring, ibuffer-filter-groups,
ibuffer-filtering-qualifiers, ibuffer-hidden-filter-groups,
ibuffer-inline-columns, ibuffer-show-empty-filter-groups,
ibuffer-tmp-hide-regexps, ibuffer-tmp-show-regexps): Defvar at compile time.
(ibuffer-compiled-formats, ibuffer-cached-eliding-string,
ibuffer-cached-formats, ibuffer-cached-elide-long-columns), eclare them before
use.
author | Juanma Barranquero <lekktu@gmail.com> |
---|---|
date | Wed, 24 Aug 2005 11:34:39 +0000 |
parents | f05a048483cc |
children | 6805ffc89137 |
files | lisp/ibuffer.el |
diffstat | 1 files changed, 18 insertions(+), 8 deletions(-) [+] |
line wrap: on
line diff
--- a/lisp/ibuffer.el Wed Aug 24 11:32:07 2005 +0000 +++ b/lisp/ibuffer.el Wed Aug 24 11:34:39 2005 +0000 @@ -40,6 +40,16 @@ (require 'font-core) +(eval-when-compile + ;; These come from ibuf-ext.el, which can not be require'd at compile time + ;; because it has a recursive dependency on ibuffer.el + (defvar ibuffer-auto-mode) (defvar ibuffer-cached-filter-formats) + (defvar ibuffer-compiled-filter-formats) (defvar ibuffer-filter-format-alist) + (defvar ibuffer-filter-group-kill-ring) (defvar ibuffer-filter-groups) + (defvar ibuffer-filtering-qualifiers) (defvar ibuffer-hidden-filter-groups) + (defvar ibuffer-inline-columns) (defvar ibuffer-show-empty-filter-groups) + (defvar ibuffer-tmp-hide-regexps) (defvar ibuffer-tmp-show-regexps)) + (defgroup ibuffer nil "An advanced replacement for `buffer-menu'. @@ -814,6 +824,11 @@ (defvar ibuffer-did-modification nil) +(defvar ibuffer-compiled-formats nil) +(defvar ibuffer-cached-formats nil) +(defvar ibuffer-cached-eliding-string nil) +(defvar ibuffer-cached-elide-long-columns 0) + (defvar ibuffer-sorting-functions-alist nil "An alist of functions which describe how to sort buffers. @@ -1394,7 +1409,7 @@ (defun ibuffer-compile-make-eliding-form (strvar elide from-end-p) (let ((ellipsis (propertize ibuffer-eliding-string 'font-lock-face 'bold))) - (if (or elide ibuffer-elide-long-columns) + (if (or elide (with-no-warnings ibuffer-elide-long-columns)) `(if (> strlen 5) ,(if from-end-p `(concat ,ellipsis @@ -1567,11 +1582,6 @@ '(tmp2))) ,@(nreverse result)))))))) -(defvar ibuffer-compiled-formats nil) -(defvar ibuffer-cached-formats nil) -(defvar ibuffer-cached-eliding-string nil) -(defvar ibuffer-cached-elide-long-columns 0) - (defun ibuffer-recompile-formats () "Recompile `ibuffer-formats'." (interactive) @@ -1603,7 +1613,7 @@ (not (equal ibuffer-cached-eliding-string ibuffer-eliding-string)) (eql 0 ibuffer-cached-elide-long-columns) (not (eql ibuffer-cached-elide-long-columns - ibuffer-elide-long-columns)) + (with-no-warnings ibuffer-elide-long-columns))) (and ext-loaded (not (eq ibuffer-cached-filter-formats ibuffer-filter-format-alist)) @@ -1613,7 +1623,7 @@ (ibuffer-recompile-formats) (setq ibuffer-cached-formats ibuffer-formats ibuffer-cached-eliding-string ibuffer-eliding-string - ibuffer-cached-elide-long-columns ibuffer-elide-long-columns) + ibuffer-cached-elide-long-columns (with-no-warnings ibuffer-elide-long-columns)) (when ext-loaded (setq ibuffer-cached-filter-formats ibuffer-filter-format-alist)) (message "Formats have changed, recompiling...done"))))