unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
* bug#10069: colour -> color spelling change
@ 2011-11-17  7:39 Paul Eggert
  2011-11-17  7:48 ` Glenn Morris
                   ` (2 more replies)
  0 siblings, 3 replies; 7+ messages in thread
From: Paul Eggert @ 2011-11-17  7:39 UTC (permalink / raw)
  To: 10069

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  <eggert@cs.ucla.edu>
+
+	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  <michael.albinus@gmx.de>
 
 	* 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 <vivek@etla.org>
 ;; Maintainer: Vivek Dasmohapatra <vivek@etla.org>
 ;; 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) ))
 
 \f
-;;;### (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)
 
 ;;;***
 \f






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10069: colour -> color spelling change
  2011-11-17  7:39 bug#10069: colour -> color spelling change Paul Eggert
@ 2011-11-17  7:48 ` Glenn Morris
  2011-11-17 14:35   ` Drew Adams
  2011-12-31  9:25 ` Paul Eggert
  2018-03-05  1:42 ` Paul Eggert
  2 siblings, 1 reply; 7+ messages in thread
From: Glenn Morris @ 2011-11-17  7:48 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 10069

Paul Eggert wrote:

> -;; Keywords: colour, rgb
> +;; Keywords: color, colour, rgb

The Keywords header was badly named. It's supposed to contain keywords
recognized by finder.el. But it just gets filled with any old thing
people think might be relevant. None of these 3 are in
finder-known-keywords.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10069: colour -> color spelling change
  2011-11-17  7:48 ` Glenn Morris
@ 2011-11-17 14:35   ` Drew Adams
  2011-11-19 23:28     ` Juri Linkov
  0 siblings, 1 reply; 7+ messages in thread
From: Drew Adams @ 2011-11-17 14:35 UTC (permalink / raw)
  To: 'Glenn Morris', 'Paul Eggert'; +Cc: 10069

> > -;; Keywords: colour, rgb
> > +;; Keywords: color, colour, rgb
> 
> The Keywords header was badly named. It's supposed to contain keywords
> recognized by finder.el. But it just gets filled with any old thing
> people think might be relevant. None of these 3 are in
> finder-known-keywords.

Is it supposed to contain _only_ keywords recognized by finder.el?  If so, where
is that documented?  (I wasn't aware of it.)

Why would we want to limit the use of this human-readable field to what
finder.el can make use of?






^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10069: colour -> color spelling change
  2011-11-17 14:35   ` Drew Adams
@ 2011-11-19 23:28     ` Juri Linkov
  0 siblings, 0 replies; 7+ messages in thread
From: Juri Linkov @ 2011-11-19 23:28 UTC (permalink / raw)
  To: Drew Adams; +Cc: 'Paul Eggert', 10069

>> > -;; Keywords: colour, rgb
>> > +;; Keywords: color, colour, rgb
>>
>> The Keywords header was badly named. It's supposed to contain keywords
>> recognized by finder.el. But it just gets filled with any old thing
>> people think might be relevant. None of these 3 are in
>> finder-known-keywords.
>
> Is it supposed to contain _only_ keywords recognized by finder.el?  If so, where
> is that documented?  (I wasn't aware of it.)
>
> Why would we want to limit the use of this human-readable field to what
> finder.el can make use of?

`finder-known-keywords' is a list of "official" keywords, and
`finder-unknown-keywords' is a list of keywords unknown to finder.





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10069: colour -> color spelling change
  2011-11-17  7:39 bug#10069: colour -> color spelling change Paul Eggert
  2011-11-17  7:48 ` Glenn Morris
