 Simplified version of a combination `defalias' and `make-obsolete',
 it assumes that NEWDEF is loaded."
   (defalias sym (symbol-function newdef))
-  (if (fboundp 'make-obsolete)
-      (make-obsolete sym newdef "long ago")))
+  (make-obsolete sym newdef "long ago"))
 
 
 (erlang-obsolete 'calculate-erlang-indent 'erlang-calculate-indent)

;;; completion-table' containing all normal tags plus tags on the form
;;; `module:tag' and `module:'.

(when (and (locate-library "etags")
           (require 'etags)
           (fboundp 'etags-tags-completion-table)
           (fboundp 'tags-lazy-completion-table)) ; Emacs 23.1+
  (if (fboundp 'advice-add)
      ;; Emacs 24.4+
      (advice-add 'etags-tags-completion-table :around
                  #'erlang-etags-tags-completion-table-advice)
    ;; Emacs 23.1-24.3
    (defadvice etags-tags-completion-table (around
                                            erlang-replace-tags-table
                                            activate)
      (if erlang-replace-etags-tags-completion-table
          (setq ad-return-value (erlang-etags-tags-completion-table))
        ad-do-it))))

(defun erlang-etags-tags-completion-table-advice (oldfun)
  (if erlang-replace-etags-tags-completion-table

The skeleton routines are based on the `tempo' package.  Should this
package not be present, this function does nothing."
  (interactive)
  (require 'tempo)
  (let ((skel erlang-skel)
        (menu '()))
    (while skel
      (cond ((null (car skel))
             (setq menu (cons nil menu)))
            (t
             (funcall (symbol-function 'tempo-define-template)
                      (concat "erlang-" (nth 1 (car skel)))
                      ;; The tempo template used contains an `include'
                      ;; function call only, hence changes to the
                      ;; variables describing the templates take effect
                      ;; immediately.
                      (list (list 'erlang-skel-include (nth 2 (car skel))))
                      (nth 1 (car skel))
                      (car (car skel))
                      'erlang-tempo-tags)
             (setq menu (cons (erlang-skel-make-menu-item
                               (car skel)) menu))))
      (setq skel (cdr skel)))
    (setq erlang-menu-skel-items
          (list nil (list "Skeletons" (nreverse menu))))
    (setq erlang-menu-items
          (erlang-menu-add-above 'erlang-menu-skel-items
                                 'erlang-menu-version-items
                                 erlang-menu-items))
    (erlang-menu-init)))

(defun erlang-skel-make-menu-item (skel)
  (let ((func (intern (concat "tempo-template-erlang-" (nth 1 skel)))))
