branch: externals/org
commit 90ce752f3f229db96e3e6717934602e00e8368af
Author: Paul Eggert <[email protected]>
Commit: Ihor Radchenko <[email protected]>
Ensure American spelling across docstrings, comments, and symbol names
* lisp/oc-basic.el (org-cite-basic--shorten-names):
* lisp/ol.el (org-link-expand-abbrev):
* lisp/org-fold-core.el:
* lisp/ox.el (org-export-dictionary):
* lisp/org.el (org-log-beginning):
(org-set-font-lock-defaults): Use American English in comments.
* lisp/org-fold-core.el (org-fold-core-update-optimisation):
(org-fold-core-update-optimization):
(org-fold-core--optimize-for-huge-buffers): Rename to American spelling.
Keep old name for public function as obsolete alias.
(org-fold-core-get-folding-spec-property):
(org-fold-core-get-folding-property-symbol):
(org-fold-core-decouple-indirect-buffer-folds):
(org-fold-core-set-folding-spec-property):
(org-fold-core-region):
(org-fold-core--fix-folded-region):
(org-fold-core-remove-optimisation):
* lisp/org.el (org-unfontify-region):
(org-get-heading):
(org-heading-components): Use the new names.
* lisp/org-plot.el (org--plot/sensible-tick-num):
(org--plot/item-frequencies): Use American spelling for local
variables.
---
lisp/oc-basic.el | 2 +-
lisp/ol.el | 2 +-
lisp/org-fold-core.el | 47 +++++++++++++++++++++++++----------------------
lisp/org-plot.el | 14 +++++++-------
lisp/org.el | 12 ++++++------
lisp/ox.el | 2 +-
6 files changed, 41 insertions(+), 38 deletions(-)
diff --git a/lisp/oc-basic.el b/lisp/oc-basic.el
index b11da3867a..c57e8761e9 100644
--- a/lisp/oc-basic.el
+++ b/lisp/oc-basic.el
@@ -395,7 +395,7 @@ Throw an error if the field value is non-string and
non-nil."
"Return a list of family names from a list of full NAMES.
NAMES can be a string or raw string object.
-To better accomomodate corporate names, this will only shorten
+To better accommodate corporate names, this will only shorten
personal names of the form \"family, given\"."
(let (names-string raw-p)
(cond
diff --git a/lisp/ol.el b/lisp/ol.el
index c142cd54eb..4adf5f1ecc 100644
--- a/lisp/ol.el
+++ b/lisp/ol.el
@@ -1625,7 +1625,7 @@ Abbreviations are defined in `org-link-abbrev-alist'."
((string-match "%(\\([^)]+\\))" rpl)
(let ((rpl-fun-symbol (intern-soft (match-string 1 rpl))))
;; Using `unsafep-function' is not quite enough because
- ;; Emacs considers functions like `genenv' safe, while
+ ;; Emacs considers functions like `getenv' safe, while
;; they can potentially be used to expose private system
;; data to attacker if abbreviated link is clicked.
(if (or (eq t (get rpl-fun-symbol 'org-link-abbrev-safe))
diff --git a/lisp/org-fold-core.el b/lisp/org-fold-core.el
index ec0fff3ac8..238815bbc2 100644
--- a/lisp/org-fold-core.el
+++ b/lisp/org-fold-core.el
@@ -242,16 +242,16 @@
;; recommended to minimize the number of folding specs used in the
;; same buffer at a time.
-;; Alternatively, the library provides
`org-fold-core--optimise-for-huge-buffers'
+;; Alternatively, the library provides
`org-fold-core--optimize-for-huge-buffers'
;; for additional speedup. This can be used as a file-local variable
;; in huge buffers. The variable can be set to enable various levels
;; of extra optimization. See the docstring for detailed information.
-;; It is worth noting that when using
`org-fold-core--optimise-for-huge-buffers'
+;; It is worth noting that when using
`org-fold-core--optimize-for-huge-buffers'
;; with `grab-invisible' option, folded regions copied to other
;; buffers (including buffers that do not use this library) will
;; remain invisible. org-fold-core provides functions to work around
-;; this issue: `org-fold-core-remove-optimisation' and
`org-fold-core-update-optimisation', but
+;; this issue: `org-fold-core-remove-optimisation' and
`org-fold-core-update-optimization', but
;; it is unlikely that a random external package will use them.
;; Another possible bottleneck is the fragility check after the change
@@ -304,7 +304,7 @@ Important: This variable must be set before loading Org."
The function is called with a single argument - point where text is to
be revealed.")
-(defvar-local org-fold-core--optimise-for-huge-buffers nil
+(defvar-local org-fold-core--optimize-for-huge-buffers nil
"Non-nil turns on extra speedup on huge buffers (Mbs of folded text).
This setting is risky and may cause various artifacts and degraded
@@ -344,7 +344,7 @@ following symbols:
- `merge-folds': Do not distinguish between different types of folding
specs. This is the most aggressive optimization with unforeseen and
potentially drastic effects.")
-(put 'org-fold-core--optimise-for-huge-buffers 'safe-local-variable 'listp)
+(put 'org-fold-core--optimize-for-huge-buffers 'safe-local-variable 'listp)
;;; Core functionality
@@ -449,10 +449,10 @@ Return nil when there is no matching folding spec."
"Get PROPERTY of a folding SPEC-OR-ALIAS.
Possible properties can be found in `org-fold-core--specs' docstring."
(org-fold-core--check-spec spec-or-alias)
- (if (and (memql 'ignore-indirect org-fold-core--optimise-for-huge-buffers)
+ (if (and (memql 'ignore-indirect org-fold-core--optimize-for-huge-buffers)
(eq property :global))
t
- (if (and (memql 'merge-folds org-fold-core--optimise-for-huge-buffers)
+ (if (and (memql 'merge-folds org-fold-core--optimize-for-huge-buffers)
(eq property :visible))
nil
(cdr (assq property (assq (org-fold-core-get-folding-spec-from-alias
spec-or-alias) org-fold-core--specs))))))
@@ -463,7 +463,7 @@ Possible properties can be found in `org-fold-core--specs'
docstring."
(defsubst org-fold-core-get-folding-property-symbol (spec &optional buffer
global)
"Get folding text property using to store SPEC in current buffer or BUFFER.
If GLOBAL is non-nil, do not make the property unique in the BUFFER."
- (if (memql 'merge-folds org-fold-core--optimise-for-huge-buffers)
+ (if (memql 'merge-folds org-fold-core--optimize-for-huge-buffers)
(intern (format "%s-global" org-fold-core--spec-property-prefix))
(intern (format (concat org-fold-core--spec-property-prefix "%s-%S")
(symbol-name spec)
@@ -472,7 +472,7 @@ If GLOBAL is non-nil, do not make the property unique in
the BUFFER."
;; buffer-local text property actually matters is an
indirect
;; buffer, where the name cannot be same anyway.
(if (or global
- (memql 'ignore-indirect
org-fold-core--optimise-for-huge-buffers))
+ (memql 'ignore-indirect
org-fold-core--optimize-for-huge-buffers))
'global
(sxhash (buffer-name (or buffer (current-buffer)))))))))
@@ -542,7 +542,7 @@ hanging around."
;; This is the core function used to fold text in buffers. We use
;; text properties to hide folded text, however 'invisible property is
-;; not directly used (unless risky `org-fold-core--optimise-for-huge-buffers'
is
+;; not directly used (unless risky `org-fold-core--optimize-for-huge-buffers'
is
;; enabled). Instead, we define unique text property (folding
;; property) for every possible folding spec and add the resulting
;; text properties into `char-property-alias-alist', so that
@@ -655,7 +655,7 @@ This function is mostly intended to be used in
(delete-dups bufs))))))
(when (and (buffer-base-buffer)
(eq org-fold-core-style 'text-properties)
- (not (memql 'ignore-indirect
org-fold-core--optimise-for-huge-buffers)))
+ (not (memql 'ignore-indirect
org-fold-core--optimize-for-huge-buffers)))
(org-fold-core--update-buffer-folds)))
;;; API
@@ -673,7 +673,7 @@ Do not check previous value when FORCE is non-nil."
(unless (org-fold-core-get-folding-spec-property spec :visible)
(add-to-invisibility-spec (cons spec value)))))
(:visible
- (unless (or (memql 'merge-folds org-fold-core--optimise-for-huge-buffers)
+ (unless (or (memql 'merge-folds org-fold-core--optimize-for-huge-buffers)
(and (not force) (equal value
(org-fold-core-get-folding-spec-property spec :visible))))
(if value
(remove-from-invisibility-spec (cons spec
(org-fold-core-get-folding-spec-property spec :ellipsis)))
@@ -1104,7 +1104,7 @@ If SPEC-OR-ALIAS is omitted and FLAG is nil, unfold
everything in the region."
(put-text-property from to
(org-fold-core--property-symbol-get-create spec) spec)
(put-text-property from to 'isearch-open-invisible
#'org-fold-core--isearch-show)
(put-text-property from to 'isearch-open-invisible-temporary
#'org-fold-core--isearch-show-temporary)
- (when (memql 'grab-invisible
org-fold-core--optimise-for-huge-buffers)
+ (when (memql 'grab-invisible
org-fold-core--optimize-for-huge-buffers)
;; If the SPEC has highest priority, assign it directly
;; to 'invisible property as well. This is done to speed
;; up Emacs redisplay on huge (Mbs) folded regions where
@@ -1113,7 +1113,7 @@ If SPEC-OR-ALIAS is omitted and FLAG is nil, unfold
everything in the region."
(when (eq spec (caar org-fold-core--specs))
(put-text-property from to 'invisible spec)))))
(if (not spec)
(mapc (lambda (spec) (org-fold-core-region from to nil spec))
(org-fold-core-folding-spec-list))
- (when (and (memql 'grab-invisible
org-fold-core--optimise-for-huge-buffers)
+ (when (and (memql 'grab-invisible
org-fold-core--optimize-for-huge-buffers)
(eq org-fold-core-style 'text-properties))
(when (eq spec (caar org-fold-core--specs))
(let ((pos from))
@@ -1400,7 +1400,7 @@ property, unfold the region if the :fragile function
returns non-nil."
;; If no insertions or deletions in buffer, skip all the checks.
(unless (or org-fold-core--ignore-modifications
(eq org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick))
- (memql 'ignore-modification-checks
org-fold-core--optimise-for-huge-buffers))
+ (memql 'ignore-modification-checks
org-fold-core--optimize-for-huge-buffers))
;; Store the new buffer modification state.
(setq org-fold-core--last-buffer-chars-modified-tick
(buffer-chars-modified-tick))
(save-match-data
@@ -1460,7 +1460,7 @@ property, unfold the region if the :fragile function
returns non-nil."
;; multiple times in indirect buffers that have exactly same
;; text anyway.
(unless (or org-fold-core--ignore-fragility-checks
- (memql 'ignore-fragility-checks
org-fold-core--optimise-for-huge-buffers))
+ (memql 'ignore-fragility-checks
org-fold-core--optimize-for-huge-buffers))
(dolist (func org-fold-core-extend-changed-region-functions)
(let ((new-region (funcall func from to)))
(setq from (car new-region))
@@ -1593,7 +1593,7 @@ The arguments and return value are as specified for
`filter-buffer-substring'."
(let* ((prop (car plist))
(prop-name (symbol-name prop)))
;; Reveal hard-hidden text. See
- ;; `org-fold-core--optimise-for-huge-buffers'.
+ ;; `org-fold-core--optimize-for-huge-buffers'.
(when (and (eq prop 'invisible)
(member (cadr plist)
(org-fold-core-folding-spec-list)))
(remove-text-properties start fin '(invisible t)
return-string))
@@ -1608,10 +1608,10 @@ The arguments and return value are as specified for
`filter-buffer-substring'."
(remove-text-properties 0 (length return-string) props-list
return-string))
return-string))
-(defun org-fold-core-update-optimisation (beg end)
+(defun org-fold-core-update-optimization (beg end)
"Update huge buffer optimization between BEG and END.
-See `org-fold-core--optimise-for-huge-buffers'."
- (when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers)
+See `org-fold-core--optimize-for-huge-buffers'."
+ (when (and (memql 'grab-invisible org-fold-core--optimize-for-huge-buffers)
(eq org-fold-core-style 'text-properties))
(let ((pos beg))
(while (< pos end)
@@ -1620,11 +1620,14 @@ See `org-fold-core--optimise-for-huge-buffers'."
(put-text-property pos (org-fold-core-next-folding-state-change
(caar org-fold-core--specs) pos end)
'invisible (caar org-fold-core--specs)))
(setq pos (org-fold-core-next-folding-state-change (caar
org-fold-core--specs) pos end))))))
+(define-obsolete-function-alias
+ 'org-fold-core-update-optimisation
+ #'org-fold-core-update-optimization "9.8")
(defun org-fold-core-remove-optimisation (beg end)
"Remove huge buffer optimization between BEG and END.
-See `org-fold-core--optimise-for-huge-buffers'."
- (when (and (memql 'grab-invisible org-fold-core--optimise-for-huge-buffers)
+See `org-fold-core--optimize-for-huge-buffers'."
+ (when (and (memql 'grab-invisible org-fold-core--optimize-for-huge-buffers)
(eq org-fold-core-style 'text-properties))
(let ((pos beg))
(while (< pos end)
diff --git a/lisp/org-plot.el b/lisp/org-plot.el
index f91b7a06c0..6fc66fda50 100644
--- a/lisp/org-plot.el
+++ b/lisp/org-plot.el
@@ -219,16 +219,16 @@ of the NUMS."
If HARD-MIN and HARD-MAX can be used to fix the ends of the axis."
(let* ((row-data
(mapcar (lambda (row) (org--plot/values-stats
- (mapcar #'string-to-number (cdr row))
- hard-min
- hard-max)) table))
- (row-normalised-ranges (mapcar (lambda (r-data)
+ (mapcar #'string-to-number (cdr row))
+ hard-min
+ hard-max)) table))
+ (row-normalized-ranges (mapcar (lambda (r-data)
(let ((val (round (*
(plist-get r-data
:range-factor)
(plist-get r-data
:nice-range)))))
(if (= (% val 10) 0) (/ val 10)
val)))
row-data))
- (range-prime-decomposition (mapcar #'org--plot/prime-factors
row-normalised-ranges))
+ (range-prime-decomposition (mapcar #'org--plot/prime-factors
row-normalized-ranges))
(weighted-factors (sort (apply #'org--plot/merge-alists #'+ 0
(mapcar (lambda (factors)
(org--plot/item-frequencies factors t))
range-prime-decomposition))
@@ -282,9 +282,9 @@ argument for the FUNCTION."
(defun org--plot/item-frequencies (values &optional normalize)
"Return an alist indicating the frequency of values in VALUES list.
When NORMALIZE is non-nil, the count is divided by the number of values."
- (let ((normaliser (if normalize (float (length values)) 1)))
+ (let ((normalizer (if normalize (float (length values)) 1)))
(cl-loop for (n . m) in (seq-group-by #'identity values)
- collect (cons n (/ (length m) normaliser)))))
+ collect (cons n (/ (length m) normalizer)))))
(defun org--plot/prime-factors (value)
"Return the prime decomposition of VALUE, e.g. for 12, (3 2 2)."
diff --git a/lisp/org.el b/lisp/org.el
index eb417a201b..99d28b5c6e 100644
--- a/lisp/org.el
+++ b/lisp/org.el
@@ -6060,7 +6060,7 @@ needs to be inserted at a specific position in the
font-lock sequence.")
(list org-radio-target-regexp '(0 'org-target prepend))
(list org-target-regexp '(0 'org-target prepend))
;; Macro
- '(org-fontify-macros) ; `org-fontify-macro' pepends faces
+ '(org-fontify-macros) ; `org-fontify-macro' prepends faces
;; TODO keyword
(list (format org-heading-keyword-regexp-format
org-todo-regexp)
@@ -6322,7 +6322,7 @@ If TAG is a number, get the corresponding match group."
invisible t intangible t
org-emphasis t
syntax-table t))
- (org-fold-core-update-optimisation beg end)
+ (org-fold-core-update-optimization beg end)
(org-remove-font-lock-display-properties beg end)))
(defconst org-script-display '(((raise -0.3) (height 0.7))
@@ -6728,7 +6728,7 @@ Return nil before first heading."
(org-back-to-heading t)
(let ((case-fold-search nil))
(looking-at org-complex-heading-regexp)
- ;; When using `org-fold-core--optimise-for-huge-buffers',
+ ;; When using `org-fold-core--optimize-for-huge-buffers',
;; returned text will be invisible. Clear it up.
(save-match-data
(org-fold-core-remove-optimisation (match-beginning 0) (match-end
0)))
@@ -6744,7 +6744,7 @@ Return nil before first heading."
(h h)))
(tags (and (not no-tags) (match-string 5))))
;; Restore cleared optimization.
- (org-fold-core-update-optimisation (match-beginning 0) (match-end 0))
+ (org-fold-core-update-optimization (match-beginning 0) (match-end 0))
(mapconcat #'identity
(delq nil (list todo priority headline tags))
" "))))))
@@ -6769,7 +6769,7 @@ This is a list with the following elements:
(and (match-end 3) (aref (match-string 3) 2))
(match-string-no-properties 4)
(match-string-no-properties 5))
- (org-fold-core-update-optimisation (match-beginning 0) (match-end
0))))))
+ (org-fold-core-update-optimization (match-beginning 0) (match-end
0))))))
(defun org-get-entry ()
"Get the entry text, after heading, entire subtree."
@@ -10888,7 +10888,7 @@ narrowing."
;; No drawer found. Create one, if permitted.
(when create
;; `org-end-of-meta-data' ended up at next heading
- ;; * Heading to insert darawer<maybe folded>
+ ;; * Heading to insert drawer<maybe folded>
;; * Another heading
;;
;; Unless current heading is the last heading in buffer
diff --git a/lisp/ox.el b/lisp/ox.el
index 6f095323cd..eb26913803 100644
--- a/lisp/ox.el
+++ b/lisp/ox.el
@@ -6491,7 +6491,7 @@ them."
("it" :default "Riferimenti")
("nl" :default "Bronverwijzingen")
("nn" :default "Kjelder")
- ("pl" :default "Odwołania") ; could be "Referencje" but I think its too
englishy
+ ("pl" :default "Odwołania") ; could be "Referencje" but I think it's too
Englishy
("pt_BR" :html "Referências" :default "Referências" :ascii
"Referencias")
("ro" :default "Bibliografie")
("sl" :default "Reference")