@ 2011-12-31  9:25 ` Paul Eggert
  2016-02-25  6:33   ` Lars Ingebrigtsen
  2018-03-05  1:42 ` Paul Eggert
  2 siblings, 1 reply; 7+ messages in thread
From: Paul Eggert @ 2011-12-31  9:25 UTC (permalink / raw)
  To: 10069

[-- Attachment #1: Type: text/plain, Size: 291 bytes --]

Attached is an updated version of the patch,
made in the light of the comments at
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10150#23>.

This patch adds a NEWS update.  The patch
assumes the "Renamed functions" section mentioned in
<http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10052#8>.

[-- Attachment #2: colour.txt --]
[-- Type: text/plain, Size: 11146 bytes --]

=== modified file 'etc/NEWS'
--- etc/NEWS	2011-12-31 06:41:54 +0000
+++ etc/NEWS	2011-12-31 09:21:34 +0000
@@ -34,6 +34,12 @@
      eshell-uniquify-list
 **** hangul-input-method-inactivate ->
      hangul-input-method-deactivate
+**** hfy-colour ->
+     hfy-color
+**** hfy-colour-vals ->
+     hfy-color-vals
+**** hfy-fallback-colour-values ->
+     hfy-fallback-color-values
 **** inactivate-input-method ->
      deactivate-input-method
 **** pcomplete-uniqify-list ->
@@ -62,6 +68,14 @@
 **** quail-inactivate-hook ->
      quail-deactivate-hook
 
+*** Renamed Lisp variables, obsolete alias
+These old variables were documented and are therefore still supported
+via aliases for backward compatibility, but they are deprecated and will
+be removed eventually.
+
+**** hfy-rgb-txt-colour-map ->
+     hfy-rgb-txt-color-map
+
 *** Renamed Lisp variables
 
 **** follow-deactive-menu ->
@@ -69,6 +83,11 @@
 **** inactivate-current-input-method-function ->
      deactivate-current-input-method-function
 
+*** Renamed Lisp constants
+
+**** hfy-fallback-colour-map ->
+     hfy-fallback-color-map
+
 
 * Installation Changes in Emacs 24.1
 

=== modified file 'lisp/ChangeLog'
--- lisp/ChangeLog	2011-12-31 06:32:31 +0000
+++ lisp/ChangeLog	2011-12-31 09:21:34 +0000
@@ -1,5 +1,16 @@
 2011-12-31  Paul Eggert  <eggert@cs.ucla.edu>
 
+	Consistently use the spelling "color" (Bug#10069).
+	* 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.
+	Keep an obsolete alias with the old name.
+	(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.
+
 	uniqify -> uniquify, since that spelling is more common,
 	both within Emacs and in English-language sources in general.
 	* eshell/esh-util.el (eshell-uniquify-list): Rename from

=== modified file 'lisp/hfy-cmap.el'
--- lisp/hfy-cmap.el	2011-01-25 04:08:28 +0000
+++ lisp/hfy-cmap.el	2011-12-31 09:21:34 +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,10 @@
 ;; Package: htmlfontify
 ;; Filename: hfy-cmap.el
 ;; Version: 0.20
-;; Keywords: colour, rgb
 ;; Author: Vivek Dasmohapatra <vivek@etla.org>
 ;; Maintainer: Vivek Dasmohapatra <vivek@etla.org>
 ;; 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 +33,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 +787,10 @@
     ("light green"             37008 61166 37008)
     ("LightGreen"              37008 61166 37008)) )
 
-(defvar hfy-rgb-txt-colour-map nil)
+(defvar hfy-rgb-txt-color-map nil)
+(define-obsolete-variable-alias
+  hfy-rgb-txt-colour-map
+  hfy-rgb-txt-color-map "25.1")
 
 (defvar hfy-rgb-load-path
   (list "/etc/X11"
@@ -808,8 +810,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 +826,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-12-05 08:55:25 +0000
+++ lisp/htmlfontify.el	2011-12-31 09:21:34 +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))
+          (x-color-values color))
       ;; blarg - tty colors are no good - go fetch some X colors:
-      (hfy-fallback-colour-values colour))))
+      (hfy-fallback-color-values color))))
 
 (defvar hfy-cperl-mode-kludged-p nil)
 
@@ -720,7 +720,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))
@@ -733,15 +733,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
@@ -752,8 +752,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
@@ -801,17 +801,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")
@@ -990,7 +990,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))
@@ -2315,22 +2315,22 @@
     (load file 'NOERROR nil nil) ))
 
 \f
-;;;### (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)
 
 ;;;***
 \f


^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10069: colour -> color spelling change
  2011-12-31  9:25 ` Paul Eggert
