Mercurial > emacs
comparison lisp/add-log.el @ 21926:76061e1fa136
(add-log-debugging): New variable.
(add-change-log-entry): Set it.
author | Richard M. Stallman <rms@gnu.org> |
---|---|
date | Mon, 04 May 1998 00:13:13 +0000 |
parents | 84df514f7719 |
children | f702be237f91 |
comparison
equal
deleted
inserted
replaced
21925:3e498c36ccce | 21926:76061e1fa136 |
---|---|
1 ;;; add-log.el --- change log maintenance commands for Emacs | 1 ;; add-log.el --- change log maintenance commands for Emacs |
2 | 2 |
3 ;; Copyright (C) 1985, 86, 88, 93, 94, 97, 1998 Free Software Foundation, Inc. | 3 ;; Copyright (C) 1985, 86, 88, 93, 94, 97, 1998 Free Software Foundation, Inc. |
4 | 4 |
5 ;; Keywords: tools | 5 ;; Keywords: tools |
6 | 6 |
148 | 148 |
149 (defvar change-log-time-zone-rule nil | 149 (defvar change-log-time-zone-rule nil |
150 "Time zone used for calculating change log time stamps. | 150 "Time zone used for calculating change log time stamps. |
151 It takes the same format as the TZ argument of `set-time-zone-rule'. | 151 It takes the same format as the TZ argument of `set-time-zone-rule'. |
152 If nil, use local time.") | 152 If nil, use local time.") |
153 | |
154 (defvar add-log-debugging) | |
153 | 155 |
154 (defun add-log-iso8601-time-zone (time) | 156 (defun add-log-iso8601-time-zone (time) |
155 (let* ((utc-offset (or (car (current-time-zone time)) 0)) | 157 (let* ((utc-offset (or (car (current-time-zone time)) 0)) |
156 (sign (if (< utc-offset 0) ?- ?+)) | 158 (sign (if (< utc-offset 0) ?- ?+)) |
157 (sec (abs utc-offset)) | 159 (sec (abs utc-offset)) |
303 file-name))) | 305 file-name))) |
304 buffer-file-name) | 306 buffer-file-name) |
305 (substring buffer-file-name (match-end 0)) | 307 (substring buffer-file-name (match-end 0)) |
306 (file-name-nondirectory buffer-file-name)))) | 308 (file-name-nondirectory buffer-file-name)))) |
307 | 309 |
310 (let ((buffer (find-buffer-visiting file-name))) | |
311 (setq add-log-debugging (list (gap-position) (gap-size)))) | |
308 (if (and other-window (not (equal file-name buffer-file-name))) | 312 (if (and other-window (not (equal file-name buffer-file-name))) |
309 (find-file-other-window file-name) | 313 (find-file-other-window file-name) |
310 (find-file file-name)) | 314 (find-file file-name)) |
311 (or (eq major-mode 'change-log-mode) | 315 (or (eq major-mode 'change-log-mode) |
312 (change-log-mode)) | 316 (change-log-mode)) |