Quellcode durchsuchen

Merge branch 'master' of orgmode.org:org-mode

Eric Schulte vor 13 Jahren
Ursprung
Commit
75eeae086e
3 geänderte Dateien mit 10 neuen und 7 gelöschten Zeilen
  1. 6 5
      contrib/lisp/org-contacts.el
  2. 2 1
      lisp/org-crypt.el
  3. 2 1
      lisp/org-table.el

+ 6 - 5
contrib/lisp/org-contacts.el

@@ -224,11 +224,6 @@ If both match values are nil, return all contacts."
         (when (mail-abbrev-in-expansion-header-p)
           (org-contacts-complete-name))))
 
-(add-hook 'message-mode-hook
-          (lambda ()
-            (add-to-list 'completion-at-point-functions
-                         'org-contacts-message-complete-function)))
-
 (defun org-contacts-gnus-get-name-email ()
   "Get name and email address from Gnus message."
   (gnus-with-article-headers
@@ -403,6 +398,12 @@ This adds `org-contacts-gnus-check-mail-address' and
   (add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-check-mail-address)
   (add-hook 'gnus-article-prepare-hook 'org-contacts-gnus-store-last-mail))
 
+(when (boundp 'completion-at-point-functions)
+  (add-hook 'message-mode-hook
+	    (lambda ()
+	      (add-to-list 'completion-at-point-functions
+			   'org-contacts-message-complete-function))))
+
 (defun org-contacts-wl-get-from-header-content ()
   "Retrieve the content of the `From' header of an email.
 Works from wl-summary-mode and mime-view-mode - that is while viewing email.

+ 2 - 1
lisp/org-crypt.el

@@ -209,7 +209,8 @@ This setting can also be overridden in the CRYPTKEY property."
 ;;     'org-mode-hook
 ;;     (lambda () (add-hook 'auto-save-hook 'org-encrypt-entries nil t))))
 
-(when (and (not (daemonp)) auto-save-default)
+(when (and (functionp 'daemonp)
+	   (not (daemonp)) auto-save-default)
   (message "Warning: turn auto-save-mode off in Org buffers containing crypted entries.")
   (sit-for 5))
 

+ 2 - 1
lisp/org-table.el

@@ -1141,7 +1141,8 @@ is always the old value."
       (let* ((pos (match-beginning 0))
 	     (val (buffer-substring (1+ pos) (match-end 0))))
 	(if replace
-	    (replace-match (concat "|" replace) t t))
+	    (replace-match (concat "|" (if (equal replace "") " " replace))
+			   t t))
 	(goto-char (min (point-at-eol) (+ 2 pos)))
 	val)
     (forward-char 1) ""))