English 中文(简体)
ocacs23 /elisp:如何妥善卸载这一图书馆?
原标题:emacs23 / elisp: how to properly autoload this library?

我正在升格为 em23。 我认为,我的 em子的负荷要慢得多。

这确实是我自己的过错...... 我在那里有很多 st。

因此,我也试图把目前由我的代表“要求”的一切可能措施自动化。

我有一个模块,暴露了12个切入点——我可以称之为互动功能。

正确的做法是有12条电话autoload<>/code>,以确保该模块无论我所说的哪一种功能都装载? 这种做法是否有任何问题? 它是否会提出业绩问题?

如果不是办法,那么什么?

最佳回答

你真的希望是自动获得为你生产的自动载荷,以便你的ema子能够保存。 大多数包件都有<条码>;#autoload<>/code>条已经存在,如果没有,你可以轻易添加。

为了管理这一点,你可将所有包裹放在名录上,如<代码>~/emacs/lisp,并且有一份名为<编码>的文档。 其中:

;; put this path into the load-path automatically
;;;###autoload
(progn
  (setq load-path (cons (file-name-directory load-file-name) load-path)))

;;;###autoload
(defun update-autoloads-in-package-area (&optional file)
  "Update autoloads for files in the diretory containing this file."
  (interactive)
  (let ((base (file-truename
       (file-name-directory
        (symbol-file  update-autoloads-in-package-area  defun)))))
(require  autoload)         ;ironic, i know
(let ((generated-autoload-file (concat base "loaddefs.el")))
  (when (not (file-exists-p generated-autoload-file))
    (with-current-buffer (find-file-noselect generated-autoload-file)
      (insert ";;") ;; create the file with non-zero size to appease autoload
      (save-buffer)))
  (cd base)
  (if file
      (update-file-autoloads file)
    (update-autoloads-from-directories base)))))

;;;###autoload
(defun update-autoloads-for-file-in-package-area (file)
  (interactive "f")
  (update-autoloads-in-package-area file))

如果在您的<代码>上添加<代码>更新-autoloads-in- Pack-area,则-emacs-hook,则每当你离开Emacs时,将自动更新loaddefs.el

并且,为了把它同起来,在<条码>上加上这一点。

(load-file "~/emacs/lisp/loaddefs.el")

现在,当你下载新的包裹时,仅将新包裹放在<代码>~/emacs/lisp目录上,通过<代码>M-x Update-autoloads-in- Pack-area(或离去后 em)更新装件。 页: 1

See this question for other How 否

问题回答

谁会照料它从慢慢慢开始吗?

火灾通过emacs-daemon &,然后使用其中任一一种装置连接

  • emacsclient -c /some/file.ext, or
  • emacsclient -nw

我分别为<代码>mx和emt分别制定了这些附件。 一俟编辑会议持续举行,就会变得如此之久......





相关问题
suppress additional braces in emacs electric mode

I started using ruby-electric-mode. I like it except that I am used to closing open brackets myself (the other pairing are still useful to me). How can I make emacs suppress additional brackets when ...

Setting up an emacs environment in windows?

I am currently constrained to a windows dev box and I want to migrate my projects from eclipse to emacs. What are some good references on setting up an emacs dev environment for windows? Anything ...

Emacs Setting which-function-mode

I would like to have which-function-mode on by default when I open up Emacs. I ve added the following lines to my .emacs file. (setq which-func-mode t) (setq which-function-mode t) When I open ...

Enabling go mode for emacs

I don t seem to be able to enable a go mode for emacs. C mode doesn t work without semicolons. The best I have found is the JavaScript mode by Karl Landstrom, since JavaScript also doesn t require ...

Custom Emacs key bindings are not working

The key bindings I ve defined in my .emacs file aren t working. Here s the file: ;init modes (menu-bar-mode 0) (tool-bar-mode 0) (cua-mode) (column-number-mode) (fset perl-mode cperl-mode) (cperl-...

eval during emacs lisp macro expansion

How can I fix the simple macro foo in (elisp)Eval During Expansion? None of the followings work: (defmacro foo1 (a) `(setq (eval ,a) t)) (defmacro foo2 (a) `(setq ,(eval a) t)) (defmacro foo3 (...

Get local cvs comment history when committing file/s in emacs

I often commit files with similar cvs comment but not in a single operation. I would like to able to bring up previous comments I ve used in a previous commit when I am in the process of writing a ...

热门标签