|
@@ -5608,8 +5608,8 @@ exit by killing the buffer with \\[org-edit-src-exit]."
|
|
|
(beginning-of-line 1)
|
|
|
(if (looking-at "[ \t]*[^:\n \t]")
|
|
|
nil
|
|
|
- (if (looking-at "[ \t]*\\(\n\\|\\'\\)]")
|
|
|
- (setq beg (point) end (match-end 0))
|
|
|
+ (if (looking-at "[ \t]*\\(\n\\|\\'\\)")
|
|
|
+ (setq beg (point) end beg)
|
|
|
(save-excursion
|
|
|
(if (re-search-backward "^[ \t]*[^:]" nil 'move)
|
|
|
(setq beg (point-at-bol 2))
|
|
@@ -5618,32 +5618,32 @@ exit by killing the buffer with \\[org-edit-src-exit]."
|
|
|
(if (re-search-forward "^[ \t]*[^:]" nil 'move)
|
|
|
(setq end (1- (match-beginning 0)))
|
|
|
(setq end (point))))
|
|
|
- (goto-line line)
|
|
|
- (if (get-buffer "*Org Edit Picture*")
|
|
|
- (kill-buffer "*Org Edit Picture*"))
|
|
|
- (switch-to-buffer (make-indirect-buffer (current-buffer)
|
|
|
- "*Org Edit Picture*"))
|
|
|
- (narrow-to-region beg end)
|
|
|
- (remove-text-properties beg end '(display nil invisible nil
|
|
|
- intangible nil))
|
|
|
- (when (fboundp 'font-lock-unfontify-region)
|
|
|
- (font-lock-unfontify-region (point-min) (point-max)))
|
|
|
- (cond
|
|
|
- ((eq org-edit-fixed-width-region-mode 'artist-mode)
|
|
|
- (fundamental-mode)
|
|
|
- (artist-mode 1))
|
|
|
- (t (funcall org-edit-fixed-width-region-mode)))
|
|
|
- (set (make-local-variable 'org-edit-src-force-single-line) nil)
|
|
|
- (set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
|
|
|
- (set (make-local-variable 'org-edit-src-picture) t)
|
|
|
- (goto-char (point-min))
|
|
|
- (while (re-search-forward "^[ \t]*: " nil t)
|
|
|
- (replace-match ""))
|
|
|
- (goto-line line)
|
|
|
- (org-exit-edit-mode)
|
|
|
- (org-set-local 'header-line-format msg)
|
|
|
- (message "%s" msg)
|
|
|
- t))))
|
|
|
+ (goto-line line))
|
|
|
+ (if (get-buffer "*Org Edit Picture*")
|
|
|
+ (kill-buffer "*Org Edit Picture*"))
|
|
|
+ (switch-to-buffer (make-indirect-buffer (current-buffer)
|
|
|
+ "*Org Edit Picture*"))
|
|
|
+ (narrow-to-region beg end)
|
|
|
+ (remove-text-properties beg end '(display nil invisible nil
|
|
|
+ intangible nil))
|
|
|
+ (when (fboundp 'font-lock-unfontify-region)
|
|
|
+ (font-lock-unfontify-region (point-min) (point-max)))
|
|
|
+ (cond
|
|
|
+ ((eq org-edit-fixed-width-region-mode 'artist-mode)
|
|
|
+ (fundamental-mode)
|
|
|
+ (artist-mode 1))
|
|
|
+ (t (funcall org-edit-fixed-width-region-mode)))
|
|
|
+ (set (make-local-variable 'org-edit-src-force-single-line) nil)
|
|
|
+ (set (make-local-variable 'org-edit-src-from-org-mode) org-mode-p)
|
|
|
+ (set (make-local-variable 'org-edit-src-picture) t)
|
|
|
+ (goto-char (point-min))
|
|
|
+ (while (re-search-forward "^[ \t]*: ?" nil t)
|
|
|
+ (replace-match ""))
|
|
|
+ (goto-line line)
|
|
|
+ (org-exit-edit-mode)
|
|
|
+ (org-set-local 'header-line-format msg)
|
|
|
+ (message "%s" msg)
|
|
|
+ t)))
|
|
|
|
|
|
|
|
|
(defun org-edit-src-find-region-and-lang ()
|