[Top][All Lists]

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

bug#24197: Removing lisp/play from standard Emacs package

From: Ivan Shmakov
Subject: bug#24197: Removing lisp/play from standard Emacs package
Date: Wed, 10 Aug 2016 20:30:53 +0000
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.5 (gnu/linux)

>>>>> Otso Rajala <address@hidden> writes:

 > Emacs is primarily used as a text editor.  Toys shipped in lisp/play
 > directory are fun, no question about that.  Do they belong into core
 > disribution of Emacs is another question.

 > Problems: 1) They increase package size.

        For less than 1 MiB (uncompressed.)  Compare to, say, lisp/org
        and lisp/cedet (which together take about 10% of lisp/) – and
        those aren’t used by every Emacs user out there, either.

 > 2) Their existence clutters M-x <tab> autocomplete lists: example M-x
 > bu <tab> has all things buffer, but also shows bubbles and butterfly,
 > hardly useful during editing process.

        Indeed.  But there’s a simple workaround:

(fset 'butterfly nil)
(fset 'bubbles   nil)

        It’s also possible to exclude unwanted lisp/ subdirectories from
        load-path; for example:

(require 'cl)                   ; Emacs 24.5
(setq load-path
      (apply 'list
             "~/elisp" "~/elisp/hacks"
             ;; Exclude directories holding unwanted packages:
             (let ((blacklist "/\\(calc\\|cedet\\|erc\\|mh-e\\|org\\)$"))
               (remove-if (lambda (dir) (string-match-p blacklist dir))

        However, while this prevents accidental (auto)loading of the
        packages of no interest to the specific user, this does /not/ by
        itself remove the respective autoloads themselves.  The latter
        could be accomplished with the following (though this seems a
        tad expensive):

 (lambda (sym)
   (let* ((fn   (symbol-function sym))
          (lib  (and (autoloadp fn) (cadr fn))))
     (when lib
       (condition-case v
           (find-library-name lib)
          (fset sym nil)))))))


 > Advantage of solution: 1) All problems go away

        Old ones go.  New ones come.


FSF associate member #7257  np. Across the Stars — Pražský Filmový Orchestr

reply via email to

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