From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Paul Eggert Newsgroups: gmane.emacs.bugs Subject: bug#10069: colour -> color spelling change Date: Wed, 16 Nov 2011 23:39:00 -0800 Organization: UCLA Computer Science Department Message-ID: <4EC4BA14.2010906@cs.ucla.edu> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 7bit X-Trace: dough.gmane.org 1321515624 10232 80.91.229.12 (17 Nov 2011 07:40:24 GMT) X-Complaints-To: usenet@dough.gmane.org NNTP-Posting-Date: Thu, 17 Nov 2011 07:40:24 +0000 (UTC) To: 10069@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Thu Nov 17 08:40:19 2011 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([140.186.70.17]) by lo.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1RQwa3-0001Q4-0I for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2011 08:40:19 +0100 Original-Received: from localhost ([::1]:60226 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQwa2-0001Sc-Ka for geb-bug-gnu-emacs@m.gmane.org; Thu, 17 Nov 2011 02:40:18 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:41168) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQwZz-0001S8-4J for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:40:16 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQwZx-0003rq-9F for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:40:14 -0500 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52842) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQwZx-0003rm-5h for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:40:13 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.69) (envelope-from ) id 1RQwak-0006vW-BE for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:41:02 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Paul Eggert Original-Sender: debbugs-submit-bounces@debbugs.gnu.org Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Thu, 17 Nov 2011 07:41:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: report 10069 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: patch X-Debbugs-Original-To: bug-gnu-emacs@gnu.org Original-Received: via spool by submit@debbugs.gnu.org id=B.132151561526571 (code B ref -1); Thu, 17 Nov 2011 07:41:01 +0000 Original-Received: (at submit) by debbugs.gnu.org; 17 Nov 2011 07:40:15 +0000 Original-Received: from localhost ([127.0.0.1] helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQwZz-0006uV-51 for submit@debbugs.gnu.org; Thu, 17 Nov 2011 02:40:15 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]) by debbugs.gnu.org with esmtp (Exim 4.69) (envelope-from ) id 1RQwZw-0006uI-JB for submit@debbugs.gnu.org; Thu, 17 Nov 2011 02:40:14 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQwYx-0003i9-0D for submit@debbugs.gnu.org; Thu, 17 Nov 2011 02:39:18 -0500 Original-Received: from lists.gnu.org ([140.186.70.17]:41958) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQwYw-0003i5-Uy for submit@debbugs.gnu.org; Thu, 17 Nov 2011 02:39:10 -0500 Original-Received: from eggs.gnu.org ([140.186.70.92]:53211) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQwYv-0001Gh-7c for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:39:10 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1RQwYt-0003ha-BB for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:39:09 -0500 Original-Received: from smtp.cs.ucla.edu ([131.179.128.62]:38992) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1RQwYs-0003hK-UO for bug-gnu-emacs@gnu.org; Thu, 17 Nov 2011 02:39:07 -0500 Original-Received: from localhost (localhost.localdomain [127.0.0.1]) by smtp.cs.ucla.edu (Postfix) with ESMTP id E17A0A60002 for ; Wed, 16 Nov 2011 23:39:04 -0800 (PST) X-Virus-Scanned: amavisd-new at smtp.cs.ucla.edu Original-Received: from smtp.cs.ucla.edu ([127.0.0.1]) by localhost (smtp.cs.ucla.edu [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id YYYu7AFj6q6P for ; Wed, 16 Nov 2011 23:39:03 -0800 (PST) Original-Received: from [192.168.1.10] (pool-71-189-109-235.lsanca.fios.verizon.net [71.189.109.235]) by smtp.cs.ucla.edu (Postfix) with ESMTPSA id A85D239E8006 for ; Wed, 16 Nov 2011 23:39:03 -0800 (PST) User-Agent: Mozilla/5.0 (X11; Linux i686; rv:7.0.1) Gecko/20110929 Thunderbird/7.0.1 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 3) X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.11 Precedence: list Resent-Date: Thu, 17 Nov 2011 02:41:02 -0500 X-detected-operating-system: by eggs.gnu.org: GNU/Linux 2.6 (newer, 2) X-Received-From: 140.186.70.43 X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:54019 Archived-At: Tags: patch Severity: minor Emacs consistently uses the American spelling "color" instead of the British "colour", except for one or two modules. Here's a patch to fix this inconsistency. This introduces an API change so it should wait until after 24.1 is out. === modified file 'lisp/ChangeLog' --- lisp/ChangeLog 2011-11-16 21:32:46 +0000 +++ lisp/ChangeLog 2011-11-17 03:47:59 +0000 @@ -1,3 +1,15 @@ +2011-11-17 Paul Eggert + + Consistently use the spelling "color". + * hfy-cmap.el (hfy-fallback-color-map): + Rename from hfy-fallback-colour-map. + (hfy-rgb-txt-color-map): Rename from hfy-rgb-txt-colour-map. + (hfy-fallback-color-values): Rename from hfy-fallback-colour-values. + * htmlfontify.el (hfy-color-vals): Rename from hfy-colour-vals. + (hfy-color): Rename from hfy-colour. + (hfy-box-to-border-assoc, hfy-box-to-style): + Spell it "color", not "colour", in strings. + 2011-11-16 Michael Albinus * net/tramp.el (tramp-handle-file-truename): Cache only the local === modified file 'lisp/hfy-cmap.el' --- lisp/hfy-cmap.el 2011-01-25 04:08:28 +0000 +++ lisp/hfy-cmap.el 2011-11-17 02:04:05 +0000 @@ -1,4 +1,4 @@ -;;; hfy-cmap.el --- Fallback colour name -> rgb mapping for `htmlfontify' +;;; hfy-cmap.el --- Fallback color name -> rgb mapping for `htmlfontify' ;; Copyright (C) 2002-2003, 2009-2011 Free Software Foundation, Inc. @@ -6,11 +6,11 @@ ;; Package: htmlfontify ;; Filename: hfy-cmap.el ;; Version: 0.20 -;; Keywords: colour, rgb +;; Keywords: color, colour, rgb ;; Author: Vivek Dasmohapatra ;; Maintainer: Vivek Dasmohapatra ;; Created: 2002-01-20 -;; Description: fallback code for colour name -> rgb mapping +;; Description: fallback code for color name -> rgb mapping ;; URL: http://rtfm.etla.org/emacs/htmlfontify/ ;; Last-Updated: Sat 2003-02-15 03:49:32 +0000 ;; Package: htmlfontify @@ -34,7 +34,7 @@ ;;; Code: -(defconst hfy-fallback-colour-map +(defconst hfy-fallback-color-map '(("snow" 65535 64250 64250) ("ghost white" 63736 63736 65535) ("GhostWhite" 63736 63736 65535) @@ -788,7 +788,7 @@ ("light green" 37008 61166 37008) ("LightGreen" 37008 61166 37008)) ) -(defvar hfy-rgb-txt-colour-map nil) +(defvar hfy-rgb-txt-color-map nil) (defvar hfy-rgb-load-path (list "/etc/X11" @@ -808,8 +808,8 @@ (defun htmlfontify-load-rgb-file (&optional file) "Load an X11 style rgb.txt FILE. Search `hfy-rgb-load-path' if FILE is not specified. -Loads the variable `hfy-rgb-txt-colour-map', which is used by -`hfy-fallback-colour-values'." +Loads the variable `hfy-rgb-txt-color-map', which is used by +`hfy-fallback-color-values'." (interactive (list (read-file-name "rgb.txt \(equivalent\) file: " "" nil t (hfy-rgb-file)))) @@ -824,25 +824,25 @@ (htmlfontify-unload-rgb-file) (while (/= end-of-rgb 1) (if (looking-at hfy-rgb-regex) - (setq hfy-rgb-txt-colour-map + (setq hfy-rgb-txt-color-map (cons (list (match-string 4) (string-to-number (match-string 1)) (string-to-number (match-string 2)) (string-to-number (match-string 3))) - hfy-rgb-txt-colour-map)) ) + hfy-rgb-txt-color-map)) ) (setq end-of-rgb (forward-line))) (kill-buffer rgb-buffer))))) (defun htmlfontify-unload-rgb-file () "Unload the current color name -> rgb translation map." (interactive) - (setq hfy-rgb-txt-colour-map nil)) + (setq hfy-rgb-txt-color-map nil)) ;;;###autoload -(defun hfy-fallback-colour-values (colour-string) +(defun hfy-fallback-color-values (color-string) "Use a fallback method for obtaining the rgb values for a color." - (cdr (assoc-string colour-string (or hfy-rgb-txt-colour-map - hfy-fallback-colour-map))) ) + (cdr (assoc-string color-string (or hfy-rgb-txt-color-map + hfy-fallback-color-map))) ) (provide 'hfy-cmap) === modified file 'lisp/htmlfontify.el' --- lisp/htmlfontify.el 2011-11-15 17:37:37 +0000 +++ lisp/htmlfontify.el 2011-11-17 02:06:14 +0000 @@ -566,22 +566,22 @@ (if (memq elt set-b) (setq interq (cons elt interq)))) interq)) -(defun hfy-colour-vals (colour) - "Where COLOUR is a color name or #XXXXXX style triplet, return a +(defun hfy-color-vals (color) + "Where COLOR is a color name or #XXXXXX style triplet, return a list of three (16 bit) rgb values for said color.\n -If a window system is unavailable, calls `hfy-fallback-colour-values'." - (if (string-match hfy-triplet-regex colour) +If a window system is unavailable, calls `hfy-fallback-color-values'." + (if (string-match hfy-triplet-regex color) (mapcar - (lambda (x) (* (string-to-number (match-string x colour) 16) 257)) + (lambda (x) (* (string-to-number (match-string x color) 16) 257)) '(1 2 3)) - ;;(message ">> %s" colour) + ;;(message ">> %s" color) (if window-system (if (fboundp 'color-values) - (color-values colour) + (color-values color) ;;(message "[%S]" window-system) - (x-color-values colour)) - ;; blarg - tty colours are no good - go fetch some X colours: - (hfy-fallback-colour-values colour)))) + (x-color-values color)) + ;; blarg - tty colors are no good - go fetch some X colors: + (hfy-fallback-color-values color)))) (defvar hfy-cperl-mode-kludged-p nil) @@ -719,7 +719,7 @@ "Replace the end of a CSS style declaration STYLE-STRING with the contents of the variable `hfy-src-doc-link-style', removing text matching the regex `hfy-src-doc-link-unstyle' first, if necessary." - ;;(message "hfy-colour-vals");;DBUG + ;;(message "hfy-color-vals");;DBUG (if (string-match hfy-src-doc-link-unstyle style-string) (setq style-string (replace-match "" 'fixed-case 'literal style-string))) (if (and (not (string-match hfy-src-doc-link-style style-string)) @@ -732,15 +732,15 @@ ;; utility functions - cast emacs style specification values into their ;; css2 equivalents: -(defun hfy-triplet (colour) - "Takes a COLOUR name (string) and return a CSS rgb(R, G, B) triplet string. +(defun hfy-triplet (color) + "Takes a COLOR name (string) and return a CSS rgb(R, G, B) triplet string. Uses the definition of \"white\" to map the numbers to the 0-255 range, so if you've redefined white, (esp. if you've redefined it to have a triplet member lower than that of the color you are processing) strange things may happen." - ;;(message "hfy-colour-vals");;DBUG - (let ((white (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals "white"))) - (rgb16 (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals colour)))) + ;;(message "hfy-color-vals");;DBUG + (let ((white (mapcar (lambda (I) (float (1+ I))) (hfy-color-vals "white"))) + (rgb16 (mapcar (lambda (I) (float (1+ I))) (hfy-color-vals color)))) (if rgb16 ;;(apply 'format "rgb(%d, %d, %d)" ;; Use #rrggbb instead, it is smaller @@ -751,8 +751,8 @@ '(0 1 2)))))) (defun hfy-family (family) (list (cons "font-family" family))) -(defun hfy-bgcol (colour) (list (cons "background" (hfy-triplet colour)))) -(defun hfy-colour (colour) (list (cons "color" (hfy-triplet colour)))) +(defun hfy-bgcol (color) (list (cons "background" (hfy-triplet color)))) +(defun hfy-color (color) (list (cons "color" (hfy-triplet color)))) (defun hfy-width (width) (list (cons "font-stretch" (symbol-name width)))) (defcustom hfy-font-zoom 1.05 @@ -800,17 +800,17 @@ (let ((tag (car spec)) (val (cadr spec))) (cons (case tag - (:color (cons "colour" val)) - (:width (cons "width" val)) - (:style (cons "style" val))) + (:color (cons "color" val)) + (:width (cons "width" val)) + (:style (cons "style" val))) (hfy-box-to-border-assoc (cddr spec)))))) (defun hfy-box-to-style (spec) (let* ((css (hfy-box-to-border-assoc spec)) - (col (cdr (assoc "colour" css))) + (col (cdr (assoc "color" css))) (s (cdr (assoc "style" css)))) (list - (if col (cons "border-color" (cdr (assoc "colour" css)))) + (if col (cons "border-color" (cdr (assoc "color" css)))) (cons "border-width" (format "%dpx" (or (cdr (assoc "width" css)) 1))) (cons "border-style" (case s (released-button "outset") @@ -989,7 +989,7 @@ (:width (hfy-width val)) (:weight (hfy-weight val)) (:slant (hfy-slant val)) - (:foreground (hfy-colour val)) + (:foreground (hfy-color val)) (:background (hfy-bgcol val)) (:box (hfy-box val)) (:height (hfy-size val)) @@ -2314,22 +2314,22 @@ (load file 'NOERROR nil nil) )) -;;;### (autoloads (hfy-fallback-colour-values htmlfontify-load-rgb-file) -;;;;;; "hfy-cmap" "hfy-cmap.el" "8dce008297f15826cc6ab82203c46fa6") +;;;### (autoloads (hfy-fallback-color-values htmlfontify-load-rgb-file) +;;;;;; "hfy-cmap" "hfy-cmap.el" "2e7bc2fe079a42e70fb284e070d001f1") ;;; Generated autoloads from hfy-cmap.el (autoload 'htmlfontify-load-rgb-file "hfy-cmap" "\ Load an X11 style rgb.txt FILE. Search `hfy-rgb-load-path' if FILE is not specified. -Loads the variable `hfy-rgb-txt-colour-map', which is used by -`hfy-fallback-colour-values'. +Loads the variable `hfy-rgb-txt-color-map', which is used by +`hfy-fallback-color-values'. \(fn &optional FILE)" t nil) -(autoload 'hfy-fallback-colour-values "hfy-cmap" "\ +(autoload 'hfy-fallback-color-values "hfy-cmap" "\ Use a fallback method for obtaining the rgb values for a color. -\(fn COLOUR-STRING)" nil nil) +\(fn COLOR-STRING)" nil nil) ;;;***