diff options
author | Bastien Guerry <bzg@altern.org> | 2012-03-16 19:39:36 +0100 |
---|---|---|
committer | Bastien Guerry <bzg@altern.org> | 2012-03-16 19:39:36 +0100 |
commit | 95e318ae0688f9ca2b08cd1b37b19d6eb9ec6dc6 (patch) | |
tree | 743fc398d75c036fd5209587fa0af1b3e19c3cc0 | |
parent | b66ff157e1930453cc7843328aadd671b228ec72 (diff) | |
parent | 490ef86497367f282222d849280ac6d406d1cad2 (diff) | |
download | org-mode-95e318ae0688f9ca2b08cd1b37b19d6eb9ec6dc6.tar.gz |
Merge branch 'maint'
-rw-r--r-- | lisp/org-habit.el | 13 | ||||
-rw-r--r-- | lisp/org-src.el | 11 | ||||
-rw-r--r-- | lisp/org.el | 2 |
3 files changed, 17 insertions, 9 deletions
diff --git a/lisp/org-habit.el b/lisp/org-habit.el index 4025c24..4274aae 100644 --- a/lisp/org-habit.el +++ b/lisp/org-habit.el @@ -346,13 +346,12 @@ current time." (delete-char (min (+ 1 org-habit-preceding-days org-habit-following-days) (- (line-end-position) (point)))) - (insert (org-habit-build-graph - habit - (time-subtract moment - (days-to-time org-habit-preceding-days)) - moment - (time-add moment - (days-to-time org-habit-following-days)))))) + (insert-before-markers + (org-habit-build-graph + habit + (time-subtract moment (days-to-time org-habit-preceding-days)) + moment + (time-add moment (days-to-time org-habit-following-days)))))) (forward-line))))) (defun org-habit-toggle-habits () diff --git a/lisp/org-src.el b/lisp/org-src.el index cc5a6ca..e975d97 100644 --- a/lisp/org-src.el +++ b/lisp/org-src.el @@ -42,7 +42,7 @@ (declare-function org-get-indentation "org" (&optional line)) (declare-function org-switch-to-buffer-other-window "org" (&rest args)) (declare-function org-strip-protective-commas "org" (beg end)) -(declare-function org-pop-to-buffer-same-window +(declare-function org-pop-to-buffer-same-window "org-compat" (&optional buffer-or-name norecord label)) (defcustom org-edit-src-region-extra nil @@ -375,6 +375,15 @@ buffer." "Construct the buffer name for a source editing buffer." (concat "*Org Src " org-buffer-name "[ " lang " ]*")) +(defun org-src-edit-buffer-p (&optional buffer) + "Test whether BUFFER (or the current buffer if BUFFER is nil) +is a source block editing buffer." + (let ((buffer (org-base-buffer (or buffer (current-buffer))))) + (and (buffer-name buffer) + (string-match "\\`*Org Src " (buffer-name buffer)) + (local-variable-p 'org-edit-src-beg-marker buffer) + (local-variable-p 'org-edit-src-end-marker buffer)))) + (defun org-edit-src-find-buffer (beg end) "Find a source editing buffer that is already editing the region BEG to END." (catch 'exit diff --git a/lisp/org.el b/lisp/org.el index 2037fd8..41facf8 100644 --- a/lisp/org.el +++ b/lisp/org.el @@ -8687,7 +8687,7 @@ For file links, arg negates `org-context-in-file-links'." (setq link (plist-get org-store-link-plist :link) desc (or (plist-get org-store-link-plist :description) link))) - ((equal (buffer-name) "*Org Edit Src Example*") + ((org-src-edit-buffer-p) (let (label gc) (while (or (not label) (save-excursion |