Commit 0bde6a03 authored by Dan Nicolaescu's avatar Dan Nicolaescu
Browse files

* emulation/edt-mapper.el (edt-emacs-variant): Replace the only

use with the definition. Remove.

* add-log.el (change-log-start-entry-re): New defconst.
(change-log-sortable-date-at): Use it.
(change-log-beginning-of-defun, change-log-end-of-defun): New
functions.
(change-log-mode): Use them for beginning-of-defun-function and
end-of-defun-function.

* erc-ibuffer.el (erc-modified-channels-alist): Pacify
byte-compiler.
parent 5aec60df
2007-10-25 Dan Nicolaescu <dann@ics.uci.edu>
* emulation/edt-mapper.el (edt-emacs-variant): Replace the only
use with the definition. Remove.
* add-log.el (change-log-start-entry-re): New defconst.
(change-log-sortable-date-at): Use it.
(change-log-beginning-of-defun, change-log-end-of-defun): New
functions.
(change-log-mode): Use them for beginning-of-defun-function and
end-of-defun-function.
2007-10-25 Jonathan Yavner <jyavner@member.fsf.org> 2007-10-25 Jonathan Yavner <jyavner@member.fsf.org>
* ses.el: Make `ses--symbolic-formulas' a safe local variable. * ses.el: Make `ses--symbolic-formulas' a safe local variable.
......
...@@ -763,6 +763,10 @@ Runs `change-log-mode-hook'. ...@@ -763,6 +763,10 @@ Runs `change-log-mode-hook'.
'(change-log-font-lock-keywords t nil nil backward-paragraph)) '(change-log-font-lock-keywords t nil nil backward-paragraph))
(set (make-local-variable 'isearch-buffers-next-buffer-function) (set (make-local-variable 'isearch-buffers-next-buffer-function)
'change-log-next-buffer) 'change-log-next-buffer)
(set (make-local-variable 'beginning-of-defun-function)
'change-log-beginning-of-defun)
(set (make-local-variable 'end-of-defun-function)
'change-log-end-of-defun)
(isearch-buffers-minor-mode)) (isearch-buffers-minor-mode))
(defun change-log-next-buffer (&optional buffer wrap) (defun change-log-next-buffer (&optional buffer wrap)
...@@ -1095,11 +1099,13 @@ Has a preference of looking backwards." ...@@ -1095,11 +1099,13 @@ Has a preference of looking backwards."
(change-log-get-method-definition-1 "")) (change-log-get-method-definition-1 ""))
(concat change-log-get-method-definition-md "]")))))) (concat change-log-get-method-definition-md "]"))))))
(defconst change-log-start-entry-re "^\\sw.........[0-9:+ ]*")
(defun change-log-sortable-date-at () (defun change-log-sortable-date-at ()
"Return date of log entry in a consistent form for sorting. "Return date of log entry in a consistent form for sorting.
Point is assumed to be at the start of the entry." Point is assumed to be at the start of the entry."
(require 'timezone) (require 'timezone)
(if (looking-at "^\\sw.........[0-9:+ ]*") (if (looking-at change-log-start-entry-re)
(let ((date (match-string-no-properties 0))) (let ((date (match-string-no-properties 0)))
(if date (if date
(if (string-match "\\(....\\)-\\(..\\)-\\(..\\)\\s-+" date) (if (string-match "\\(....\\)-\\(..\\)-\\(..\\)\\s-+" date)
...@@ -1186,6 +1192,32 @@ old-style time formats for entries are supported." ...@@ -1186,6 +1192,32 @@ old-style time formats for entries are supported."
(goto-char (point-max))) (goto-char (point-max)))
(insert-buffer-substring other-buf start))))))) (insert-buffer-substring other-buf start)))))))
(defun change-log-beginning-of-defun ()
(re-search-backward change-log-start-entry-re nil 'move))
(defun change-log-end-of-defun ()
;; Look back and if there is no entry there it means we are before
;; the first ChangeLog entry, so go forward until finding one.
(unless (save-excursion (re-search-backward change-log-start-entry-re nil t))
(re-search-forward change-log-start-entry-re nil t))
;; In case we are at the end of log entry going forward a line will
;; make us find the next entry when searching. If we are inside of
;; an entry going forward a line will still keep the point inside
;; the same entry.
(forward-line 1)
;; In case we are at the beginning of an entry, move past it.
(when (looking-at change-log-start-entry-re)
(goto-char (match-end 0))
(forward-line 1))
;; Search for the start of the next log entry. Go to the end of the
;; buffer if we could not find a next entry.
(when (re-search-forward change-log-start-entry-re nil 'move)
(goto-char (match-beginning 0))
(forward-line -1)))
(provide 'add-log) (provide 'add-log)
;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762 ;; arch-tag: 81eee6fc-088f-4372-a37f-80ad9620e762
......
...@@ -118,12 +118,6 @@ ...@@ -118,12 +118,6 @@
;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs). ;;; Decide Emacs Variant, GNU Emacs or XEmacs (aka Lucid Emacs).
;;; Determine Window System, and X Server Vendor (if appropriate). ;;; Determine Window System, and X Server Vendor (if appropriate).
;;; ;;;
(defconst (featurep 'xemacs) (string-match "XEmacs" emacs-version)
"Non-nil if we are running XEmacs version 19, or higher.")
(defconst edt-emacs-variant (if (featurep 'xemacs) "xemacs" "gnu")
"Indicates Emacs variant: GNU Emacs or XEmacs \(aka Lucid Emacs\).")
(defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system) (defconst edt-window-system (if (featurep 'xemacs) (console-type) window-system)
"Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).") "Indicates window system \(in GNU Emacs\) or console type \(in XEmacs\).")
...@@ -514,7 +508,7 @@ ...@@ -514,7 +508,7 @@
;;; Save the key mapping file ;;; Save the key mapping file
;;; ;;;
(let ((file (concat (let ((file (concat
"~/.edt-" edt-emacs-variant "~/.edt-" (if (featurep 'xemacs) "xemacs" "gnu")
(if edt-term (concat "-" edt-term)) (if edt-term (concat "-" edt-term))
(if edt-xserver (concat "-" edt-xserver)) (if edt-xserver (concat "-" edt-xserver))
(if edt-window-system (concat "-" (upcase (symbol-name edt-window-system)))) (if edt-window-system (concat "-" (upcase (symbol-name edt-window-system))))
......
2007-10-25 Dan Nicolaescu <dann@ics.uci.edu>
* erc-ibuffer.el (erc-modified-channels-alist): Pacify
byte-compiler.
2007-10-13 Glenn Morris <rgm@gnu.org> 2007-10-13 Glenn Morris <rgm@gnu.org>
* erc-track.el (erc-modified-channels-update): Use mapc rather * erc-track.el (erc-modified-channels-update): Use mapc rather
......
...@@ -71,6 +71,8 @@ ...@@ -71,6 +71,8 @@
(string-match qualifier (or erc-server-announced-name (string-match qualifier (or erc-server-announced-name
erc-session-server))))) erc-session-server)))))
(defvar erc-modified-channels-alist)
(define-ibuffer-column erc-modified (:name "M") (define-ibuffer-column erc-modified (:name "M")
(if (and (boundp 'erc-track-mode) (if (and (boundp 'erc-track-mode)
erc-track-mode) erc-track-mode)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment