jao-skel-perl.el 1.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778
  1. ;;; jao-skel-perl.el -*- lexical-binding: t; -*-
  2. ;; Copyright (C) 2004, 2005, 2009, 2022 Jose Antonio Ortega Ruiz
  3. ;; Author: Jose A Ortega Ruiz <jao@gnu.org>
  4. ;; Keywords: tools
  5. ;; This file is free software; you can redistribute it and/or modify
  6. ;; it under the terms of the GNU General Public License as published by
  7. ;; the Free Software Foundation; either version 3, or (at your option)
  8. ;; any later version.
  9. ;; This file is distributed in the hope that it will be useful,
  10. ;; but WITHOUT ANY WARRANTY; without even the implied warranty of
  11. ;; MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  12. ;; GNU General Public License for more details.
  13. ;; You should have received a copy of the GNU General Public License
  14. ;; along with GNU Emacs; see the file COPYING. If not, write to
  15. ;; the Free Software Foundation, Inc., 59 Temple Place - Suite 330,
  16. ;; Boston, MA 02111-1307, USA.
  17. ;;; Commentary:
  18. ;; Perl skeletons
  19. ;;; Code:
  20. (require 'jao-skel)
  21. (define-skeleton jao-skel-perl-script
  22. "Standard perl script header"
  23. "Brief file description: "
  24. "#! /usr/bin/perl -w"
  25. > \n
  26. "#"
  27. > \n
  28. "# $Id" "$"
  29. > \n
  30. "# " (file-name-nondirectory (buffer-file-name)) ": " str
  31. > \n
  32. "#"
  33. > ?\n
  34. (jao-skel-copyright-line "# ")
  35. > ?\n
  36. (jao-skel-insert-license)
  37. > \n
  38. "use strict;"
  39. > \n \n
  40. > \n _)
  41. (define-skeleton jao-skel-perl-module
  42. "Standard perl module header"
  43. "Brief module description: "
  44. "#"
  45. > \n
  46. "# " (file-name-nondirectory (buffer-file-name)) ": "str
  47. > \n
  48. "#"
  49. > ?\n
  50. (jao-skel-copyright-line "# ")
  51. > ?\n
  52. (jao-skel-insert-license)
  53. "# "
  54. > \n \n
  55. "package "
  56. (read-string (concat "Module name (" (jao-skel-basename) "): ")
  57. nil nil (jao-skel-basename))
  58. ";"
  59. > \n \n _ \n \n
  60. "1;"
  61. > \n)
  62. (jao-skel-install "\\.pl$" 'jao-skel-perl-script)
  63. (jao-skel-install "\\.pm$" 'jao-skel-perl-module)
  64. (provide 'jao-skel-perl)