summaryrefslogtreecommitdiff
path: root/lisp
diff options
context:
space:
mode:
authorStefan Kangas <stefan@marxist.se>2020-11-20 15:13:08 +0100
committerStefan Kangas <stefan@marxist.se>2020-11-20 16:11:33 +0100
commit8834776b140c7ffec127316e53b778c15550d5e3 (patch)
treef5dd5b2106ce503cae3f957c2aae0b541f06b4d3 /lisp
parente8ee682733733e33336cb5983ef024c0830dbecc (diff)
downloademacs-8834776b140c7ffec127316e53b778c15550d5e3.tar.gz
Remove Emacs 20 compat code from idlwave.el
* lisp/progmodes/idlwave.el (idlwave-indent-line) (idlwave-toggle-comment-region, idlwave-reset-sintern) (idlwave-unit-name, idlwave-mode-menu-def) (idlwave-create-customize-menu): Remove Emacs 20 compat code.
Diffstat (limited to 'lisp')
-rw-r--r--lisp/progmodes/idlwave.el57
1 files changed, 19 insertions, 38 deletions
diff --git a/lisp/progmodes/idlwave.el b/lisp/progmodes/idlwave.el
index 6dd8853b1a0..44bdd918d6c 100644
--- a/lisp/progmodes/idlwave.el
+++ b/lisp/progmodes/idlwave.el
@@ -2776,10 +2776,7 @@ If the optional argument EXPAND is non-nil then the actions in
;; Adjust parallel comment
(end-of-line)
(if (idlwave-in-comment)
- ;; Emacs 21 is too smart with fill-column on comment indent
- (let ((fill-column (if (fboundp 'comment-indent-new-line)
- (1- (frame-width))
- fill-column)))
+ (let ((fill-column (1- (frame-width))))
(indent-for-comment)))))
(goto-char mloc)
;; Get rid of marker
@@ -3991,12 +3988,7 @@ blank lines."
;; skip blank lines
(skip-chars-forward " \t\n")
(if (looking-at (concat "[ \t]*\\(" comment-start "+\\)"))
- (if (fboundp 'uncomment-region)
- (uncomment-region beg end)
- (comment-region beg end
- (- (length (buffer-substring
- (match-beginning 1)
- (match-end 1))))))
+ (uncomment-region beg end)
(comment-region beg end)))))
@@ -4042,11 +4034,6 @@ blank lines."
(defun idlwave-reset-sintern (&optional what)
"Reset all sintern hashes."
;; Make sure the hash functions are accessible.
- (unless (and (fboundp 'gethash)
- (fboundp 'puthash))
- (require 'cl)
- (or (fboundp 'puthash)
- (defalias 'puthash 'cl-puthash)))
(let ((entries '((idlwave-sint-routines 1000 10)
(idlwave-sint-keywords 1000 10)
(idlwave-sint-methods 100 10)
@@ -8886,9 +8873,7 @@ Assumes that point is at the beginning of the unit as found by
(let ((begin (point)))
(re-search-forward
"[a-zA-Z_][a-zA-Z0-9$_]+\\(::[a-zA-Z_][a-zA-Z0-9$_]+\\)?")
- (if (fboundp 'buffer-substring-no-properties)
- (buffer-substring-no-properties begin (point))
- (buffer-substring begin (point)))))
+ (buffer-substring-no-properties begin (point))))
(defalias 'idlwave-function-menu
(condition-case nil
@@ -9004,8 +8989,7 @@ Assumes that point is at the beginning of the unit as found by
("Customize"
["Browse IDLWAVE Group" idlwave-customize t]
"--"
- ["Build Full Customize Menu" idlwave-create-customize-menu
- (fboundp 'customize-menu-create)])
+ ["Build Full Customize Menu" idlwave-create-customize-menu t])
("Documentation"
["Describe Mode" describe-mode t]
["Abbreviation List" idlwave-list-abbrevs t]
@@ -9045,24 +9029,21 @@ Assumes that point is at the beginning of the unit as found by
(defun idlwave-create-customize-menu ()
"Create a full customization menu for IDLWAVE, insert it into the menu."
(interactive)
- (if (fboundp 'customize-menu-create)
- (progn
- ;; Try to load the code for the shell, so that we can customize it
- ;; as well.
- (or (featurep 'idlw-shell)
- (load "idlw-shell" t))
- (easy-menu-change
- '("IDLWAVE") "Customize"
- `(["Browse IDLWAVE group" idlwave-customize t]
- "--"
- ,(customize-menu-create 'idlwave)
- ["Set" Custom-set t]
- ["Save" Custom-save t]
- ["Reset to Current" Custom-reset-current t]
- ["Reset to Saved" Custom-reset-saved t]
- ["Reset to Standard Settings" Custom-reset-standard t]))
- (message "\"IDLWAVE\"-menu now contains full customization menu"))
- (error "Cannot expand menu (outdated version of cus-edit.el)")))
+ ;; Try to load the code for the shell, so that we can customize it
+ ;; as well.
+ (or (featurep 'idlw-shell)
+ (load "idlw-shell" t))
+ (easy-menu-change
+ '("IDLWAVE") "Customize"
+ `(["Browse IDLWAVE group" idlwave-customize t]
+ "--"
+ ,(customize-menu-create 'idlwave)
+ ["Set" Custom-set t]
+ ["Save" Custom-save t]
+ ["Reset to Current" Custom-reset-current t]
+ ["Reset to Saved" Custom-reset-saved t]
+ ["Reset to Standard Settings" Custom-reset-standard t]))
+ (message "\"IDLWAVE\"-menu now contains full customization menu"))
(defun idlwave-show-commentary ()
"Use the finder to view the file documentation from `idlwave.el'."