Skip to content

Commit 45174d6

Browse files
skangasyantar92
authored andcommitted
Remove XEmacs and ancient Emacs compat code
* lisp/org-colview.el (org-columns-remove-overlays): * lisp/org-ctags.el (org-ctags-find-tag-interactive): * lisp/org-macs.el (org-fit-window-to-buffer): * lisp/org-mouse.el (org-mouse-show-context-menu): * lisp/org-table.el (org-table-fedit-lisp-indent): * lisp/org.el (org-version, org-reload): * lisp/ox-html.el (org-html-template, org-html--build-meta-info): Remove Emacs 21 and 22 compat code. * lisp/ol-eww.el (org-eww-copy-for-org-mode): * lisp/ol-w3m.el (org-w3m-copy-for-org-mode): * lisp/org-clock.el (org-clock-select-task): * lisp/org-macs.el (org-fit-window-to-buffer): * lisp/org-refile.el (org-refile): * lisp/org.el (org-change-tag-in-region): Remove XEmacs compat code. * lisp/org-goto.el (org-goto--set-map): * lisp/org-macs.el (org-fit-window-to-buffer): * lisp/org-table.el (orgtbl-mode): * lisp/org.el (org-setup-filling): Remove XEmacs or Emacs 19 or 20 compat code. (It is one of these; not clear which.)
1 parent 9632401 commit 45174d6

File tree

13 files changed

+28
-46
lines changed

13 files changed

+28
-46
lines changed

