diff options
Diffstat (limited to 'lisp')
-rw-r--r-- | lisp/emacs-lisp/shortdoc.el | 2 | ||||
-rw-r--r-- | lisp/eshell/esh-util.el | 4 | ||||
-rw-r--r-- | lisp/loadup.el | 4 | ||||
-rw-r--r-- | lisp/org/oc-basic.el | 32 | ||||
-rw-r--r-- | lisp/org/oc-csl.el | 4 | ||||
-rw-r--r-- | lisp/org/oc.el | 2 | ||||
-rw-r--r-- | lisp/org/org-keys.el | 2 | ||||
-rw-r--r-- | lisp/org/org-macro.el | 2 | ||||
-rw-r--r-- | lisp/org/org-version.el | 2 | ||||
-rw-r--r-- | lisp/org/org.el | 15 | ||||
-rw-r--r-- | lisp/org/ox-beamer.el | 2 | ||||
-rw-r--r-- | lisp/org/ox-icalendar.el | 4 | ||||
-rw-r--r-- | lisp/org/ox-koma-letter.el | 2 | ||||
-rw-r--r-- | lisp/org/ox-man.el | 2 | ||||
-rw-r--r-- | lisp/org/ox-texinfo.el | 2 | ||||
-rw-r--r-- | lisp/org/ox.el | 11 | ||||
-rw-r--r-- | lisp/sqlite-mode.el | 14 | ||||
-rw-r--r-- | lisp/sqlite.el | 11 |
18 files changed, 74 insertions, 43 deletions
diff --git a/lisp/emacs-lisp/shortdoc.el b/lisp/emacs-lisp/shortdoc.el index 5c51e257eb0..b9e000cc05f 100644 --- a/lisp/emacs-lisp/shortdoc.el +++ b/lisp/emacs-lisp/shortdoc.el @@ -1232,7 +1232,7 @@ There can be any number of :example/:result elements." (define-keymap :no-eval (define-keymap "C-c C-c" #'quit-buffer)) (defvar-keymap - :no-eval (defvar-keymap my-keymap "C-c C-c" map #'quit-buffer)) + :no-eval (defvar-keymap my-keymap "C-c C-c" #'quit-buffer)) "Setting keys" (keymap-set :no-eval (keymap-set map "C-c C-c" #'quit-buffer)) diff --git a/lisp/eshell/esh-util.el b/lisp/eshell/esh-util.el index 72de6b13e2e..0eef45e0efb 100644 --- a/lisp/eshell/esh-util.el +++ b/lisp/eshell/esh-util.el @@ -63,11 +63,11 @@ has no effect." Setting this to nil is offered as an aid to debugging only." :type 'boolean) -(defcustom eshell-private-file-modes 384 ; umask 177 +(defcustom eshell-private-file-modes #o600 ; umask 177 "The file-modes value to use for creating \"private\" files." :type 'integer) -(defcustom eshell-private-directory-modes 448 ; umask 077 +(defcustom eshell-private-directory-modes #o700 ; umask 077 "The file-modes value to use for creating \"private\" directories." :type 'integer) diff --git a/lisp/loadup.el b/lisp/loadup.el index 3d941f7b512..b87c0550fc5 100644 --- a/lisp/loadup.el +++ b/lisp/loadup.el @@ -562,7 +562,9 @@ lost after dumping"))) (lexical-binding nil)) (if (member tmp-dump-mode '("pdump" "pbootstrap")) (dump-emacs-portable (expand-file-name output invocation-directory)) - (dump-emacs output "temacs") + (dump-emacs output (if (eq system-type 'ms-dos) + "temacs.exe" + "temacs")) (message "%d pure bytes used" pure-bytes-used)) (setq success t)) (unless success diff --git a/lisp/org/oc-basic.el b/lisp/org/oc-basic.el index 7b09db5f8b4..7c83bdc27c0 100644 --- a/lisp/org/oc-basic.el +++ b/lisp/org/oc-basic.el @@ -68,6 +68,7 @@ (require 'bibtex) (require 'json) +(require 'map) (require 'oc) (require 'seq) @@ -704,11 +705,18 @@ Return chosen style as a string." (defun org-cite-basic--key-completion-table () "Return completion table for cite keys, as a hash table. -In this hash table, keys are a strings with author, date, and title of the -reference. Values are the cite key." - (let ((cache-key (mapcar #'car org-cite-basic--bibliography-cache))) - (if (gethash cache-key org-cite-basic--completion-cache) - org-cite-basic--completion-cache + +In this hash table, keys are a strings with author, date, and +title of the reference. Values are the cite keys. + +Return nil if there are no bibliography files or no entries." + ;; Populate bibliography cache. + (let ((entries (org-cite-basic--parse-bibliography))) + (cond + ((null entries) nil) ;no bibliography files + ((gethash entries org-cite-basic--completion-cache) + org-cite-basic--completion-cache) + (t (clrhash org-cite-basic--completion-cache) (dolist (key (org-cite-basic--all-keys)) (let ((completion @@ -725,14 +733,16 @@ reference. Values are the cite key." org-cite-basic-column-separator (org-cite-basic--get-field 'title key nil t)))) (puthash completion key org-cite-basic--completion-cache))) - (puthash cache-key t org-cite-basic--completion-cache) - org-cite-basic--completion-cache))) + (unless (map-empty-p org-cite-basic--completion-cache) ;no key + (puthash entries t org-cite-basic--completion-cache) + org-cite-basic--completion-cache))))) (defun org-cite-basic--complete-key (&optional multiple) "Prompt for a reference key and return a citation reference string. -When optional argument MULTIPLE is non-nil, prompt for multiple keys, until one -of them is nil. Then return the list of reference strings selected. +When optional argument MULTIPLE is non-nil, prompt for multiple +keys, until one of them is nil. Then return the list of +reference strings selected. Raise an error when no bibliography is set in the buffer." (let* ((table @@ -748,9 +758,9 @@ Raise an error when no bibliography is set in the buffer." (build-prompt (lambda () (if keys - (format "Key (\"\" to exit) %s: " + (format "Key (empty input exits) %s: " (mapconcat #'identity (reverse keys) ";")) - "Key (\"\" to exit): ")))) + "Key (empty input exits): ")))) (let ((key (funcall prompt (funcall build-prompt)))) (while (org-string-nw-p key) (push (gethash key table) keys) diff --git a/lisp/org/oc-csl.el b/lisp/org/oc-csl.el index 7f078d139b1..a92ea8a63e8 100644 --- a/lisp/org/oc-csl.el +++ b/lisp/org/oc-csl.el @@ -605,10 +605,10 @@ property list." (with-temp-buffer (save-excursion (insert output)) (when (search-forward "\\begin{document}" nil t) - ;; Ensure that \citeprocitem is defined for citeproc-el + (goto-char (match-beginning 0)) + ;; Ensure that \citeprocitem is defined for citeproc-el. (insert "\\makeatletter\n\\newcommand{\\citeprocitem}[2]{\\hyper@linkstart{cite}{citeproc_bib_item_#1}#2\\hyper@linkend}\n\\makeatother\n\n") ;; Ensure there is a \usepackage{hanging} somewhere or add one. - (goto-char (match-beginning 0)) (let ((re (rx "\\usepackage" (opt "[" (*? nonl) "]") "{hanging}"))) (unless (re-search-backward re nil t) (insert "\\usepackage[notquote]{hanging}\n")))) diff --git a/lisp/org/oc.el b/lisp/org/oc.el index 427c087c036..a77daa7e122 100644 --- a/lisp/org/oc.el +++ b/lisp/org/oc.el @@ -1540,7 +1540,7 @@ The generated function inserts or edit a citation at point. More specifically, On a citation reference: - - on the prefix or right before th \"@\" character, insert a new reference + - on the prefix or right before the \"@\" character, insert a new reference before the current one, - on the suffix, insert it after the reference, - otherwise, update the cite key, preserving both affixes. diff --git a/lisp/org/org-keys.el b/lisp/org/org-keys.el index a10db7e6667..a3d95768278 100644 --- a/lisp/org/org-keys.el +++ b/lisp/org/org-keys.el @@ -444,7 +444,7 @@ COMMANDS is a list of alternating OLDDEF NEWDEF command names." ;;;; TAB key with modifiers (org-defkey org-mode-map (kbd "TAB") #'org-cycle) -(org-defkey org-mode-map (kbd "C-c C-TAB") #'org-force-cycle-archived) +(org-defkey org-mode-map (kbd "C-c C-<tab>") #'org-force-cycle-archived) ;; Override text-mode binding to expose `complete-symbol' for ;; pcomplete functionality. (org-defkey org-mode-map (kbd "M-TAB") nil) diff --git a/lisp/org/org-macro.el b/lisp/org/org-macro.el index c38a07b69af..c0287a25a55 100644 --- a/lisp/org/org-macro.el +++ b/lisp/org/org-macro.el @@ -368,7 +368,7 @@ Return value as a string." date) (unwind-protect (progn - (vc-call print-log file buf nil nil 1) + (vc-call print-log (list file) buf nil nil 1) (with-current-buffer buf (vc-exec-after (lambda () diff --git a/lisp/org/org-version.el b/lisp/org/org-version.el index de75519ec61..b009b9691fd 100644 --- a/lisp/org/org-version.el +++ b/lisp/org/org-version.el @@ -11,7 +11,7 @@ Inserted by installing Org mode or when a release is made." (defun org-git-version () "The Git version of Org mode. Inserted by installing Org or when a release is made." - (let ((org-git-version "release_9.5.1-15-gdb4805")) + (let ((org-git-version "release_9.5.1-25-g9ca3bc")) org-git-version)) (provide 'org-version) diff --git a/lisp/org/org.el b/lisp/org/org.el index df79d57f2c6..00bbc076881 100644 --- a/lisp/org/org.el +++ b/lisp/org/org.el @@ -11323,13 +11323,14 @@ or a character." (setq new (if nump - (let ((msg (format "Priority %s-%s, SPC to remove: " - (number-to-string org-priority-highest) - (number-to-string org-priority-lowest)))) - (if (< 9 org-priority-lowest) - (string-to-number (read-string msg)) - (message msg) - (string-to-number (char-to-string (read-char-exclusive))))) + (let* ((msg (format "Priority %s-%s, SPC to remove: " + (number-to-string org-priority-highest) + (number-to-string org-priority-lowest))) + (s (if (< 9 org-priority-lowest) + (read-string msg) + (message msg) + (char-to-string (read-char-exclusive))))) + (if (equal s " ") ?\s (string-to-number s))) (progn (message "Priority %c-%c, SPC to remove: " org-priority-highest org-priority-lowest) (save-match-data diff --git a/lisp/org/ox-beamer.el b/lisp/org/ox-beamer.el index ca0f1c71ab3..77de0aa5bfe 100644 --- a/lisp/org/ox-beamer.el +++ b/lisp/org/ox-beamer.el @@ -1059,7 +1059,7 @@ Return PDF file's name." (let ((file (org-export-output-file-name ".tex" subtreep))) (org-export-to-file 'beamer file async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + #'org-latex-compile))) ;;;###autoload (defun org-beamer-select-environment () diff --git a/lisp/org/ox-icalendar.el b/lisp/org/ox-icalendar.el index 081a28317f6..16c3dc9a029 100644 --- a/lisp/org/ox-icalendar.el +++ b/lisp/org/ox-icalendar.el @@ -888,8 +888,8 @@ Return ICS file name." (org-export-to-file 'icalendar outfile async subtreep visible-only body-only '(:ascii-charset utf-8 :ascii-links-to-notes nil) - (lambda (file) - (run-hook-with-args 'org-icalendar-after-save-hook file) nil)))) + '(lambda (file) + (run-hook-with-args 'org-icalendar-after-save-hook file) nil)))) ;;;###autoload (defun org-icalendar-export-agenda-files (&optional async) diff --git a/lisp/org/ox-koma-letter.el b/lisp/org/ox-koma-letter.el index 6a895a6a24d..978e4e41f56 100644 --- a/lisp/org/ox-koma-letter.el +++ b/lisp/org/ox-koma-letter.el @@ -982,7 +982,7 @@ Return PDF file's name." (org-koma-letter-special-contents)) (org-export-to-file 'koma-letter file async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + #'org-latex-compile))) (provide 'ox-koma-letter) diff --git a/lisp/org/ox-man.el b/lisp/org/ox-man.el index 6d3476cdae5..9a1f00f352b 100644 --- a/lisp/org/ox-man.el +++ b/lisp/org/ox-man.el @@ -1117,7 +1117,7 @@ Return PDF file's name." (let ((outfile (org-export-output-file-name ".man" subtreep))) (org-export-to-file 'man outfile async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))))) + #'org-latex-compile))) (defun org-man-compile (file) "Compile a Groff file. diff --git a/lisp/org/ox-texinfo.el b/lisp/org/ox-texinfo.el index 8b949b361aa..46077ece4b8 100644 --- a/lisp/org/ox-texinfo.el +++ b/lisp/org/ox-texinfo.el @@ -1701,7 +1701,7 @@ Return INFO file's name." (org-export-coding-system org-texinfo-coding-system)) (org-export-to-file 'texinfo outfile async subtreep visible-only body-only ext-plist - (lambda (file) (org-texinfo-compile file))))) + #'org-texinfo-compile))) ;;;###autoload (defun org-texinfo-publish-to-texinfo (plist filename pub-dir) diff --git a/lisp/org/ox.el b/lisp/org/ox.el index b27ec56c08c..80202b08500 100644 --- a/lisp/org/ox.el +++ b/lisp/org/ox.el @@ -6373,7 +6373,11 @@ use it to set a major mode there, e.g, (&optional async subtreep visible-only body-only ext-plist) (interactive) (org-export-to-buffer \\='latex \"*Org LATEX Export*\" - async subtreep visible-only body-only ext-plist (lambda () (LaTeX-mode)))) + async subtreep visible-only body-only ext-plist + #'LaTeX-mode)) + +When expressed as an anonymous function, using `lambda', +POST-PROCESS needs to be quoted. This function returns BUFFER." (declare (indent 2)) @@ -6436,7 +6440,10 @@ to send the output file through additional processing, e.g, (let ((outfile (org-export-output-file-name \".tex\" subtreep))) (org-export-to-file \\='latex outfile async subtreep visible-only body-only ext-plist - (lambda (file) (org-latex-compile file))) + #'org-latex-compile))) + +When expressed as an anonymous function, using `lambda', +POST-PROCESS needs to be quoted. The function returns either a file name returned by POST-PROCESS, or FILE." diff --git a/lisp/sqlite-mode.el b/lisp/sqlite-mode.el index 9306bd85dcd..082eb8276e8 100644 --- a/lisp/sqlite-mode.el +++ b/lisp/sqlite-mode.el @@ -25,6 +25,14 @@ (require 'cl-lib) +(declare-function sqlite-execute "sqlite.c") +(declare-function sqlite-more-p "sqlite.c") +(declare-function sqlite-next "sqlite.c") +(declare-function sqlite-columns "sqlite.c") +(declare-function sqlite-finalize "sqlite.c") +(declare-function sqlite-select "sqlite.c") +(declare-function sqlite-open "sqlite.c") + (defvar-keymap sqlite-mode-map "g" #'sqlite-mode-list-tables "c" #'sqlite-mode-list-columns @@ -44,6 +52,8 @@ (defun sqlite-mode-open-file (file) "Browse the contents of an sqlite file." (interactive "fSQLite file name: ") + (unless (sqlite-available-p) + (error "This Emacs doesn't have SQLite support, so it can't view SQLite files")) (pop-to-buffer (get-buffer-create (format "*SQLite %s*" (file-name-nondirectory file)))) (sqlite-mode) @@ -57,7 +67,7 @@ (db sqlite--db) (entries nil)) (erase-buffer) - (dolist (table (sqlite-select db "select name from sqlite_schema where type = 'table' and name not like 'sqlite_%' order by name")) + (dolist (table (sqlite-select db "select name from sqlite_master where type = 'table' and name not like 'sqlite_%' order by name")) (push (list (car table) (caar (sqlite-select db (format "select count(*) from %s" (car table))))) @@ -188,7 +198,7 @@ (not (eq (car table) 'row))) (user-error "No row under point")) (unless (yes-or-no-p "Really delete the row under point? ") - (error "Not deleting")) + (user-error "Not deleting")) (sqlite-execute sqlite--db (format "delete from %s where %s" diff --git a/lisp/sqlite.el b/lisp/sqlite.el index dccdda16ac0..6d32a0468f3 100644 --- a/lisp/sqlite.el +++ b/lisp/sqlite.el @@ -26,16 +26,17 @@ (defmacro with-sqlite-transaction (db &rest body) "Execute BODY while holding a transaction for DB." (declare (indent 1) (debug (form body))) - (let ((db-var (gensym))) - `(let ((,db-var ,db)) + (let ((db-var (gensym)) + (func-var (gensym))) + `(let ((,db-var ,db) + (,func-var (lambda () ,@body))) (if (sqlite-available-p) (unwind-protect (progn (sqlite-transaction ,db-var) - ,@body) + (funcall ,func-var)) (sqlite-commit ,db-var)) - (progn - ,@body))))) + (funcall ,func-var))))) (provide 'sqlite) |