branch: externals/org
commit 99f793a171c9b9b327eb29bf2d62d059db24e775
Merge: 1517ead2aa a1a9d408a4
Author: Ihor Radchenko <yanta...@posteo.net>
Commit: Ihor Radchenko <yanta...@posteo.net>

    Merge branch 'bugfix'
---
 doc/org-manual.org |  8 ++++----
 lisp/org-src.el    | 29 +++++++++++++++--------------
 2 files changed, 19 insertions(+), 18 deletions(-)

diff --git a/doc/org-manual.org b/doc/org-manual.org
index e88317379b..65a1185d17 100644
--- a/doc/org-manual.org
+++ b/doc/org-manual.org
@@ -3414,7 +3414,7 @@ options:
 
 | Link Type  | Example                                                         
   |
 
|------------+--------------------------------------------------------------------|
-| http       | =http://staff.science.uva.nl/c.dominik/=                        
   |
+| http       | =http://orgmode.org/=                                           
   |
 | https      | =https://orgmode.org/=                                          
   |
 | doi        | =doi:10.1000/182=                                               
   |
 | file       | =file:/home/dominik/images/jupiter.jpg=                         
   |
@@ -13730,7 +13730,7 @@ backend by default in-lines that image.  For example:
 ~org-html-inline-images~.
 
 On the other hand, if the description part of the Org link is itself
-another link, such as =file:= or =http:= URL pointing to an image, the
+another link, such as =file:= or =https:= URL pointing to an image, the
 HTML export backend in-lines this image and links to the main image.
 This Org syntax enables the backend to link low-resolution thumbnail
 to the high-resolution version of the image, as shown in this example:
@@ -14041,7 +14041,7 @@ terminology.  You may refer to 
https://tug.org/begin.html to get
 familiar with LaTeX basics.  Users with LaTeX installed may also run
 =texdoc latex= from terminal to open LaTeX introduction [fn:: The
 command will open a PDF file, which is also available for download
-from http://mirrors.ctan.org/info/latex-doc-ptr/latex-doc-ptr.pdf]
+from https://mirrors.ctan.org/info/latex-doc-ptr/latex-doc-ptr.pdf]
 
 *** LaTeX/PDF export commands
 :PROPERTIES:
@@ -15323,7 +15323,7 @@ document in one of the following ways:
   ~org-latex-to-mathml-jar-file~.
 
   If you prefer to use MathToWeb[fn:: See
-  [[http://www.mathtoweb.com/cgi-bin/mathtoweb_home.pl][MathToWeb]].]
+  [[https://mathtoweb.sourceforge.io/][MathToWeb]].]
   as your converter, you can configure the above variables as shown
   below.
 
diff --git a/lisp/org-src.el b/lisp/org-src.el
index 74343bde11..a39a4066bd 100644
--- a/lisp/org-src.el
+++ b/lisp/org-src.el
@@ -740,20 +740,21 @@ as `org-src-fontify-natively' is non-nil."
         (font-lock-append-text-property start end 'face src-face))
       (font-lock-append-text-property start end 'face 'org-block))
     ;; Display native tab indentation characters as spaces
-    (save-excursion
-      (goto-char start)
-      (let ((indent-offset
-            (if (org-src-preserve-indentation-p) 0
-              (+ (progn (backward-char)
-                         (org-current-text-indentation))
-                 org-edit-src-content-indentation))))
-        (while (re-search-forward "^[ ]*\t" end t)
-          (let* ((b (and (eq indent-offset (move-to-column indent-offset))
-                         (point)))
-                 (e (progn (skip-chars-forward "\t") (point)))
-                 (s (and b (make-string (* (- e b) native-tab-width) ? ))))
-            (when (and b (< b e)) (add-text-properties b e `(display ,s)))
-            (forward-char)))))
+    (when native-tab-width
+      (save-excursion
+        (goto-char start)
+        (let ((indent-offset
+              (if (org-src-preserve-indentation-p) 0
+                (+ (progn (backward-char)
+                           (org-current-text-indentation))
+                   org-edit-src-content-indentation))))
+          (while (re-search-forward "^[ ]*\t" end t)
+            (let* ((b (and (eq indent-offset (move-to-column indent-offset))
+                           (point)))
+                   (e (progn (skip-chars-forward "\t") (point)))
+                   (s (and b (make-string (* (- e b) native-tab-width) ? ))))
+              (when (and b (< b e)) (add-text-properties b e `(display ,s)))
+              (forward-char))))))
     (add-text-properties
      start end
      '(font-lock-fontified t fontified t font-lock-multiline t))

Reply via email to