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.
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.