summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
Diffstat (limited to 'lisp')
-rw-r--r--lisp/ChangeLog.1610
-rw-r--r--lisp/ChangeLog.172
-rw-r--r--lisp/emacs-lisp/chart.el2
-rw-r--r--lisp/emacs-lisp/shortdoc.el8
-rw-r--r--lisp/emacs-lisp/subr-x.el2
-rw-r--r--lisp/eshell/esh-var.el2
-rw-r--r--lisp/gnus/ChangeLog.22
-rw-r--r--lisp/gnus/ChangeLog.32
-rw-r--r--lisp/gnus/message.el2
-rw-r--r--lisp/mh-e/ChangeLog.12
-rw-r--r--lisp/obsolete/rlogin.el2
-rw-r--r--lisp/org/org-capture.el2
-rw-r--r--lisp/org/org-element.el2
-rw-r--r--lisp/progmodes/csharp-mode.el53
-rw-r--r--lisp/progmodes/python.el47
-rw-r--r--lisp/subr.el2
-rw-r--r--lisp/textmodes/bibtex.el2
-rw-r--r--lisp/treesit.el98
-rw-r--r--lisp/vc/pcvs-parse.el2
19 files changed, 150 insertions, 94 deletions
diff --git a/lisp/ChangeLog.16 b/lisp/ChangeLog.16
index ef230bf9edb..d2480c6fa36 100644
--- a/lisp/ChangeLog.16
+++ b/lisp/ChangeLog.16
@@ -10968,8 +10968,8 @@
* comint.el (comint-history-isearch-end):
Use `isearch-search-fun-default'.
(comint-history-isearch-search): Use `isearch-search-fun-default'
- and remove spacial case for `isearch-word'.
- (comint-history-isearch-wrap): Remove spacial case for
+ and remove special case for `isearch-word'.
+ (comint-history-isearch-wrap): Remove special case for
`isearch-word'.
* hexl.el (hexl-isearch-search-function):
@@ -10982,13 +10982,13 @@
Use `isearch-search-fun-default'.
* simple.el (minibuffer-history-isearch-search):
- Use `isearch-search-fun-default' and remove spacial case for
+ Use `isearch-search-fun-default' and remove special case for
`isearch-word'.
- (minibuffer-history-isearch-wrap): Remove spacial case for
+ (minibuffer-history-isearch-wrap): Remove special case for
`isearch-word'.
* textmodes/reftex-global.el (reftex-isearch-wrap-function):
- Remove spacial case for `isearch-word'.
+ Remove special case for `isearch-word'.
(reftex-isearch-isearch-search): Use `isearch-search-fun-default'.
2012-05-28 Agustín Martín Domingo <agustin.martin@hispalinux.es>
diff --git a/lisp/ChangeLog.17 b/lisp/ChangeLog.17
index 57620513e3b..021ddd0b2bd 100644
--- a/lisp/ChangeLog.17
+++ b/lisp/ChangeLog.17
@@ -15465,7 +15465,7 @@
2013-12-12 Fabián Ezequiel Gallina <fgallina@gnu.org>
* progmodes/python.el (python-indent-context)
- (python-indent-calculate-indentation): Fix auto-identation
+ (python-indent-calculate-indentation): Fix auto-indentation
behavior for comment blocks. (Bug#15916)
2013-12-12 Nathan Trapuzzano <nbtrap@nbtrap.com> (tiny change)
diff --git a/lisp/emacs-lisp/chart.el b/lisp/emacs-lisp/chart.el
index 16c2c347409..b154a131a4f 100644
--- a/lisp/emacs-lisp/chart.el
+++ b/lisp/emacs-lisp/chart.el
@@ -517,7 +517,7 @@ cons cells of the form (NAME . NUM). See `sort' for more details."
(if (eobp) (newline num))
(if (< x 0) (setq x 0))
(if (< y 0) (setq y 0))
- ;; Now, a quicky column moveto/forceto method.
+ ;; Now, a quickie column moveto/forceto method.
(or (= (move-to-column x) x)
(let ((p (point)))
(indent-to x)
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el
index 90f81d740f2..86baca54e96 100644
--- a/lisp/emacs-lisp/shortdoc.el
+++ b/lisp/emacs-lisp/shortdoc.el
@@ -421,8 +421,8 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
(file-readable-p
:no-eval (file-readable-p "/tmp/foo")
:eg-result t)
- (file-writeable-p
- :no-eval (file-writeable-p "/tmp/foo")
+ (file-writable-p
+ :no-eval (file-writable-p "/tmp/foo")
:eg-result t)
(file-accessible-directory-p
:no-eval (file-accessible-directory-p "/tmp")
@@ -652,8 +652,8 @@ A FUNC form can have any number of `:no-eval' (or `:no-value'),
:eval (mapcan #'list '(1 2 3)))
(mapc
:eval (mapc #'insert '("1" "2" "3")))
- (reduce
- :eval (reduce #'+ '(1 2 3)))
+ (seq-reduce
+ :eval (seq-reduce #'+ '(1 2 3) 0))
(mapconcat
:eval (mapconcat #'identity '("foo" "bar") "|"))
"Predicates"
diff --git a/lisp/emacs-lisp/subr-x.el b/lisp/emacs-lisp/subr-x.el
index 415f8db52ca..c7ce02e5013 100644
--- a/lisp/emacs-lisp/subr-x.el
+++ b/lisp/emacs-lisp/subr-x.el
@@ -334,7 +334,7 @@ as the new values of the bound variables in the recursive invocation."
(defun string-glyph-split (string)
"Split STRING into a list of strings representing separate glyphs.
This takes into account combining characters and grapheme clusters:
-if compositions are enbaled, each sequence of characters composed
+if compositions are enabled, each sequence of characters composed
on display into a single grapheme cluster is treated as a single
indivisible unit."
(let ((result nil)
diff --git a/lisp/eshell/esh-var.el b/lisp/eshell/esh-var.el
index 61e9af01a4d..807a8ecc446 100644
--- a/lisp/eshell/esh-var.el
+++ b/lisp/eshell/esh-var.el
@@ -216,7 +216,7 @@ nil. If SIMPLE-FUNCTION is non-nil, call the function with no
arguments and then pass its return value to `eshell-apply-indices'.
When VALUE is a function, it's read-only by default. To make it
-writeable, use the (GET . SET) form described above. If SET is a
+writable, use the (GET . SET) form described above. If SET is a
function, it takes two arguments: a list of indices (currently
always nil, but reserved for future enhancement), and the new
value to set.
diff --git a/lisp/gnus/ChangeLog.2 b/lisp/gnus/ChangeLog.2
index 4ac69b575f5..292e8fbe5b7 100644
--- a/lisp/gnus/ChangeLog.2
+++ b/lisp/gnus/ChangeLog.2
@@ -8859,7 +8859,7 @@
signencrypt.
* mml-sec.el (mml-secure-message-encrypt-pgpmime): Ditto.
* mml.el (mml-generate-mime-1): Change logic so a part which is
- both signed & encryped is processed in one operation (rather than
+ both signed & encrypted is processed in one operation (rather than
two separate ops: sign, then encrypt).
* mml2015.el (mml2015-gpg-extract-signature-details): Give some
indication if a message is signed by an expired key.
diff --git a/lisp/gnus/ChangeLog.3 b/lisp/gnus/ChangeLog.3
index bf64780799d..72423073338 100644
--- a/lisp/gnus/ChangeLog.3
+++ b/lisp/gnus/ChangeLog.3
@@ -17348,7 +17348,7 @@
* rfc2047.el (rfc2047-quote-special-characters-in-quoted-strings):
New function.
(rfc2047-encode-message-header, rfc2047-encode-region): Use it.
- (rfc2047-strip-backslashes-in-quoted-strings): New fnction.
+ (rfc2047-strip-backslashes-in-quoted-strings): New function.
(rfc2047-decode-region): Use it; add optional argument `address-mime'.
(rfc2047-decode-string): Ditto.
(rfc2047-decode-address-region): New function.
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index 6c10a4ae976..272e6bf4b7d 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2822,7 +2822,7 @@ systematically send encrypted emails when possible."
The value must be a list of three elements, all strings:
- Key ID, in hexadecimal form;
-- Key URL or ASCII armoured key; and
+- Key URL or ASCII armored key; and
- Protection preference, one of: \"unprotected\", \"sign\",
\"encrypt\" or \"signencrypt\".
diff --git a/lisp/mh-e/ChangeLog.1 b/lisp/mh-e/ChangeLog.1
index d6893fb9ec4..f3053f3a257 100644
--- a/lisp/mh-e/ChangeLog.1
+++ b/lisp/mh-e/ChangeLog.1
@@ -761,7 +761,7 @@
below, docstring was usually completely rewritten. Use "on"
instead of "t" in docstring to match what is seen in customization
buffer. Use headline capitalization. Standardize on "Auto-detect"
- text when option has that capibility.
+ text when option has that capability.
(mh): Since we work on more than one type of Emacs, use Emacs
instead of GNU Emacs. Prefer GNU mailutils over GNU Mailutils.
(mh-variant): s/Autodetect at startup/Auto-detect/.
diff --git a/lisp/obsolete/rlogin.el b/lisp/obsolete/rlogin.el
index 6a06300ae35..935209650ef 100644
--- a/lisp/obsolete/rlogin.el
+++ b/lisp/obsolete/rlogin.el
@@ -95,7 +95,7 @@ This variable becomes local to a buffer when set in any fashion for it.
It is better to use the function of the same name to change the behavior of
directory tracking in an rlogin session once it has begun, rather than
simply setting this variable, since the function does the necessary
-re-synching of directories."
+re-syncing of directories."
:type '(choice (const :tag "off" nil)
(const :tag "ftp" t)
(other :tag "local" local))
diff --git a/lisp/org/org-capture.el b/lisp/org/org-capture.el
index b26afeb036a..4e65706315c 100644
--- a/lisp/org/org-capture.el
+++ b/lisp/org/org-capture.el
@@ -1700,7 +1700,7 @@ Expansion occurs in a temporary Org mode buffer."
(condition-case error
(insert-file-contents filename)
(error
- (insert (format "%%![couldn not insert %s: %s]"
+ (insert (format "%%![could not insert %s: %s]"
filename
error))))))))
;; Mark %() embedded elisp for later evaluation.
diff --git a/lisp/org/org-element.el b/lisp/org/org-element.el
index ace1cc1a984..aa618a088ae 100644
--- a/lisp/org/org-element.el
+++ b/lisp/org/org-element.el
@@ -5299,7 +5299,7 @@ indentation removed from its contents."
;; mechanism is robust enough to preserve total order among elements
;; even when the tree is only partially synchronized.
;;
-;; The cache code debuggin is fairly complex because cache request
+;; The cache code debugging is fairly complex because cache request
;; state is often hard to reproduce. An extensive diagnostics
;; functionality is built into the cache code to assist hunting bugs.
;; See `org-element--cache-self-verify', `org-element--cache-self-verify-frequency',
diff --git a/lisp/progmodes/csharp-mode.el b/lisp/progmodes/csharp-mode.el
index 33a5f7046f1..4bd5d15fb1b 100644
--- a/lisp/progmodes/csharp-mode.el
+++ b/lisp/progmodes/csharp-mode.el
@@ -693,24 +693,46 @@ compilation and evaluation time conflicts."
(defvar csharp-ts-mode--font-lock-settings
(treesit-font-lock-rules
:language 'c-sharp
+ :feature 'expression
+ '((conditional_expression (identifier) @font-lock-variable-name-face)
+ (postfix_unary_expression (identifier)* @font-lock-variable-name-face)
+ (assignment_expression (identifier) @font-lock-variable-name-face))
+
+ :language 'c-sharp
+ :feature 'bracket
+ '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
+
+ :language 'c-sharp
+ :feature 'delimiter
+ '((["," ":" ";"]) @font-lock-delimiter-face)
+
+ :language 'c-sharp
+ :feature 'error
+ '((ERROR) @font-lock-warning-face)
+
+ :language 'c-sharp
:override t
:feature 'comment
- '((comment) @font-lock-comment-face)
+ '((comment) @font-lock-comment-face)
+
:language 'c-sharp
:override t
:feature 'keyword
`([,@csharp-ts-mode--keywords] @font-lock-keyword-face
(modifier) @font-lock-keyword-face
(this_expression) @font-lock-keyword-face)
+
:language 'c-sharp
:override t
- :feature 'attribute
+ :feature 'property
`((attribute (identifier) @font-lock-property-face (attribute_argument_list))
(attribute (identifier) @font-lock-property-face))
+
:language 'c-sharp
:override t
:feature 'escape-sequence
'((escape_sequence) @font-lock-escape-face)
+
:language 'c-sharp
:override t
:feature 'literal
@@ -718,6 +740,7 @@ compilation and evaluation time conflicts."
(real_literal) @font-lock-number-face
(null_literal) @font-lock-constant-face
(boolean_literal) @font-lock-constant-face)
+
:language 'c-sharp
:override t
:feature 'string
@@ -730,6 +753,7 @@ compilation and evaluation time conflicts."
"$\""
"@$\""
"$@\""] @font-lock-string-face)
+
:language 'c-sharp
:override t
:feature 'type
@@ -750,14 +774,14 @@ compilation and evaluation time conflicts."
target: (identifier) @font-lock-type-face)
(type_of_expression (identifier) @font-lock-type-face)
(object_creation_expression (identifier) @font-lock-type-face))
+
:language 'c-sharp
:feature 'definition
:override t
'((qualified_name (identifier) @font-lock-type-face)
(using_directive (identifier) @font-lock-type-face)
(using_directive (name_equals
- (identifier) @font-lock-type-face
- ["="] @default-face))
+ (identifier) @font-lock-type-face))
(enum_declaration (identifier) @font-lock-type-face)
(enum_member_declaration (identifier) @font-lock-variable-name-face)
@@ -820,24 +844,11 @@ compilation and evaluation time conflicts."
(binary_expression (identifier) @font-lock-variable-name-face)
(argument (identifier) @font-lock-variable-name-face))
- :language 'c-sharp
- :feature 'expression
- '((conditional_expression (identifier) @font-lock-variable-name-face)
- (postfix_unary_expression (identifier)* @font-lock-variable-name-face)
- (assignment_expression (identifier) @font-lock-variable-name-face))
- :language 'c-sharp
- :feature 'bracket
- '((["(" ")" "[" "]" "{" "}"]) @font-lock-bracket-face)
-
- :language 'c-sharp
- :feature 'delimiter
- '((["," ":" ";"]) @font-lock-delimiter-face)
:language 'c-sharp
:feature 'escape-sequence
:override t
- '((escape_sequence) @font-lock-escape-face
- (ERROR) @font-lock-warning-face)))
+ '((escape_sequence) @font-lock-escape-face)))
;;;###autoload
(add-to-list 'auto-mode-alist '("\\.cs\\'" . csharp-mode))
@@ -908,9 +919,9 @@ Key bindings:
(setq-local treesit-font-lock-settings csharp-ts-mode--font-lock-settings)
(setq-local treesit-font-lock-feature-list
'(( comment definition)
- ( keyword string escape-sequence type)
- ( attribute constant expression literal)
- ( bracket delimiter)))
+ ( keyword string type)
+ ( constant escape-sequence expression literal property)
+ ( bracket delimiter error)))
;; Imenu.
(setq-local treesit-simple-imenu-settings
diff --git a/lisp/progmodes/python.el b/lisp/progmodes/python.el
index 07f86d31551..694b897cc00 100644
--- a/lisp/progmodes/python.el
+++ b/lisp/progmodes/python.el
@@ -1192,7 +1192,7 @@ fontified."
"Check whether NODE is a variable.
NODE's type should be \"identifier\"."
;; An identifier can be a function/class name, a property, or a
- ;; variables. This funtion filters out function/class names and
+ ;; variables. This function filters out function/class names and
;; properties.
(pcase (treesit-node-type (treesit-node-parent node))
((or "function_definition" "class_definition") nil)
@@ -3736,19 +3736,35 @@ the python shell:
appending extra empty lines so tracebacks are correct.
3. When the region sent is a substring of the current buffer, a
coding cookie is added.
- 4. Wraps indented regions under an \"if True:\" block so the
- interpreter evaluates them correctly."
- (let* ((start (save-excursion
- ;; If we're at the start of the expression, and
- ;; there's just blank space ahead of it, then expand
- ;; the region to include the start of the line.
- ;; This makes things work better with the rest of
- ;; the data we're sending over.
+ 4. When the region consists of a single statement, leading
+ whitespaces will be removed. Otherwise, wraps indented
+ regions under an \"if True:\" block so the interpreter
+ evaluates them correctly."
+ (let* ((single-p (save-restriction
+ (narrow-to-region start end)
+ (= (progn
+ (goto-char start)
+ (python-nav-beginning-of-statement))
+ (progn
+ (goto-char end)
+ (python-nav-beginning-of-statement)))))
+ (start (save-excursion
+ ;; If we're at the start of the expression, and if
+ ;; the region consists of a single statement, then
+ ;; remove leading whitespaces, else if there's just
+ ;; blank space ahead of it, then expand the region
+ ;; to include the start of the line. This makes
+ ;; things work better with the rest of the data
+ ;; we're sending over.
(goto-char start)
- (if (string-blank-p
- (buffer-substring (line-beginning-position) start))
- (line-beginning-position)
- start)))
+ (if single-p
+ (progn
+ (skip-chars-forward "[:space:]" end)
+ (point))
+ (if (string-blank-p
+ (buffer-substring (line-beginning-position) start))
+ (line-beginning-position)
+ start))))
(substring (buffer-substring-no-properties start end))
(starts-at-point-min-p (save-restriction
(widen)
@@ -3772,7 +3788,7 @@ the python shell:
(python-mode)
(when fillstr
(insert fillstr))
- (when (not toplevel-p)
+ (when (and (not single-p) (not toplevel-p))
(forward-line -1)
(insert "if True:\n")
(delete-region (point) (line-end-position)))
@@ -3816,7 +3832,8 @@ code inside blocks delimited by \"if __name__== \\='__main__\\=':\".
When called interactively SEND-MAIN defaults to nil, unless it's
called with prefix argument. When optional argument MSG is
non-nil, forces display of a user-friendly message if there's no
-process running; defaults to t when called interactively."
+process running; defaults to t when called interactively. The
+substring to be sent is retrieved using `python-shell-buffer-substring'."
(interactive
(list (region-beginning) (region-end) current-prefix-arg t))
(let* ((string (python-shell-buffer-substring start end (not send-main)
diff --git a/lisp/subr.el b/lisp/subr.el
index 69e6198e1bd..17116a9b3cd 100644
--- a/lisp/subr.el
+++ b/lisp/subr.el
@@ -7063,7 +7063,7 @@ CONDITION is either:
* `major-mode': the buffer matches if the buffer's major mode
is eq to the cons-cell's cdr. Prefer using `derived-mode'
instead when both can work.
- * `not': the cdr is interpreted as a negation of a condition.
+ * `not': the cadr is interpreted as a negation of a condition.
* `and': the cdr is a list of recursive conditions, that all have
to be met.
* `or': the cdr is a list of recursive condition, of which at
diff --git a/lisp/textmodes/bibtex.el b/lisp/textmodes/bibtex.el
index 23909742889..9dec998f7ee 100644
--- a/lisp/textmodes/bibtex.el
+++ b/lisp/textmodes/bibtex.el
@@ -4093,7 +4093,7 @@ move point to the beginning of buffer. Return the new location of point."
(interactive)
(beginning-of-line)
;; `bibtex-any-valid-entry-type' would fail if users "disable"
- ;; an entry by chosing an invalid entry type.
+ ;; an entry by choosing an invalid entry type.
(or (looking-at bibtex-any-entry-maybe-empty-head)
(re-search-backward bibtex-any-entry-maybe-empty-head nil 'move))
(point))
diff --git a/lisp/treesit.el b/lisp/treesit.el
index 8f6354fde20..545659e9967 100644
--- a/lisp/treesit.el
+++ b/lisp/treesit.el
@@ -1177,7 +1177,6 @@ See `treesit-simple-indent-presets'.")
fns)))))
(cons 'not (lambda (fn)
(lambda (node parent bol &rest _)
- (debug)
(not (funcall fn node parent bol)))))
(cons 'list (lambda (&rest fns)
(lambda (node parent bol &rest _)
@@ -1649,7 +1648,7 @@ friends."
;; TODO: I'm not entirely sure how would this go, so I only documented
;; the "defun" functions and didn't document any "thing" functions.
;; We should also document `treesit-block-type-regexp' and support it
-;; in major modes if we can meaningfully intergrate hideshow: I tried
+;; in major modes if we can meaningfully integrate hideshow: I tried
;; and failed, we need SomeOne that understands hideshow to look at
;; it. (BTW, hideshow should use its own
;; `treesit-hideshow-block-type-regexp'.)
@@ -2653,23 +2652,47 @@ window."
;;; Install & build language grammar
(defvar treesit-language-source-alist nil
- "Configures how to download tree-sitter language grammars.
-This should be an alist of
+ "Configuration for downloading and installing tree-sitter language grammars.
- (LANG . (URL SOURCE-DIR GRAMMAR-DIR CC C++))
+The value should be an alist where each element has the form
+
+ (LANG . (URL REVISION SOURCE-DIR CC C++))
Only LANG and URL are mandatory. LANG is the language symbol.
-URL is the repository's url.
+URL is the Git repository URL for the grammar.
-SOURCE-DIR is the relative directory in the repository in which
-the grammar.c file resides, default to \"src\".
+REVISION is the Git tag or branch of the desired version,
+defaulting to the latest default branch.
-GRAMMAR-DIR is the relative grammar directory in the repository
-in which the grammar.js file resides, default to \"\".
+SOURCE-DIR is the relative subdirectory in the repository in which
+the grammar's parser.c file resides, defaulting to \"src\".
-CC and C++ are C and C++ compilers, default to \"cc\" and
+CC and C++ are C and C++ compilers, defaulting to \"cc\" and
\"c++\", respectively.")
+(defun treesit--install-language-grammar-build-recipe (lang)
+ "Interactively build a recipe for LANG and return it.
+See `treesit-language-source-alist' for details."
+ (when (y-or-n-p (format "There is no recipe for %s, do you want to build it interactively?" lang))
+ (cl-labels ((empty-string-to-nil (string)
+ (if (equal string "") nil string)))
+ (list
+ lang
+ (read-string
+ "Enter the URL of the Git repository of the language grammar: ")
+ (empty-string-to-nil
+ (read-string
+ "Enter the tag or branch (default: default branch): "))
+ (empty-string-to-nil
+ (read-string
+ "Enter the subdirectory in which the parser.c file resides (default: \"src\"): "))
+ (empty-string-to-nil
+ (read-string
+ "Enter the C compiler to use (default: auto-detect): "))
+ (empty-string-to-nil
+ (read-string
+ "Enter the C++ compiler to use (default: auto-detect): "))))))
+
(defun treesit-install-language-grammar (lang)
"Build and install the tree-sitter language grammar library for LANG.
@@ -2682,17 +2705,21 @@ executable programs, such as the C/C++ compiler and linker."
(interactive (list (intern
(completing-read
"Language: "
- (mapcar #'car treesit-language-source-alist)
- nil t))))
- (condition-case err
- (apply #'treesit--install-language-grammar-1
- ;; The nil is OUT-DIR.
- (cons nil (assoc lang treesit-language-source-alist)))
- (error
- (display-warning
- 'treesit
- (format "Error encountered when installing language grammar: %s"
- err))))
+ (mapcar #'car treesit-language-source-alist)))))
+ (when-let ((recipe
+ (or (assoc lang treesit-language-source-alist)
+ (treesit--install-language-grammar-build-recipe
+ lang))))
+ (condition-case err
+ (apply #'treesit--install-language-grammar-1
+ ;; The nil is OUT-DIR.
+ (cons nil recipe))
+ (error
+ (display-warning
+ 'treesit
+ (format "Error encountered when installing language grammar: %s"
+ err)))))
+
;; Check that the installed language grammar is loadable.
(pcase-let ((`(,available . ,err)
(treesit-language-available-p lang t)))
@@ -2720,22 +2747,21 @@ content as signal data, and erase buffer afterwards."
(erase-buffer)))
(defun treesit--install-language-grammar-1
- (out-dir lang url &optional source-dir grammar-dir cc c++)
+ (out-dir lang url &optional revision source-dir cc c++)
"Install and compile a tree-sitter language grammar library.
OUT-DIR is the directory to put the compiled library file. If it
is nil, the \"tree-sitter\" directory under user's Emacs
-configuration directory is used (and automatically created if not
-exist).
+configuration directory is used (and automatically created if it
+does not exist).
-For LANG, URL, SOURCE-DIR, GRAMMAR-DIR, CC, C++, see
+For LANG, URL, REVISION, SOURCE-DIR, GRAMMAR-DIR, CC, C++, see
`treesit-language-source-alist'. If anything goes wrong, this
function signals an error."
(let* ((lang (symbol-name lang))
(default-directory (make-temp-file "treesit-workdir" t))
(workdir (expand-file-name "repo"))
(source-dir (expand-file-name (or source-dir "src") workdir))
- (grammar-dir (expand-file-name (or grammar-dir "") workdir))
(cc (or cc (seq-find #'executable-find '("cc" "gcc" "c99"))
;; If no C compiler found, just use cc and let
;; `call-process' signal the error.
@@ -2750,14 +2776,16 @@ function signals an error."
(unwind-protect
(with-temp-buffer
(message "Cloning repository")
- ;; git clone xxx --depth 1 --quiet workdir
- (treesit--call-process-signal
- "git" nil t nil "clone" url "--depth" "1" "--quiet"
- workdir)
- ;; cp "${grammardir}"/grammar.js "${sourcedir}"
- (copy-file (expand-file-name "grammar.js" grammar-dir)
- (expand-file-name "grammar.js" source-dir)
- t t)
+ ;; git clone xxx --depth 1 --quiet [-b yyy] workdir
+ (if revision
+ (treesit--call-process-signal
+ "git" nil t nil "clone" url "--depth" "1" "--quiet"
+ "-b" revision workdir)
+ (treesit--call-process-signal
+ "git" nil t nil "clone" url "--depth" "1" "--quiet"
+ workdir))
+ ;; We need to go into the source directory because some
+ ;; header files use relative path (#include "../xxx").
;; cd "${sourcedir}"
(setq default-directory source-dir)
(message "Compiling library")
diff --git a/lisp/vc/pcvs-parse.el b/lisp/vc/pcvs-parse.el
index 77c5469a175..5b4c3019cac 100644
--- a/lisp/vc/pcvs-parse.el
+++ b/lisp/vc/pcvs-parse.el
@@ -435,7 +435,7 @@ The remaining KEYS are passed directly to `cvs-create-fileinfo'."
;; Conflict
(and
(cvs-match (concat "C \\(.*" qfile "\\)$") (path 1) (type 'CONFLICT))
- ;; C might be followed by a "spurious" U for non-mergable files
+ ;; C might be followed by a "spurious" U for non-mergeable files
(cvs-or (cvs-match (concat "U \\(.*" qfile "\\)$")) t))
;; Successful merge
(cvs-match (concat "M \\(.*" qfile "\\)$") (path 1))