diff options
| author | Tino Calancha | 2017-07-25 14:53:44 +0900 |
|---|---|---|
| committer | Tino Calancha | 2017-07-25 14:53:44 +0900 |
| commit | 565cfd9f6c19e4d2aa318efdf19bdc56175bd153 (patch) | |
| tree | ff6634e072243860a154841d04cb4f86942b081e /lisp/ls-lisp.el | |
| parent | 35954cb92b8cd4ad093756d171688343bab02c2e (diff) | |
| download | emacs-565cfd9f6c19e4d2aa318efdf19bdc56175bd153.tar.gz emacs-565cfd9f6c19e4d2aa318efdf19bdc56175bd153.zip | |
ls-lisp: Add an unload function and enable lexical binding
Enable lexical binding.
* lisp/ls-lisp.el (ls-lisp-unload-function): New defun.
* test/lisp/ls-lisp.el (ls-lisp-unload): Add test.
Diffstat (limited to 'lisp/ls-lisp.el')
| -rw-r--r-- | lisp/ls-lisp.el | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/lisp/ls-lisp.el b/lisp/ls-lisp.el index b368efbbc95..730ba26c6c8 100644 --- a/lisp/ls-lisp.el +++ b/lisp/ls-lisp.el | |||
| @@ -1,4 +1,4 @@ | |||
| 1 | ;;; ls-lisp.el --- emulate insert-directory completely in Emacs Lisp | 1 | ;;; ls-lisp.el --- emulate insert-directory completely in Emacs Lisp -*- lexical-binding: t -*- |
| 2 | 2 | ||
| 3 | ;; Copyright (C) 1992, 1994, 2000-2017 Free Software Foundation, Inc. | 3 | ;; Copyright (C) 1992, 1994, 2000-2017 Free Software Foundation, Inc. |
| 4 | 4 | ||
| @@ -866,6 +866,12 @@ All ls time options, namely c, t and u, are handled." | |||
| 866 | file-size) | 866 | file-size) |
| 867 | (format " %6s" (file-size-human-readable file-size)))) | 867 | (format " %6s" (file-size-human-readable file-size)))) |
| 868 | 868 | ||
| 869 | (defun ls-lisp-unload-function () | ||
| 870 | "Unload ls-lisp library." | ||
| 871 | (advice-remove 'insert-directory #'ls-lisp--insert-directory) | ||
| 872 | ;; Continue standard unloading. | ||
| 873 | nil) | ||
| 874 | |||
| 869 | (provide 'ls-lisp) | 875 | (provide 'ls-lisp) |
| 870 | 876 | ||
| 871 | ;;; ls-lisp.el ends here | 877 | ;;; ls-lisp.el ends here |