Spelling fixes.

* lisp/emacs-lisp/generic.el (generic--normalize-comments):
Rename from generic--normalise-comments.  All uses changed.
* lisp/play/bubbles.el (bubbles--neighborhood-score):
(bubbles--mark-direct-neighbors, bubbles--mark-neighborhood)
(bubbles--neighborhood-available)
(bubbles--update-neighborhood-score):
Rename from names with 'neighbourhood'.  All uses changed.
This commit is contained in:
Paul Eggert 2014-01-11 21:29:11 -08:00
parent 9b335362d0
commit 4fa5174182
7 changed files with 37 additions and 26 deletions

View file

@ -1,3 +1,14 @@
2014-01-12 Paul Eggert <eggert@cs.ucla.edu>
Spelling fixes.
* emacs-lisp/generic.el (generic--normalize-comments):
Rename from generic--normalise-comments. All uses changed.
* play/bubbles.el (bubbles--neighborhood-score):
(bubbles--mark-direct-neighbors, bubbles--mark-neighborhood)
(bubbles--neighborhood-available)
(bubbles--update-neighborhood-score):
Rename from names with 'neighbourhood'. All uses changed.
2014-01-12 Leo Liu <sdl.web@gmail.com> 2014-01-12 Leo Liu <sdl.web@gmail.com>
Re-implement the feature of showing eldoc info after editing. Re-implement the feature of showing eldoc info after editing.

View file

@ -224,7 +224,7 @@ Some generic modes are defined in `generic-x.el'."
;;; Comment Functionality ;;; Comment Functionality
(defun generic--normalise-comments (comment-list) (defun generic--normalize-comments (comment-list)
(let ((normalized '())) (let ((normalized '()))
(dolist (start comment-list) (dolist (start comment-list)
(let (end) (let (end)
@ -300,7 +300,7 @@ Some generic modes are defined in `generic-x.el'."
(defun generic-mode-set-comments (comment-list) (defun generic-mode-set-comments (comment-list)
"Set up comment functionality for generic mode." "Set up comment functionality for generic mode."
(let ((st (make-syntax-table)) (let ((st (make-syntax-table))
(comment-list (generic--normalise-comments comment-list))) (comment-list (generic--normalize-comments comment-list)))
(generic-set-comment-syntax st comment-list) (generic-set-comment-syntax st comment-list)
(generic-set-comment-vars comment-list) (generic-set-comment-vars comment-list)
(set-syntax-table st))) (set-syntax-table st)))

View file

