Merge branch 'bugfix'

This commit is contained in:
Kyle Meyer 2021-09-30 21:27:57 -04:00
commit d97223b244
6 changed files with 30 additions and 27 deletions

View File

@ -96,27 +96,29 @@ like javac -verbose."
(group (1+ (in alnum ?_))) ; capture the class name (group (1+ (in alnum ?_))) ; capture the class name
(0+ space) ?{) (0+ space) ?{)
"Regexp for the class declaration.") "Regexp for the class declaration.")
(defconst org-babel-java--main-re (rx line-start (0+ space) "public" (defconst org-babel-java--main-re
(1+ space) "static" (rx line-start (0+ space) "public"
(1+ space) "void" (1+ space) "static"
(1+ space) "main" (1+ space) "void"
(0+ space) ?\( (1+ space) "main"
(0+ space) "String" (0+ space) ?\(
(0+ space) (1+ (in alnum ?_ ?\[ ?\] space)) ; "[] args" or "args[]" (0+ space) "String"
(0+ space) ?\) (1+ (in alnum ?_ ?\[ ?\] space)) ; "[] args" or "args[]"
(0+ space) (opt "throws" (1+ (in alnum ?_ ?, ?. space))) ?\)
?{) (0+ space) (opt "throws" (1+ (in alnum ?_ ?, ?. space)))
?{)
"Regexp for the main method declaration.") "Regexp for the main method declaration.")
(defconst org-babel-java--any-method-re (rx line-start (defconst org-babel-java--any-method-re
(0+ space) (opt (seq (1+ alnum) (1+ space))) ; visibility (rx line-start
(opt (seq "static" (1+ space))) ; binding (0+ space) (opt (seq (1+ alnum) (1+ space))) ; visibility
(1+ (in alnum ?_ ?\[ ?\])) ; return type (opt (seq "static" (1+ space))) ; binding
(1+ space) (1+ (in alnum ?_)) ; method name (1+ (in alnum ?_ ?\[ ?\])) ; return type
(0+ space) ?\( (1+ space) (1+ (in alnum ?_)) ; method name
(0+ space) (0+ (in alnum ?_ ?\[ ?\] ?, space)) ; params (0+ space) ?\(
(0+ space) ?\) (0+ (in alnum ?_ ?\[ ?\] ?, space)) ; params
(0+ space) (opt "throws" (1+ (in alnum ?_ ?, ?. space))) ?\)
?{) (0+ space) (opt "throws" (1+ (in alnum ?_ ?, ?. space)))
?{)
"Regexp for any method.") "Regexp for any method.")
(defconst org-babel-java--result-wrapper "\n public static String __toString(Object val) { (defconst org-babel-java--result-wrapper "\n public static String __toString(Object val) {
if (val instanceof String) { if (val instanceof String) {
@ -192,7 +194,7 @@ replaced in this string.")
;; the dir to write the source file ;; the dir to write the source file
(packagedir (if (and (not run-from-temp) packagename) (packagedir (if (and (not run-from-temp) packagename)
(file-name-as-directory (file-name-as-directory
(concat basedir (replace-regexp-in-string "\\\." "/" packagename))) (concat basedir (replace-regexp-in-string "\\." "/" packagename)))
basedir)) basedir))
;; the filename of the source file ;; the filename of the source file
(src-file (concat packagedir classname ".java")) (src-file (concat packagedir classname ".java"))

View File

@ -1,4 +1,4 @@
;;; ob-julia.el --- org-babel functions for julia code evaluation -*- lexical-binding: t; -*- ;;; ob-julia.el --- org-babel functions for julia code evaluation -*- lexical-binding: t; -*-
;; Copyright (C) 2013-2021 Free Software Foundation, Inc. ;; Copyright (C) 2013-2021 Free Software Foundation, Inc.
;; Authors: G. Jay Kerns, based on ob-R.el by Eric Schulte and Dan Davison ;; Authors: G. Jay Kerns, based on ob-R.el by Eric Schulte and Dan Davison
@ -149,7 +149,7 @@ This function is called by `org-babel-execute-src-block'."
(defun org-babel-julia-assign-elisp (name value) (defun org-babel-julia-assign-elisp (name value)
"Construct julia code assigning the elisp VALUE to a variable named NAME." "Construct julia code assigning the elisp VALUE to a variable named NAME."
(if (listp value) (if (listp value)
(let* ((lengths (mapcar #'length (cl-remove-if-not 'sequencep value))) (let* ((lengths (mapcar #'length (cl-remove-if-not #'sequencep value)))
(max (if lengths (apply #'max lengths) 0)) (max (if lengths (apply #'max lengths) 0))
(min (if lengths (apply #'min lengths) 0))) (min (if lengths (apply #'min lengths) 0)))
;; Ensure VALUE has an orgtbl structure (depth of at least 2). ;; Ensure VALUE has an orgtbl structure (depth of at least 2).

View File

@ -118,7 +118,7 @@
;; to current setup. ;; to current setup.
(defconst org-element-citation-key-re (defconst org-element-citation-key-re
(rx "@" (group (one-or-more (any word "-.:?!`'/*@+|(){}<>&_^$#%&~")))) (rx "@" (group (one-or-more (any word "-.:?!`'/*@+|(){}<>&_^$#%~"))))
"Regexp matching a citation key. "Regexp matching a citation key.
Key is located in match group 1.") Key is located in match group 1.")
@ -1024,7 +1024,7 @@ Assume point is at beginning of the headline."
(title-start (prog1 (point) (title-start (prog1 (point)
(unless (or todo priority commentedp) (unless (or todo priority commentedp)
;; Headline like "* :tag:" ;; Headline like "* :tag:"
(skip-syntax-backward " \t")))) (skip-chars-backward " \t"))))
(tags (when (re-search-forward (tags (when (re-search-forward
"[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$" "[ \t]+\\(:[[:alnum:]_@#%:]+:\\)[ \t]*$"
(line-end-position) (line-end-position)

View File

@ -38,6 +38,7 @@
(require 'org-keys) (require 'org-keys)
(declare-function org-mode "org" ()) (declare-function org-mode "org" ())
(declare-function org--get-expected-indentation "org" (element contentsp))
(declare-function org-element-at-point "org-element" ()) (declare-function org-element-at-point "org-element" ())
(declare-function org-element-class "org-element" (datum &optional parent)) (declare-function org-element-class "org-element" (datum &optional parent))
(declare-function org-element-context "org-element" (&optional element)) (declare-function org-element-context "org-element" (&optional element))

View File

@ -1,4 +1,4 @@
;;; ox-koma-letter.el --- KOMA Scrlttr2 Back-End for Org Export Engine -*- lexical-binding: t; -*- ;;; ox-koma-letter.el --- KOMA Scrlttr2 Back-End for Org Export Engine -*- lexical-binding: t; -*-
;; Copyright (C) 2007-2021 Free Software Foundation, Inc. ;; Copyright (C) 2007-2021 Free Software Foundation, Inc.

View File

@ -141,7 +141,7 @@ CONTENTS and INFO are ignored."
CONTENTS is its contents, as a string or nil. INFO is ignored." CONTENTS is its contents, as a string or nil. INFO is ignored."
(let ((case-fold-search t)) (let ((case-fold-search t))
(replace-regexp-in-string (replace-regexp-in-string
"^[ \t]*#\\+attr_[-_a-za-z0-9]+:\\(?: .*\\)?\n" "" "^[ \t]*#\\+attr_[-_a-z0-9]+:\\(?: .*\\)?\n" ""
(org-export-expand blob contents t)))) (org-export-expand blob contents t))))
(defun org-org-headline (headline contents info) (defun org-org-headline (headline contents info)