Skip to content
GitLab
Projects
Groups
Snippets
Help
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Open sidebar
emacs
emacs
Commits
b7812d30
Commit
b7812d30
authored
Jan 08, 2001
by
Eli Zaretskii
Browse files
(copyright-current-year): Now a defvar.
(copyright, copyright-update): Compute the current year at run time.
parent
962116cf
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
5 deletions
+14
-5
lisp/ChangeLog
lisp/ChangeLog
+6
-0
lisp/emacs-lisp/copyright.el
lisp/emacs-lisp/copyright.el
+8
-5
No files found.
lisp/ChangeLog
View file @
b7812d30
2001-01-08 Eli Zaretskii <eliz@is.elta.co.il>
* emacs-lisp/copyright.el (copyright-current-year): Now a defvar.
(copyright, copyright-update): Compute the current year at run
time.
2001-01-08 Gerd Moellmann <gerd@gnu.org>
* isearch.el (isearch-old-signal-hook): Removed.
...
...
lisp/emacs-lisp/copyright.el
View file @
b7812d30
...
...
@@ -61,16 +61,18 @@ When this is `function', only ask when called non-interactively."
(other :tag "Ask" t)))
(defconst copyright-current-year (substring (current-time-string) -4)
"String representing the current year.")
;; when modifying this, also modify the comment generated by autoinsert.el
(defconst copyright-current-gpl-version "2"
"String representing the current version of the GPL or `nil'.")
(defvar copyright-update t)
;; This is a defvar rather than a defconst, because the year can
;; change during the Emacs session.
(defvar copyright-current-year "2001"
"String representing the current year.")
;;;###autoload
(defun copyright-update (&optional arg)
"Update the copyright notice at the beginning of the buffer to indicate
...
...
@@ -84,6 +86,7 @@ copyright, if any, are updated as well."
(save-restriction
(widen)
(goto-char (point-min))
(setq copyright-current-year (substring (current-time-string) -4))
(if (re-search-forward copyright-regexp copyright-limit t)
(if (string= (buffer-substring (- (match-end 2) 2) (match-end 2))
(substring copyright-current-year -2))
...
...
@@ -148,7 +151,7 @@ copyright, if any, are updated as well."
"Insert a copyright by $ORGANIZATION notice at cursor."
"Company: "
comment-start
"Copyright (C) "
copyright-current-year
" by "
"Copyright (C) "
`
(
substring
(
current-time-string
)
-4
)
" by "
(
or
(
getenv
"ORGANIZATION"
)
str
)
'
(
if
(
>
(
point
)
copyright-limit
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
.
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment