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
666f4056
Commit
666f4056
authored
Feb 09, 1999
by
Richard M. Stallman
Browse files
(add-log-file-name-function): New variable.
(add-change-log-entry): Call that function, if non-nil.
parent
4315d68e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
17 additions
and
6 deletions
+17
-6
lisp/add-log.el
lisp/add-log.el
+17
-6
No files found.
lisp/add-log.el
View file @
666f4056
...
...
@@ -111,6 +111,14 @@ this variable."
:type 'boolean
:group 'change-log)
(defcustom add-log-file-name-function nil
"
*If
non-nil,
function
to
call
to
identify
the
filename
for
a
ChangeLog
entry.
This
function
is
called
with
one
argument,
`
buffer-file-name
'
in
that
buffer.
If
this
is
nil
,
the
default
is
to
use
the
file
's
name
relative
to
the
directory
of
the
change
log
file.
"
:type 'function
:group 'change-log)
(defvar change-log-font-lock-keywords
'(;;
;; Date lines, new and old styles.
...
...
@@ -305,12 +313,15 @@ non-nil, otherwise in local time."
(and buffer-file-name
;; Never want to add a change log entry for the ChangeLog file itself.
(not (string= buffer-file-name file-name))
(setq entry (if (string-match
(concat "^" (regexp-quote (file-name-directory
file-name)))
buffer-file-name)
(substring buffer-file-name (match-end 0))
(file-name-nondirectory buffer-file-name))))
(setq entry
(if add-log-file-name-function
(funcall add-log-file-name-function buffer-file-name)
(if (string-match
(concat "^" (regexp-quote (file-name-directory
file-name)))
buffer-file-name)
(substring buffer-file-name (match-end 0))
(file-name-nondirectory buffer-file-name)))))
(let ((buffer (find-buffer-visiting file-name)))
(setq add-log-debugging (list (gap-position) (gap-size))))
...
...
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