lisp/ol-eww.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,7 +107,7 @@ keep the structure of the Org file."
107107
(setq transform-start (region-beginning))
108108
(setq transform-end (region-end))
109109
;; Deactivate mark if current mark is activate.
110-
(when (fboundp 'deactivate-mark) (deactivate-mark)))
110+
(deactivate-mark))
111111
(message "Transforming links...")
112112
(save-excursion
113113
(goto-char transform-start)

lisp/ol-w3m.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ so that it can be yanked into an Org buffer with links working correctly."
7272
(setq transform-start (region-beginning))
7373
(setq transform-end (region-end))
7474
;; Deactivate mark if current mark is activate.
75-
(when (fboundp 'deactivate-mark) (deactivate-mark)))
75+
(deactivate-mark))
7676
(message "Transforming links...")
7777
(save-excursion
7878
(goto-char transform-start)

lisp/org-clock.el

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -661,7 +661,6 @@ there is no recent clock to choose from."
661661
(if (< i 10)
662662
(+ i ?0)
663663
(+ i (- ?A 10))) m))
664-
(if (fboundp 'int-to-char) (setf (car s) (int-to-char (car s))))
665664
(push s sel-list)))
666665
(run-hooks 'org-clock-before-select-task-hook)
667666
(goto-char (point-min))

lisp/org-colview.el

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -513,8 +513,7 @@ for the duration of the command.")
513513
(defun org-columns-remove-overlays ()
514514
"Remove all currently active column overlays."
515515
(interactive)
516-
(when (and (fboundp 'face-remap-remove-relative)
517-
org-columns-header-line-remap)
516+
(when org-columns-header-line-remap
518517
(face-remap-remove-relative org-columns-header-line-remap)
519518
(setq org-columns-header-line-remap nil))
520519
(when org-columns-overlays

lisp/org-ctags.el

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -509,10 +509,7 @@ Uses `ido-mode' if available.
509509
If the user enters a string that does not match an existing tag, create
510510
a new topic."
511511
(interactive)
512-
(let* ((completing-read-fn (if (fboundp 'ido-completing-read)
513-
'ido-completing-read
514-
'completing-read))
515-
(tag (funcall completing-read-fn "Topic: " org-ctags-tag-list
512+
(let* ((tag (ido-completing-read "Topic: " org-ctags-tag-list
516513
nil 'confirm nil 'org-ctags-find-tag-history)))
517514
(when tag
518515
(cond

lisp/org-goto.el

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -110,10 +110,8 @@ When nil, you can use these keybindings to navigate the buffer:
110110
(org-defkey map [(down)] 'outline-next-visible-heading)
111111
(org-defkey map [(up)] 'outline-previous-visible-heading)
112112
(if org-goto-auto-isearch
113-
(if (fboundp 'define-key-after)
114-
(define-key-after map [t] 'org-goto-local-auto-isearch)
115-
nil)
116-
(org-defkey map "q" 'org-goto-quit)
113+
(define-key-after map [t] 'org-goto-local-auto-isearch)
114+
(org-defkey map "q" 'org-goto-quit)
117115
(org-defkey map "n" 'outline-next-visible-heading)
118116
(org-defkey map "p" 'outline-previous-visible-heading)
119117
(org-defkey map "f" 'outline-forward-same-level)

lisp/org-macs.el

Lines changed: 6 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,7 @@
7070
,@body)
7171
(set-buffer-modified-p ,was-modified)))))
7272

73+
;; FIXME: `partial-completion-mode' is obsolete since Emacs 24.1.
7374
(defmacro org-without-partial-completion (&rest body)
7475
(declare (debug (body)))
7576
`(if (and (boundp 'partial-completion-mode)
@@ -220,14 +221,12 @@ WINDOW defaults to the selected window. MAX-HEIGHT and MIN-HEIGHT are
220221
passed through to `fit-window-to-buffer'. If SHRINK-ONLY is set, call
221222
`shrink-window-if-larger-than-buffer' instead, the height limit is
222223
ignored in this case."
223-
(cond ((if (fboundp 'window-full-width-p)
224-
(not (window-full-width-p window))
225-
;; Do nothing if another window would suffer.
226-
(> (frame-width) (window-width window))))
227-
((and (fboundp 'fit-window-to-buffer) (not shrink-only))
224+
(cond ((not (window-full-width-p window))
225+
;; Do nothing if another window would suffer.
226+
)
227+
((not shrink-only)
228228
(fit-window-to-buffer window max-height min-height))
229-
((fboundp 'shrink-window-if-larger-than-buffer)
230-
(shrink-window-if-larger-than-buffer window)))
229+
(t (shrink-window-if-larger-than-buffer window)))
231230
(or window (selected-window)))
232231

233232
(defun org-buffer-list (&optional predicate exclude-tmp)

lisp/org-mouse.el

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -217,10 +217,7 @@ this function is called. Otherwise, the current major mode menu is used."
217217
(sit-for 0))
218218
(if (functionp org-mouse-context-menu-function)
219219
(funcall org-mouse-context-menu-function event)
220-
(if (fboundp 'mouse-menu-major-mode-map)
221-
(popup-menu (mouse-menu-major-mode-map) event prefix)
222-
(with-no-warnings ; don't warn about fallback, obsolete since 23.1
223-
(mouse-major-mode-menu event prefix)))))
220+
(popup-menu (mouse-menu-major-mode-map) event prefix)))
224221
(setq this-command 'mouse-save-then-kill)
225222
(mouse-save-then-kill event)))
226223

lisp/org-protocol.el

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -367,6 +367,7 @@ returned list."
367367
ret)
368368
l)))
369369

370+
;; `flatten-tree' was added in Emacs 27.1.
370371
(defalias 'org-protocol-flatten
371372
(if (fboundp 'flatten-tree) 'flatten-tree
372373
(lambda (list)

lisp/org-refile.el

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -577,7 +577,7 @@ prefix argument (`C-u C-u C-u C-c C-w')."
577577
(with-demoted-errors "Bookmark set error: %S"
578578
(bookmark-set bookmark-name))))
579579
(move-marker org-capture-last-stored-marker (point)))
580-
(when (fboundp 'deactivate-mark) (deactivate-mark))
580+
(deactivate-mark)
581581
(run-hooks 'org-after-refile-insert-hook)))
582582
(unless org-refile-keep
583583
(if regionp

0 commit comments

Comments
 (0)