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:
parent
9b335362d0
commit
4fa5174182
7 changed files with 37 additions and 26 deletions
|
@ -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>
|
||||
|
||||
Re-implement the feature of showing eldoc info after editing.
|
||||
|
|
|
@ -224,7 +224,7 @@ Some generic modes are defined in `generic-x.el'."
|
|||
|
||||
;;; Comment Functionality
|
||||
|
||||
(defun generic--normalise-comments (comment-list)
|
||||
(defun generic--normalize-comments (comment-list)
|
||||
(let ((normalized '()))
|
||||
(dolist (start comment-list)
|
||||
(let (end)
|
||||
|
@ -300,7 +300,7 @@ Some generic modes are defined in `generic-x.el'."
|
|||
(defun generic-mode-set-comments (comment-list)
|
||||
"Set up comment functionality for generic mode."
|
||||
(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-vars comment-list)
|
||||
(set-syntax-table st)))
|
||||
|
|
|
@ -291,7 +291,7 @@ To test this function, evaluate:
|
|||
(or (mouse-movement-p event)
|
||||
(eq (car-safe event) 'switch-frame)))
|
||||
;; Scroll if see if we're on the edge.
|
||||
;; NEEDSWORK: should handle mouse-in-other window.
|
||||
;; FIXME: should handle mouse-in-other window.
|
||||
(cond
|
||||
((not (eq start-window (posn-window end)))
|
||||
t) ; wait for return to original window
|
||||
|
|
|
@ -1223,7 +1223,7 @@ some heuristics to guess the result."
|
|||
;; When `org-blank-before-new-entry' says so, it is 1.
|
||||
((eq insert-blank-p t) 1)
|
||||
;; `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)))
|
||||
(cond
|
||||
;; Is there a next item?
|
||||
|
|
|
@ -5093,7 +5093,7 @@ Return the new string."
|
|||
;;;; Topology
|
||||
;;
|
||||
;; 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
|
||||
;; (`org-export-get-parent-headline'), first element containing an
|
||||
;; object, (`org-export-get-parent-element'), parent table
|
||||
|
|
|
@ -231,7 +231,7 @@ Available modes are `shift-default' and `shift-always'."
|
|||
(defvar bubbles--score 0
|
||||
"Current Bubbles score.")
|
||||
|
||||
(defvar bubbles--neighbourhood-score 0
|
||||
(defvar bubbles--neighborhood-score 0
|
||||
"Score of active bubbles neighborhood.")
|
||||
|
||||
(defvar bubbles--faces nil
|
||||
|
@ -925,7 +925,7 @@ static char * dot3d_xpm[] = {
|
|||
(buffer-disable-undo)
|
||||
(force-mode-line-update)
|
||||
(redisplay)
|
||||
(add-hook 'post-command-hook 'bubbles--mark-neighbourhood t t))
|
||||
(add-hook 'post-command-hook 'bubbles--mark-neighborhood t t))
|
||||
|
||||
;;;###autoload
|
||||
(defun bubbles ()
|
||||
|
@ -1087,7 +1087,7 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
|
|||
(char-after (point))
|
||||
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."
|
||||
(save-excursion
|
||||
(let ((count 0))
|
||||
|
@ -1097,13 +1097,13 @@ Set `bubbles--col-offset' and `bubbles--row-offset'."
|
|||
(add-text-properties (point) (1+ (point))
|
||||
'(active t face 'bubbles--highlight-face))
|
||||
(setq count (+ 1
|
||||
(bubbles--mark-direct-neighbours row (1+ col) char)
|
||||
(bubbles--mark-direct-neighbours row (1- col) char)
|
||||
(bubbles--mark-direct-neighbours (1+ row) col char)
|
||||
(bubbles--mark-direct-neighbours (1- row) col char))))
|
||||
(bubbles--mark-direct-neighbors row (1+ col) char)
|
||||
(bubbles--mark-direct-neighbors row (1- col) char)
|
||||
(bubbles--mark-direct-neighbors (1+ row) col char)
|
||||
(bubbles--mark-direct-neighbors (1- row) col char))))
|
||||
count)))
|
||||
|
||||
(defun bubbles--mark-neighbourhood (&optional pos)
|
||||
(defun bubbles--mark-neighborhood (&optional pos)
|
||||
"Mark neighborhood of point.
|
||||
Use optional parameter POS instead of point if given."
|
||||
(when bubbles--playing
|
||||
|
@ -1117,17 +1117,17 @@ Use optional parameter POS instead of point if given."
|
|||
'(face default active nil))
|
||||
(let ((count 0))
|
||||
(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)
|
||||
(add-text-properties (point-min) (point-max)
|
||||
'(face default active nil))
|
||||
(setq count 0)))
|
||||
(bubbles--update-neighbourhood-score count))
|
||||
(bubbles--update-neighborhood-score count))
|
||||
(put-text-property (point-min) (point-max) 'pointer 'arrow)
|
||||
(bubbles--update-faces-or-images)
|
||||
(sit-for 0)))))
|
||||
|
||||
(defun bubbles--neighbourhood-available ()
|
||||
(defun bubbles--neighborhood-available ()
|
||||
"Return t if another valid neighborhood is available."
|
||||
(catch 'found
|
||||
(save-excursion
|
||||
|
@ -1153,20 +1153,20 @@ Use optional parameter POS instead of point if given."
|
|||
|
||||
(defun bubbles--reset-score ()
|
||||
"Reset bubbles score."
|
||||
(setq bubbles--neighbourhood-score 0
|
||||
(setq bubbles--neighborhood-score 0
|
||||
bubbles--score 0)
|
||||
(bubbles--update-score))
|
||||
|
||||
(defun bubbles--update-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))
|
||||
|
||||
(defun bubbles--update-neighbourhood-score (size)
|
||||
(defun bubbles--update-neighborhood-score (size)
|
||||
"Calculate and display score of active neighborhood from its SIZE."
|
||||
(if (> size 1)
|
||||
(setq bubbles--neighbourhood-score (expt (- size 1) 2))
|
||||
(setq bubbles--neighbourhood-score 0))
|
||||
(setq bubbles--neighborhood-score (expt (- size 1) 2))
|
||||
(setq bubbles--neighborhood-score 0))
|
||||
(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)
|
||||
(pos (point)))
|
||||
(delete-region (point) (point-max))
|
||||
(insert (format "Selected: %4d\n" bubbles--neighbourhood-score))
|
||||
(insert (format "Selected: %4d\n" bubbles--neighborhood-score))
|
||||
(insert " ")
|
||||
(add-text-properties (1- (point)) (point)
|
||||
(list 'intangible t 'display
|
||||
|
@ -1216,10 +1216,10 @@ Use optional parameter POS instead of point if given."
|
|||
"Remove active bubbles region."
|
||||
(interactive)
|
||||
(when (and bubbles--playing
|
||||
(> bubbles--neighbourhood-score 0))
|
||||
(> bubbles--neighborhood-score 0))
|
||||
(setq bubbles--save-data (list bubbles--score (buffer-string)))
|
||||
(let ((inhibit-read-only t))
|
||||
;; blank out current neighbourhood
|
||||
;; blank out current neighborhood
|
||||
(let ((row (bubbles--row (point)))
|
||||
(col (bubbles--col (point))))
|
||||
(goto-char (point-max))
|
||||
|
@ -1289,7 +1289,7 @@ Use optional parameter POS instead of point if given."
|
|||
(bubbles--update-faces-or-images)
|
||||
(sit-for 0)))
|
||||
(put-text-property (point-min) (point-max) 'removed nil)
|
||||
(unless (bubbles--neighbourhood-available)
|
||||
(unless (bubbles--neighborhood-available)
|
||||
(bubbles--game-over)))
|
||||
;; undo
|
||||
(setq buffer-undo-list '((apply bubbles-undo . nil)))
|
||||
|
|
|
@ -3504,7 +3504,7 @@ so that `occur-next' and `occur-prev' will work."
|
|||
|
||||
;; Originally this was sh-learn-region-indent (beg end)
|
||||
;; 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)
|
||||
"Learn how to indent the buffer the way it currently is.
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue