[comp.emacs] Copyleft

EVERHART%ARISIA.DECnet@GE-CRD.ARPA (11/23/88)

This question is basically for RMS.
You'd like folks to attach copylefts to code sent to this list (and it's
not such a bad idea to do for other code also).
  However the darn copyleft is AWFULLY long.
  Is there a "generic" copyleft one might include by reference...
i.e., something like
Copyright 1988 (fill in your name or whatever)
Conditions of this copyright follow the copyright statements
and conditions contained in document "COPYING" titled "Free Software
Foundation Copyright and General Public License"

where the COPYING document (might be better to give it a less
generic filename) would be a once-for-all standard?
  A legally tight copyleft statement is desired by many PD software
authors I've come into contact with, but most prefer to add only 2
or 3 lines to their files. Make it easy to do it right and it'll be
done right oftener!
Glenn Everhart
Everhart%Arisia.decnet@ge-crd.arpa

neves@ai.cs.wisc.edu (David M. Neves) (11/24/88)

In article <8811231526.AA23326@EDDIE.MIT.EDU> EVERHART%ARISIA.DECnet@GE-CRD.ARPA writes:
>This question is basically for RMS.
>You'd like folks to attach copylefts to code sent to this list (and it's
>not such a bad idea to do for other code also).
>  However the darn copyleft is AWFULLY long.
>  Is there a "generic" copyleft one might include by reference...
>....
The problem here is that most people don't want to look at the
copyright message time and time again.  I assume the GNU people won't
shorten it so that best way of not viewing it is to have Emacs skip
past the notice whenever a GNU Lisp file is read in.
I'm too lazy to do the following but perhaps someone else will...

Add a function to find-file-hooks that
  1.  Checks to see if the input file is a GNU lisp file (perhaps by
checking on the directory location of the file or by looking for a
copyright message in the 1st line.)
  2.  Move the point and top of screen past all the copyright garbage.
I don't believe all the copyright notices are exactly the same so this
might be a little difficult.
;David Neves, Computer Sciences Department, University of Wisconsin-Madison
;Usenet:  {rutgers,ucbvax}!uwvax!neves
;Arpanet: neves@cs.wisc.edu

jcgs@harlqn.UUCP (John Sturdy) (11/25/88)

A more general method for skipping copy<your-favourite-direction> messages
and other header comments would be a find-file-hook that moves point to just
past the first non-blank non-comment line in the file.


-- 
__John            The Lord bless you and watch over you, The Lord make his face
         shine upon you and be gracious to you, The Lord look kindly on you and
   give you peace; My brothers, my sisters, God bless you. Amen.  (St. Francis)
         jcgs@uk.co.harlqn Harlequin Ltd,Barrington,Cambridge,UK +44-223-872522

neves@ai.cs.wisc.edu (David M. Neves) (11/29/88)

In article <6724@spool.cs.wisc.edu> neves@ai.cs.wisc.edu (David M. Neves) writes:
>I'm too lazy to do the following but perhaps someone else will...
>
>Add a function to find-file-hooks that ...
...
Well I guess everyone is lazier than I so here is code that skips by
GNU copyright notices.
;;; ----- CUT HERE -----
;;; Skip by copyright information in gnu emacs files.
;;; Copyright (c) (you've got to be kidding) 1988  neves@cs.wisc.edu
;;; Handles most gnu emacs files on /lisp and /src
;;; Known bugs:  It knows only about official GNU library files.
;;;   Unofficial files may not have the same text and so this code will
;;;   not skip by unofficial header comments.
;;; To use: Put this file in your .emacs file (before any other code that
;;;   sets find-file-hooks) and help stamp out software hoarding!
;;; 
(if (not (memq 'skipcopyright find-file-hooks))
	 (setq find-file-hooks (cons 'skipcopyright find-file-hooks)))
(defun skipcopyright nil
  (let ((p (point)) n (case-fold-search t))
    (if (= p (point-min))  ;anyone else fiddled with point?
	(progn
	  (goto-line 8)
	  (setq n (point))
	  (goto-line 1)
	  ;; "Copyright" is almost always found in the 1st 7 lines
	  ;; assume no more than 2000 characters in copyright comment
	  (if (null (and (search-forward "Copyright (C)" n t)
			 (or (search-forward "all copies." (+ (point) 2000) t)
			     (search-forward "hoarding!" (+ (point) 6000) t))))
	      (goto-char p)
	    (next-line 1)
	    ;; kludge code for setting last_window_start field of buffer.
	    ;; Is there a better way?
	    (save-window-excursion
	      (switch-to-buffer (current-buffer))
	      (set-window-start (selected-window) (point))
	      (switch-to-buffer nil)))))))

;David Neves, Computer Sciences Department, University of Wisconsin-Madison
;Usenet:  {rutgers,ucbvax}!uwvax!neves
;Arpanet: neves@cs.wisc.edu