emacs-pretest-bug
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

add-to-invisibility-spec produces multiple occurrences


From: Drew Adams
Subject: add-to-invisibility-spec produces multiple occurrences
Date: Sat, 2 Jun 2007 11:31:56 -0700

This is the definition of `add-to-invisibility-spec':

(defun add-to-invisibility-spec (element)
  "..."
  (if (eq buffer-invisibility-spec t)
      (setq buffer-invisibility-spec (list t)))
  (setq buffer-invisibility-spec
        (cons element buffer-invisibility-spec)))

This is what it should be:

(defun add-to-invisibility-spec (element)
  "..."
  (if (eq buffer-invisibility-spec t)
      (setq buffer-invisibility-spec (list t)))
  (add-to-list 'buffer-invisibility-spec element))

Multiple elements should not be introduced. They serve no purpose, and
could complicate code that manipulates `buffer-invisibility-spec'. In any
case, `buffer-invisibility-spec' is not likely to be extremely long, so
nothing is gained by not preventing duplicates.


In GNU Emacs 22.1.50.1 (i386-mingw-nt5.1.2600)
 of 2007-05-22 on LENNART-69DE564
Windowing system distributor `Microsoft Corp.', version 5.1.2600
configured using `configure --with-gcc (3.4) --cflags -Ic:/g/include'






reply via email to

[Prev in Thread] Current Thread [Next in Thread]