From da6d4600f2cbbdebd446b0b55667ccc6a4d1f986 Mon Sep 17 00:00:00 2001 From: Gergely Polonkai Date: Mon, 30 Jul 2018 21:15:47 +0200 Subject: [PATCH] Remove my old add-gnu-c-header function It is superseded by `xlicense`. --- init.el | 3 -- lisp/gnu-c-header.el | 65 -------------------------------------------- 2 files changed, 68 deletions(-) delete mode 100644 lisp/gnu-c-header.el diff --git a/init.el b/init.el index 2931d08..4ccf3df 100644 --- a/init.el +++ b/init.el @@ -25,7 +25,4 @@ ;; I started moving my configuration to this Org file. It’s easier to document this way. (org-babel-load-file (expand-file-name "configuration.org" user-emacs-directory)) -;; Load my own functions -(load "gnu-c-header") - ;;; init.el ends here diff --git a/lisp/gnu-c-header.el b/lisp/gnu-c-header.el deleted file mode 100644 index c1f0717..0000000 --- a/lisp/gnu-c-header.el +++ /dev/null @@ -1,65 +0,0 @@ -;;; gnu-c-header.el --- function to add a header to the C files licensed under the GPL -;; Author: Gergely Polonkai -;; Copyright: public domain -;; URL: http://gergely.polonkai.eu/blog/2014/09/26/emacs-adding-gnu-c-headers -;; Keywords: gnu, c, header, helper, utilities -;;; Commentary: -;;; Code: - -(defun file-name-base-with-extension (&optional filename) - "Return the base name of the FILENAME without its directory path. -FILENAME defaults to `buffer-file-name'." - (file-name-nondirectory (or filename (buffer-file-name)))) - -(defun add-gnu-c-header (progname purpose) - "Add a GNU GPL header to the current buffer" - (interactive "sProgram name (ie: MyProgram): \nsPurpose of the file (ie: string utility functions): ") - (save-excursion - (goto-char (point-min)) - (insert (concat - "/* " - (file-name-base-with-extension buffer-file-name) - " - " - purpose - " for " - progname - "\n" - " *\n" - " * Copyright (C) " - (format-time-string "%Y" (current-time)) - " " - (user-full-name) - "\n" - " *\n")) - (let ((start (point))) - (insert (concat - " * " - progname - " is \n * free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation; either version 3 of the License, or (at your option) any later version.")) - (let ((end (point))) - (fill-region start end))) - (insert (concat - "\n" - " *\n")) - (let ((start (point))) - (insert (concat - " * " - progname - " is \n * distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.")) - (let ((end (point))) - (fill-region start end))) - (insert (concat - "\n" - " *\n")) - (let ((start (point))) - (insert " * You \n * should have received a copy of the GNU General Public License along with this software; if not, see .") - (let ((end (point))) - (fill-region start end))) - (insert (concat - "\n" - " */\n")) - )) - -(provide 'gnu-c-header) - -;;; gnu-c-header.el ends here