简体   繁体   中英

I use Emacs with Prelude and want to re/write git-autocommit-mode

Where inside .emacs.d should I put the source code? How should I publish my changes? This is my first attempt at writing an Emacs mode. What are the current commendations?

proggress

I'm not sure if I did it properly but I have added following to my

~/.emacs.d/personal/personal.el

(add-to-list 'load-path "~/emacs.d/vendor")
(require 'git-auto-commit-mode)

then I did 'git clone myrepo' in the vendor directory.

I haven't used Prelude myself, but it's got an init.el , which is probably where you should put a statement to load your code.

But if you're really at the point where you want to write your own code, I'd recommend to either dump Prelude in favor of rolling your own config, or completely understand how Prelude works and build on top of that. Anything in the middle will result in much confusion.

Here's how I'd go about changing git-autocommit-mode :

  1. visit melpa.org to lookup the source: https://github.com/ryuslash/git-auto-commit-mode
  2. fork the source on github
  3. clone the repo I just forked:

     git clone https://github.com/abo-abo/git-auto-commit-mode.git 
  4. uninstall git-auto-commit-mode via package.el

  5. install use-package
  6. use this code to load your own git-auto-commit-mode :

     (use-package git-auto-commit-mode :load-path "~/git/git-auto-commit-mode") 
  7. if you make changes that you think are useful, open a pull request on github to merge in your changes into the source repo

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM