]> code.delx.au - gnu-emacs/blobdiff - lisp/textmodes/org.el
(org-mode-map): No longer copy `outline-mode-map' explicitly
[gnu-emacs] / lisp / textmodes / org.el
index 64fbb0542ffa2f77d24a7422a3e3d94f2695a225..8e0bccfb70896d1fcea1a08770d8bdf72da5bd2c 100644 (file)
@@ -2690,7 +2690,7 @@ Also put tags into group 4 if tags are present.")
 (make-variable-buffer-local 'org-keyword-time-regexp)
 
 (defconst org-rm-props '(invisible t face t keymap t intangible t mouse-face t
-                                   mouse-map t)
+                                   rear-nonsticky t mouse-map t)
   "Properties to remove when a string without properties is wanted.")
 
 (defsubst org-match-string-no-properties (num &optional string)
@@ -2897,11 +2897,8 @@ Also put tags into group 4 if tags are present.")
 
 ;;; Define the mode
 
-(defvar org-mode-map
-  (if (and (not (keymapp outline-mode-map)) (featurep 'allout))
-      (error "Conflict with outdated version of allout.el.  Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22.")
-    (copy-keymap outline-mode-map))
-  "Keymap for Org-mode.")
+(if (and (not (keymapp outline-mode-map)) (featurep 'allout))
+    (error "Conflict with outdated version of allout.el.  Load org.el before allout.el, or ugrade to newer allout, for example by switching to Emacs 22."))
 
 (defvar org-struct-menu) ; defined later in this file
 (defvar org-org-menu) ; defined later in this file
@@ -2913,6 +2910,7 @@ Also put tags into group 4 if tags are present.")
   "Indicates that a table might need an update.
 This variable is set by `org-before-change-function'.
 `org-table-align' sets it back to nil.")
+(defvar org-mode-map)
 (defvar org-mode-hook nil)
 (defvar org-inhibit-startup nil)        ; Dynamically-scoped param.
 (defvar org-agenda-keep-modes nil)      ; Dynamically-scoped param.
@@ -3140,6 +3138,7 @@ that will be added to PLIST.  Returns the string that was modified."
       (progn
        (add-text-properties (match-beginning 0) (match-end 0)
                             (list 'mouse-face 'highlight
+                                  'rear-nonsticky t
                                   'keymap org-mouse-map
                                   ))
        t)))
@@ -3150,6 +3149,7 @@ that will be added to PLIST.  Returns the string that was modified."
       (progn
        (add-text-properties (match-beginning 0) (match-end 0)
                             (list 'mouse-face 'highlight
+                                  'rear-nonsticky t
                                   'keymap org-mouse-map
                                   ))
        t)))
@@ -3188,6 +3188,7 @@ that will be added to PLIST.  Returns the string that was modified."
       (progn
        (add-text-properties (match-beginning 0) (match-end 0)
                             (list 'mouse-face 'highlight
+                                  'rear-nonsticky t
                                   'keymap org-mouse-map))
        t)))
 
@@ -3206,6 +3207,7 @@ that will be added to PLIST.  Returns the string that was modified."
          (progn
            (add-text-properties (match-beginning 0) (match-end 0)
                                 (list 'mouse-face 'highlight
+                                      'rear-nonsticky t
                                       'keymap org-mouse-map
                                       'help-echo "Radio target link"
                                       'org-linked-text t))
@@ -3271,6 +3273,7 @@ between words."
       (progn
        (add-text-properties (match-beginning 0) (match-end 0)
                             (list 'mouse-face 'highlight
+                                  'rear-nonsticky t
                                   'keymap org-mouse-map))
        t)))
 
@@ -3279,6 +3282,7 @@ between words."
       (progn
        (add-text-properties (match-beginning 1) (match-end 1)
                             (list 'mouse-face 'highlight
+                                  'rear-nonsticky t
                                   'keymap org-mouse-map))
        t)))
 
@@ -3380,6 +3384,7 @@ between words."
         deactivate-mark buffer-file-name buffer-file-truename)
     (remove-text-properties beg end
                            '(mouse-face nil keymap nil org-linked-text nil
+                                        rear-nonsticky nil
                                         invisible nil intangible nil))))
 ;;; Visibility cycling
 
@@ -4569,7 +4574,7 @@ this heading. "
                ;; Make the subtree visible
                (show-subtree)
                (org-end-of-subtree t)
-               (skip-chars-backward " \t\r\n]")
+               (skip-chars-backward " \t\r\n")
                (and (looking-at "[ \t\r\n]*")
                     (replace-match "\n\n")))
            ;; No specific heading, just go to end of file.
@@ -8660,7 +8665,7 @@ are included in the output."
              (push txt rtn))
            ;; if we are to skip sublevels, jump to end of subtree
            (point)
-           (or org-tags-match-list-sublevels (org-end-of-subtree))))))
+           (or org-tags-match-list-sublevels (org-end-of-subtree t))))))
     (when (and (eq action 'sparse-tree)
               (not org-sparse-tree-open-archived-trees))
       (org-hide-archived-subtrees (point-min) (point-max)))
@@ -9816,7 +9821,7 @@ on the system \"/user@host:\"."
         ((fboundp 'tramp-handle-file-remote-p)
          (tramp-handle-file-remote-p file))
         ((and (boundp 'ange-ftp-name-format)
-              (string-match ange-ftp-name-format file))
+              (string-match (car ange-ftp-name-format) file))
          t)
         (t nil)))