@ 2016-02-25  6:33   ` Lars Ingebrigtsen
  0 siblings, 0 replies; 7+ messages in thread
From: Lars Ingebrigtsen @ 2016-02-25  6:33 UTC (permalink / raw)
  To: Paul Eggert; +Cc: 10069

Paul Eggert <eggert@cs.ucla.edu> writes:

> Attached is an updated version of the patch,
> made in the light of the comments at
> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10150#23>.
>
> This patch adds a NEWS update.  The patch
> assumes the "Renamed functions" section mentioned in
> <http://debbugs.gnu.org/cgi/bugreport.cgi?bug=10052#8>.
>
> === modified file 'etc/NEWS'
> --- etc/NEWS	2011-12-31 06:41:54 +0000
> +++ etc/NEWS	2011-12-31 09:21:34 +0000
> @@ -34,6 +34,12 @@
>       eshell-uniquify-list
>  **** hangul-input-method-inactivate ->
>       hangul-input-method-deactivate
> +**** hfy-colour ->
> +     hfy-color
> +**** hfy-colour-vals ->
> +     hfy-color-vals
> +**** hfy-fallback-colour-values ->
> +     hfy-fallback-color-values
>  **** inactivate-input-method ->
>       deactivate-input-method
>  **** pcomplete-uniqify-list ->
> @@ -62,6 +68,14 @@
>  **** quail-inactivate-hook ->
>       quail-deactivate-hook

It seems like some of these variables and functions were renamed, but
not the hfy ones, for instance...

-- 
(domestic pets only, the antidote for overdose, milk.)
   bloggy blog: http://lars.ingebrigtsen.no





^ permalink raw reply	[flat|nested] 7+ messages in thread

* bug#10069: colour -> color spelling change
  2011-11-17  7:39 bug#10069: colour -> color spelling change Paul Eggert
  2011-11-17  7:48 ` Glenn Morris
  2011-12-31  9:25 ` Paul Eggert
@ 2018-03-05  1:42 ` Paul Eggert
  2 siblings, 0 replies; 7+ messages in thread
From: Paul Eggert @ 2018-03-05  1:42 UTC (permalink / raw)
  To: 10069-done

