* copyright-limit's value
@ 2007-07-27 17:06 kimitto
0 siblings, 0 replies; only message in thread
From: kimitto @ 2007-07-27 17:06 UTC (permalink / raw)
To: bug-gnu-emacs
Environment
In GNU Emacs 22.1.1 (i386-mingw-nt5.1.2600)
of 2007-07-08 on CUBE
Windowing system distributor `MW32', version 11.0.1
configured using `configure --with-gcc (3.4)'
copyright-limit's doc-string is this one.
"*Don't try to update copyright beyond this position unless
interactive.
A value of nil means to search whole buffer."
1. start emacs with -q option
2. M-: (setq copyright-limit nil)
3. and M-x copyright-update
error--> Wrong type argument: number-or-marker-p, nil
re-search-forward() 's second argument causes this error.
Its value is selectable as 'nil', and I hope so, thus see patch file.
Best regards,
Kimit Yada
diff -u c\:/meadow/lisp/emacs-lisp/copyright.el c\:/meadow/lisp/emacs-
lisp/copyright.mod.el
--- c:/meadow/lisp/emacs-lisp/copyright.el 2007-07-08
14:27:23.001000000 +0900
+++ c:/meadow/lisp/emacs-lisp/copyright.mod.el 2007-07-20
17:19:12.000000000 +0900
@@ -83,7 +83,8 @@
"String representing the current year.")
(defun copyright-update-year (replace noquery)
- (when (re-search-forward copyright-regexp (+ (point) copyright-
limit) t)
+ (when (re-search-forward copyright-regexp
+ (and copyright-limit (+ (point) copyright-
limit)) t)
;; If the years are continued onto multiple lined
;; that are marked as comments, skip to the end of the years
anyway.
(while (save-excursion
@@ -162,7 +163,7 @@
(re-search-forward "\\(the Free Software Foundation;\
either \\|; a\\^u eldono \\([0-9]+\\)a, ? a\\^u (la\\^u via \\)\
version \\([0-9]+\\), or (at"
- (+ (point) copyright-limit) t)
+ (and copyright-limit (+ (point) copyright-limit)) t)
(not (string= (match-string 3) copyright-current-gpl-
version))
(or noquery
(y-or-n-p (concat "Replace GPL version by "
@@ -184,7 +185,8 @@
(interactive)
(widen)
(goto-char (point-min))
- (if (re-search-forward copyright-regexp (+ (point) copyright-limit)
t)
+ (if (re-search-forward copyright-regexp
+ (and copyright-limit (+ (point) copyright-
limit)) t)
(let ((s (match-beginning 2))
(e (copy-marker (1+ (match-end 2))))
(p (make-marker))
@@ -224,7 +226,7 @@
"Copyright (C) " `(substring (current-time-string) -4) " by "
(or (getenv "ORGANIZATION")
str)
- '(if (> (point) (+ (point-min) copyright-limit))
+ '(if (and copyright-limit (> (point) (+ (point-min) copyright-
limit)))
(message "Copyright extends beyond `copyright-limit' and won't
be updated automatically."))
comment-end \n)
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2007-07-27 17:06 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2007-07-27 17:06 copyright-limit's value kimitto
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.