@ -291,7 +291,7 @@ To test this function, evaluate:
(or (mouse-movement-p event) (or (mouse-movement-p event)
(eq (car-safe event) 'switch-frame))) (eq (car-safe event) 'switch-frame)))
;; Scroll if see if we're on the edge. ;; Scroll if see if we're on the edge.
;; NEEDSWORK: should handle mouse-in-other window. ;; FIXME: should handle mouse-in-other window.
(cond (cond
((not (eq start-window (posn-window end))) ((not (eq start-window (posn-window end)))
t) ; wait for return to original window t) ; wait for return to original window

View file

@ -1223,7 +1223,7 @@ some heuristics to guess the result."
;; When `org-blank-before-new-entry' says so, it is 1. ;; When `org-blank-before-new-entry' says so, it is 1.
((eq insert-blank-p t) 1) ((eq insert-blank-p t) 1)
;; `plain-list-item' is 'auto. Count blank lines separating ;; `plain-list-item' is 'auto. Count blank lines separating
;; neighbours items in list. ;; neighbors' items in list.
(t (let ((next-p (org-list-get-next-item item struct prevs))) (t (let ((next-p (org-list-get-next-item item struct prevs)))
(cond (cond
;; Is there a next item? ;; Is there a next item?

View file

@ -5093,7 +5093,7 @@ Return the new string."
;;;; Topology ;;;; Topology
;; ;;
;; Here are various functions to retrieve information about the ;; Here are various functions to retrieve information about the
;; neighbourhood of a given element or object. Neighbours of interest ;; neighborhood of a given element or object. Neighbors of interest
;; are direct parent (`org-export-get-parent'), parent headline ;; are direct parent (`org-export-get-parent'), parent headline
;; (`org-export-get-parent-headline'), first element containing an ;; (`org-export-get-parent-headline'), first element containing an
;; object, (`org-export-get-parent-element'), parent table ;; object, (`org-export-get-parent-element'), parent table

View file

@ -231,7 +231,7 @@ Available modes are `shift-default' and `shift-always'."
(defvar bubbles--score 0 (defvar bubbles--score 0
"Current Bubbles score.") "Current Bubbles score.")
(defvar bubbles--neighbourhood-score 0 (defvar bubbles--neighborhood-score 0
"Score of active bubbles neighborhood.") "Score of active bubbles neighborhood.")
(defvar bubbles--faces nil (defvar bubbles--faces nil
@ -925,7 +925,7 @@ static char * dot3d_xpm[] = {
(buffer-disable-undo) (buffer-disable-undo)
(force-mode-line-update) (force-mode-line-update)
(redisplay) (redisplay)
(add-hook 'post-command-hook 'bubbles--mark-neighbourhood t t)) (add-hook 'post-command-hook 'bubbles--mark-neighborhood t t))
;;;###autoload ;;;###autoload
(defun bubbles () (defun bubbles ()
@ -1087,7 +1087,7 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
(char-after (point)) (char-after (point))
nil))) nil)))
(defun bubbles--mark-direct-neighbours (row col char) (defun bubbles--mark-direct-neighbors (row col char)
"Mark direct neighbors of bubble at ROW COL with same CHAR." "Mark direct neighbors of bubble at ROW COL with same CHAR."
(save-excursion (save-excursion
(let ((count 0)) (let ((count 0))
@ -1097,13 +1097,13 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
(add-text-properties (point) (1+ (point)) (add-text-properties (point) (1+ (point))
'(active t face 'bubbles--highlight-face)) '(active t face 'bubbles--highlight-face))
(setq count (+ 1 (setq count (+ 1
(bubbles--mark-direct-neighbours row (1+ col) char) (bubbles--mark-direct-neighbors row (1+ col) char)
(bubbles--mark-direct-neighbours row (1- col) char) (bubbles--mark-direct-neighbors row (1- col) char)
(bubbles--mark-direct-neighbours (1+ row) col char) (bubbles--mark-direct-neighbors (1+ row) col char)
(bubbles--mark-direct-neighbours (1- row) col char)))) (bubbles--mark-direct-neighbors (1- row) col char))))
count))) count)))
(defun bubbles--mark-neighbourhood (&optional pos) (defun bubbles--mark-neighborhood (&optional pos)
"Mark neighborhood of point. "Mark neighborhood of point.
Use optional parameter POS instead of point if given." Use optional parameter POS instead of point if given."
(when bubbles--playing (when bubbles--playing
@ -1117,17 +1117,17 @@ Use optional parameter POS instead of point if given."
'(face default active nil)) '(face default active nil))
(let ((count 0)) (let ((count 0))
(when (and row col (not (eq char (bubbles--empty-char)))) (when (and row col (not (eq char (bubbles--empty-char))))
(setq count (bubbles--mark-direct-neighbours row col char)) (setq count (bubbles--mark-direct-neighbors row col char))
(unless (> count 1) (unless (> count 1)
(add-text-properties (point-min) (point-max) (add-text-properties (point-min) (point-max)
'(face default active nil)) '(face default active nil))
(setq count 0))) (setq count 0)))
(bubbles--update-neighbourhood-score count)) (bubbles--update-neighborhood-score count))
(put-text-property (point-min) (point-max) 'pointer 'arrow) (put-text-property (point-min) (point-max) 'pointer 'arrow)
(bubbles--update-faces-or-images) (bubbles--update-faces-or-images)
(sit-for 0))))) (sit-for 0)))))
(defun bubbles--neighbourhood-available () (defun bubbles--neighborhood-available ()
"Return t if another valid neighborhood is available." "Return t if another valid neighborhood is available."
(catch 'found (catch 'found
(save-excursion (save-excursion
@ -1153,20 +1153,20 @@ Use optional parameter POS instead of point if given."
(defun bubbles--reset-score () (defun bubbles--reset-score ()
"Reset bubbles score." "Reset bubbles score."
(setq bubbles--neighbourhood-score 0 (setq bubbles--neighborhood-score 0
bubbles--score 0) bubbles--score 0)
(bubbles--update-score)) (bubbles--update-score))
(defun bubbles--update-score () (defun bubbles--update-score ()
"Calculate and display new bubbles score." "Calculate and display new bubbles score."
(setq bubbles--score (+ bubbles--score bubbles--neighbourhood-score)) (setq bubbles--score (+ bubbles--score bubbles--neighborhood-score))
(bubbles--show-scores)) (bubbles--show-scores))
(defun bubbles--update-neighbourhood-score (size) (defun bubbles--update-neighborhood-score (size)
"Calculate and display score of active neighborhood from its SIZE." "Calculate and display score of active neighborhood from its SIZE."
(if (> size 1) (if (> size 1)
(setq bubbles--neighbourhood-score (expt (- size 1) 2)) (setq bubbles--neighborhood-score (expt (- size 1) 2))
(setq bubbles--neighbourhood-score 0)) (setq bubbles--neighborhood-score 0))
(bubbles--show-scores)) (bubbles--show-scores))
(defun bubbles--show-scores () (defun bubbles--show-scores ()
@ -1177,7 +1177,7 @@ Use optional parameter POS instead of point if given."
(let ((inhibit-read-only t) (let ((inhibit-read-only t)
(pos (point))) (pos (point)))
(delete-region (point) (point-max)) (delete-region (point) (point-max))
(insert (format "Selected: %4d\n" bubbles--neighbourhood-score)) (insert (format "Selected: %4d\n" bubbles--neighborhood-score))
(insert " ") (insert " ")
(add-text-properties (1- (point)) (point) (add-text-properties (1- (point)) (point)
(list 'intangible t 'display (list 'intangible t 'display
@ -1216,10 +1216,10 @@ Use optional parameter POS instead of point if given."
"Remove active bubbles region." "Remove active bubbles region."
(interactive) (interactive)
(when (and bubbles--playing (when (and bubbles--playing
(> bubbles--neighbourhood-score 0)) (> bubbles--neighborhood-score 0))
(setq bubbles--save-data (list bubbles--score (buffer-string))) (setq bubbles--save-data (list bubbles--score (buffer-string)))
(let ((inhibit-read-only t)) (let ((inhibit-read-only t))
;; blank out current neighbourhood ;; blank out current neighborhood
(let ((row (bubbles--row (point))) (let ((row (bubbles--row (point)))
(col (bubbles--col (point)))) (col (bubbles--col (point))))
(goto-char (point-max)) (goto-char (point-max))
@ -1289,7 +1289,7 @@ Use optional parameter POS instead of point if given."
(bubbles--update-faces-or-images) (bubbles--update-faces-or-images)
(sit-for 0))) (sit-for 0)))
(put-text-property (point-min) (point-max) 'removed nil) (put-text-property (point-min) (point-max) 'removed nil)
(unless (bubbles--neighbourhood-available) (unless (bubbles--neighborhood-available)
(bubbles--game-over))) (bubbles--game-over)))
;; undo ;; undo
(setq buffer-undo-list '((apply bubbles-undo . nil))) (setq buffer-undo-list '((apply bubbles-undo . nil)))

View file

@ -3504,7 +3504,7 @@ so that `occur-next' and `occur-prev' will work."
;; Originally this was sh-learn-region-indent (beg end) ;; Originally this was sh-learn-region-indent (beg end)
;; However, in practice this was awkward so I changed it to ;; However, in practice this was awkward so I changed it to
;; use the whole buffer. Use narrowing if needbe. ;; use the whole buffer. Use narrowing if need be.
(defun sh-learn-buffer-indent (&optional arg) (defun sh-learn-buffer-indent (&optional arg)
"Learn how to indent the buffer the way it currently is. "Learn how to indent the buffer the way it currently is.