[-- Attachment #1: Type: text/plain, Size: 75 bytes --]

I installed the attached patch into master and am closing this bug report.

[-- Attachment #2: 0001-Spelling-fixes-Bug-10068.patch --]
[-- Type: text/x-patch, Size: 13307 bytes --]

From 0e10b6fce7568077797c5a16cd2a584a8dcba46e Mon Sep 17 00:00:00 2001
From: Paul Eggert <eggert@cs.ucla.edu>
Date: Sun, 4 Mar 2018 17:38:43 -0800
Subject: [PATCH] Spelling fixes (Bug#10068)

* lisp/gnus/gnus-score.el (gnus-score-find-favorite-words):
Rename from gnus-score-find-favourite-words.
* lisp/hfy-cmap.el (hfy-fallback-color-map)
(hfy-rgb-txt-color-map, hfy-fallback-color-values):
* lisp/htmlfontify.el (hfy-color-vals, hfy-color):
Rename from names that used 'colour' instead of 'color'.
---
 doc/misc/gnus.texi      |  4 ++--
 etc/NEWS                | 10 ++++++++++
 lisp/gnus/gnus-score.el |  7 +++++--
 lisp/gnus/gnus-sum.el   |  2 +-
 lisp/hfy-cmap.el        | 35 ++++++++++++++++++++++-------------
 lisp/htmlfontify.el     | 48 +++++++++++++++++++++++++-----------------------
 lisp/net/tramp-adb.el   |  2 +-
 7 files changed, 66 insertions(+), 42 deletions(-)

diff --git a/doc/misc/gnus.texi b/doc/misc/gnus.texi
index 8a0b631..cc4b234 100644
--- a/doc/misc/gnus.texi
+++ b/doc/misc/gnus.texi
@@ -19471,8 +19471,8 @@ Summary Score Commands
 
 @item V w
 @kindex V w @r{(Summary)}
-@findex gnus-score-find-favourite-words
-List words used in scoring (@code{gnus-score-find-favourite-words}).
+@findex gnus-score-find-favorite-words
+List words used in scoring (@code{gnus-score-find-favorite-words}).
 
 @item V R
 @kindex V R @r{(Summary)}
diff --git a/etc/NEWS b/etc/NEWS
index 08c7e7e..c998ad6 100644
--- a/etc/NEWS
+++ b/etc/NEWS
@@ -142,6 +142,16 @@ This can be controlled by the new `ecomplete-sort-predicate' variable.
 *** The 'ecompleterc' file is now placed in ~/.emacs.d/ecompleterc by default
 Of course it will still find it if you have it in ~/.ecompleterc
 
+** Gnus
+*** The function 'gnus-score-find-favorite-words' has been renamed
+from 'gnus-score-find-favourite-words'.
+
+** Htmlfontify
+*** The functions 'hfy-color', 'hfy-color-vals' and
+'hfy-fallback-color-values' and the variables 'hfy-fallback-color-map'
+and 'hfy-rgb-txt-color-map' have been renamed from names that used
+'colour' instead of 'color'.
+
 ** Smtpmail
 Authentication mechanisms can be added via external packages, by
 defining new cl-defmethod of smtpmail-try-auth-method.
diff --git a/lisp/gnus/gnus-score.el b/lisp/gnus/gnus-score.el
index ec07d1a..ad11ff4 100644
--- a/lisp/gnus/gnus-score.el
+++ b/lisp/gnus/gnus-score.el
@@ -514,7 +514,7 @@ gnus-header-index
   "f" gnus-score-edit-file
   "F" gnus-score-flush-cache
   "t" gnus-score-find-trace
-  "w" gnus-score-find-favourite-words)
+  "w" gnus-score-find-favorite-words)
 
 ;; Summary score file commands
 
@@ -2517,7 +2517,7 @@ gnus-score-find-trace
     (set-buffer gnus-summary-buffer)
     (setq gnus-newsgroup-scored old-scored)))
 
-(defun gnus-score-find-favourite-words ()
+(defun gnus-score-find-favorite-words ()
   "List words used in scoring."
   (interactive)
   (let ((alists (gnus-score-load-files (gnus-all-score-files)))
@@ -2553,6 +2553,9 @@ gnus-score-find-favourite-words
 	(pop rules))
       (goto-char (point-min))
       (gnus-configure-windows 'score-words))))
+(define-obsolete-function-alias
+  'gnus-score-find-favourite-words
+  'gnus-score-find-favorite-words "27.1")
 
 (defun gnus-summary-rescore ()
   "Redo the entire scoring process in the current summary."
diff --git a/lisp/gnus/gnus-sum.el b/lisp/gnus/gnus-sum.el
index a28c00b..468f2b1 100644
--- a/lisp/gnus/gnus-sum.el
+++ b/lisp/gnus/gnus-sum.el
@@ -2370,7 +2370,7 @@ gnus-summary-make-menu-bar
 	  ["Edit current score file" gnus-score-edit-current-scores t]
 	  ["Edit score file..." gnus-score-edit-file t]
 	  ["Trace score" gnus-score-find-trace t]
-	  ["Find words" gnus-score-find-favourite-words t]
+	  ["Find words" gnus-score-find-favorite-words t]
 	  ["Rescore buffer" gnus-summary-rescore t]
 	  ["Increase score..." gnus-summary-increase-score t]
 	  ["Lower score..." gnus-summary-lower-score t]))))
diff --git a/lisp/hfy-cmap.el b/lisp/hfy-cmap.el
index 6dea345..4ec24ce 100644
--- a/lisp/hfy-cmap.el
+++ b/lisp/hfy-cmap.el
@@ -1,15 +1,15 @@
-;;; 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-2018 Free Software Foundation, Inc.
 
 ;; Emacs Lisp Archive Entry
 ;; Package: htmlfontify
 ;; Filename: hfy-cmap.el
-;; Keywords: colour, rgb
+;; Keywords: color, rgb
 ;; Author: Vivek Dasmohapatra <vivek@etla.org>
 ;; Maintainer: Vivek Dasmohapatra <vivek@etla.org>
 ;; 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
 
@@ -32,7 +32,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)
@@ -785,8 +785,14 @@ hfy-fallback-colour-map
     ("DarkRed"                 35723     0     0)
     ("light green"             37008 61166 37008)
     ("LightGreen"              37008 61166 37008)) )
+(define-obsolete-variable-alias
+  'hfy-fallback-colour-map
+  'hfy-fallback-color-map "27.1")
 
-(defvar hfy-rgb-txt-colour-map nil)
+(defvar hfy-rgb-txt-color-map nil)
+(define-obsolete-variable-alias
+  'hfy-rgb-txt-colour-map
+  'hfy-rgb-txt-color-map "27.1")
 
 (defvar hfy-rgb-load-path
   (list "/etc/X11"
@@ -806,8 +812,8 @@ hfy-rgb-regex
 (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))))
@@ -822,25 +828,28 @@ htmlfontify-load-rgb-file
 	  (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))) )
+(define-obsolete-function-alias
+  'hfy-fallback-colour-values
+  'hfy-fallback-color-values "27.1")
 
 (provide 'hfy-cmap)
 
diff --git a/lisp/htmlfontify.el b/lisp/htmlfontify.el
index dfa6bde..799da86 100644
--- a/lisp/htmlfontify.el
+++ b/lisp/htmlfontify.el
@@ -584,22 +584,23 @@ hfy-interq
       (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))
+          (x-color-values color))
       ;; blarg - tty colors are no good - go fetch some X colors:
-      (hfy-fallback-colour-values colour))))
+      (hfy-fallback-color-values color))))
+(define-obsolete-function-alias 'hfy-colour-vals 'hfy-color-vals "27.1")
 
 (defvar hfy-cperl-mode-kludged-p nil)
 
@@ -738,7 +739,7 @@ hfy-link-style-string
   "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))
@@ -751,19 +752,19 @@ hfy-link-style-string
 
 ;; 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
+  ;;(message "hfy-color-vals");;DBUG
   ;; TODO?  Can we do somehow do better than this?
   (cond
-   ((equal colour "unspecified-fg") (setq colour "black"))
-   ((equal colour "unspecified-bg") (setq colour "white")))
-  (let ((white (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals "white")))
-        (rgb16 (mapcar (lambda (I) (float (1+ I))) (hfy-colour-vals  colour))))
+   ((equal color "unspecified-fg") (setq color "black"))
+   ((equal color "unspecified-bg") (setq color "white")))
+  (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
@@ -774,8 +775,9 @@ hfy-triplet
                        '(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))))
+(define-obsolete-function-alias 'hfy-colour 'hfy-color "27.1")
 (defun hfy-width  (width)  (list (cons "font-stretch" (symbol-name  width))))
 
 (defcustom hfy-font-zoom 1.05
@@ -825,17 +827,17 @@ hfy-box-to-border-assoc
       (let ((tag (car  spec))
             (val (cadr spec)))
         (cons (cl-case tag
-                (:color (cons "colour" 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" (cl-case s
                             (released-button "outset")
@@ -1014,7 +1016,7 @@ hfy-face-to-style-i
                        (: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))
diff --git a/lisp/net/tramp-adb.el b/lisp/net/tramp-adb.el
index 7ac61b8..7a0ea71 100644
--- a/lisp/net/tramp-adb.el
+++ b/lisp/net/tramp-adb.el
@@ -464,7 +464,7 @@ tramp-adb-get-ls-command
     (cond
      ;; Support Android derived systems where "ls" command is provided
      ;; by GNU Coreutils. Force "ls" to print one column and set
-     ;; time-style to imitate other "ls" flavours.
+     ;; time-style to imitate other "ls" flavors.
      ((tramp-adb-send-command-and-check
        vec "ls --time-style=long-iso /dev/null")
       "ls -1 --time-style=long-iso")
-- 
2.7.4


^ permalink raw reply related	[flat|nested] 7+ messages in thread

end of thread, other threads:[~2018-03-05  1:42 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-11-17  7:39 bug#10069: colour -> color spelling change Paul Eggert
2011-11-17  7:48 ` Glenn Morris
2011-11-17 14:35   ` Drew Adams
2011-11-19 23:28     ` Juri Linkov
2011-12-31  9:25 ` Paul Eggert
2016-02-25  6:33   ` Lars Ingebrigtsen
2018-03-05  1:42 ` Paul Eggert

Code repositories for project(s) associated with this public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).