emacs-diffs
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Emacs-diffs] trunk r117949: Follow Emacs versioning


From: Kelvin White
Subject: [Emacs-diffs] trunk r117949: Follow Emacs versioning
Date: Thu, 25 Sep 2014 14:07:33 +0000
User-agent: Bazaar (2.6b2)

------------------------------------------------------------
revno: 117949
revision-id: address@hidden
parent: address@hidden
committer: Kelvin White <address@hidden>
branch nick: trunk
timestamp: Thu 2014-09-25 10:07:30 -0400
message:
  Follow Emacs versioning
modified:
  lisp/erc/ChangeLog             changelog-20091113204419-o5vbwnq5f7feedwu-4305
  lisp/erc/erc.el                erc.el-20091113204419-o5vbwnq5f7feedwu-4346
=== modified file 'lisp/erc/ChangeLog'
--- a/lisp/erc/ChangeLog        2014-08-13 13:14:43 +0000
+++ b/lisp/erc/ChangeLog        2014-09-25 14:07:30 +0000
@@ -1,3 +1,13 @@
+2014-09-25  Kelvin White  <address@hidden>
+
+       * erc.el: Follow Emacs version instead of tracking it seperately.
+       (erc-quit/part-reason-default) : Clean up quit/part message
+       functions by abstracting repetitive code, change version string.
+       (erc-quit-reason-various, erc-quit-reason-normal, erc-quit-reason-zippy)
+       (erc-part-reason-normal, erc-part-reason-zippy, erc-part-reason-various)
+       (erc-cmd-SV, erc-ctcp-query-VERSION, erc-version, erc-version-string):
+       Change version string.
+
 2014-08-13  Kelvin White  <address@hidden> 
 
        * erc.el (erc-send-input): Disable display commands in current buffer

=== modified file 'lisp/erc/erc.el'
--- a/lisp/erc/erc.el   2014-08-13 13:14:43 +0000
+++ b/lisp/erc/erc.el   2014-09-25 14:07:30 +0000
@@ -12,7 +12,7 @@
 ;;               Kelvin White (address@hidden)
 ;; Maintainer: address@hidden
 ;; Keywords: IRC, chat, client, Internet
-;; Version: 5.3
+
 
 ;; This file is part of GNU Emacs.
 
@@ -63,11 +63,11 @@
 ;;; History:
 ;;
 
+(defconst erc-version-string (format "\C-bERC\C-b (IRC client for Emacs %s)" 
emacs-version)
+  "ERC version.  This is used by function `erc-version'.")
+
 ;;; Code:
 
-(defconst erc-version-string "Version 5.3"
-  "ERC version.  This is used by function `erc-version'.")
-
 (eval-when-compile (require 'cl-lib))
 (require 'font-lock)
 (require 'pp)
@@ -3380,14 +3380,16 @@
       (signal 'wrong-number-of-arguments ""))))
 (defalias 'erc-cmd-Q 'erc-cmd-QUERY)
 
+(defun erc-quit/part-reason-default ()
+  "Default quit/part message."
+  (format "\C-bERC\C-b (IRC client for Emacs %s)" emacs-version))
+
+
 (defun erc-quit-reason-normal (&optional s)
   "Normal quit message.
 
 If S is non-nil, it will be used as the quit reason."
-  (or s
-      (format "\C-bERC\C-b %s (IRC client for Emacs)"; - \C-b%s\C-b"
-              erc-version-string) ; erc-official-location)
-      ))
+  (or s (erc-quit/part-reason-default)))
 
 (defun erc-quit-reason-zippy (&optional s)
   "Zippy quit message.
@@ -3396,7 +3398,7 @@
   (or s
       (if (fboundp 'yow)
           (erc-replace-regexp-in-string "\n" "" (yow))
-        (erc-quit-reason-normal))))
+        (erc-quit/part-reason-default))))
 
 (make-obsolete 'erc-quit-reason-zippy "it will be removed." "24.4")
 
@@ -3409,16 +3411,13 @@
      ((functionp res) (funcall res))
      ((stringp res) res)
      (s s)
-     (t (erc-quit-reason-normal)))))
+     (t (erc-quit/part-reason-default)))))
 
 (defun erc-part-reason-normal (&optional s)
   "Normal part message.
 
-If S is non-nil, it will be used as the quit reason."
-  (or s
-      (format "\C-bERC\C-b %s (IRC client for Emacs)"; - \C-b%s\C-b"
-              erc-version-string) ; erc-official-location)
-      ))
+If S is non-nil, it will be used as the part reason."
+  (or s (erc-quit/part-reason-default)))
 
 (defun erc-part-reason-zippy (&optional s)
   "Zippy part message.
@@ -3427,7 +3426,7 @@
   (or s
       (if (fboundp 'yow)
           (erc-replace-regexp-in-string "\n" "" (yow))
-        (erc-part-reason-normal))))
+        (erc-quit/part-reason-default))))
 
 (make-obsolete 'erc-part-reason-zippy "it will be removed." "24.4")
 
@@ -3440,7 +3439,7 @@
      ((functionp res) (funcall res))
      ((stringp res) res)
      (s s)
-     (t (erc-part-reason-normal)))))
+     (t (erc-quit/part-reason-default)))))
 
 (defun erc-cmd-QUIT (reason)
   "Disconnect from the current server.
@@ -3534,8 +3533,7 @@
 
 (defun erc-cmd-SV ()
   "Say the current ERC and Emacs version into channel."
-  (erc-send-message (format "I'm using ERC %s with %s %s (%s%s) of %s."
-                            erc-version-string
+  (erc-send-message (format "I'm using ERC with %s %s (%s%s) of %s."
                             (if (featurep 'xemacs) "XEmacs" "GNU Emacs")
                             emacs-version
                             system-configuration
@@ -4594,8 +4592,8 @@
   (unless erc-disable-ctcp-replies
     (erc-send-ctcp-notice
      nick (format
-           "VERSION \C-bERC\C-b %s - an IRC client for emacs (\C-b%s\C-b)"
-           erc-version-string
+           "VERSION \C-bERC\C-b - an IRC client for Emacs %s (\C-b%s\C-b)"
+           emacs-version
            erc-official-location)))
   nil)
 
@@ -6373,7 +6371,7 @@
 If optional argument HERE is non-nil, insert version number at point."
   (interactive "P")
   (let ((version-string
-         (format "ERC %s (GNU Emacs %s)" erc-version-string emacs-version)))
+         (format "ERC (IRC client for Emacs %s)" emacs-version)))
     (if here
         (insert version-string)
       (if (called-interactively-p 'interactive)


reply via email to

[Prev in Thread] Current Thread [Next in Thread]