0

I am currently making a package which is for my own use, but it will be publicly available on github. Some of the code is borrowed from another package. How do I properly accredit the copied code to the original authors? Both the original code and modified code are GPL licensed.

lookyhooky
  • 949
  • 7
  • 18

1 Answers1

2

Assuming you have the correct GPL header at the top of the file then there isn't much else you need to do. A couple of extra headers will help though:

;; Copyright (C) 2016  Your Name
;; Copyright (C) 20xx-2011 Other Author
;; Author: Your Name <your@email>

And I often put a note next to the function I've lifted:

;;; Git Time Machine
;; via: http://blog.binchen.org/posts/new-git-timemachine-ui-based-on-ivy-mode.html
(defun ...

Of course this does raise an interesting question of why are you nabbing the code? Could you not just add a (require 'foo) and list the package dependencies in your header? Unless you rename the function you run the risk of a name space clash if the user has both packages on their system.

stsquad
  • 4,626
  • 28
  • 45
  • I am working on modifying the indentation functions of js-mode to provide support for multi line arrow functions and better method chaining. I am requiring the unaltered code as you said. Your suggestion is what I was looking for. I can include their copyright and note above each tweeted function that it originally came from js.el. Also I plan on namespacing the new functions to avoid clashing with the originals. – lookyhooky Sep 07 '16 at 04:32
  • How about forking the project, then creating a pull request? – VanLaser Sep 07 '16 at 13:55
  • `js.el` is part of Emacs proper, and attempting a pull request seems a little too official until I can make sure everything works well and others have some interest in my work. – lookyhooky Sep 07 '16 at 14:38