From fe358107f14af4441e50cb9e28f06c94a2d2c444 Mon Sep 17 00:00:00 2001 From: Bozhidar Batsov Date: Thu, 15 Dec 2016 11:18:17 +0200 Subject: Clean-up erlang-start.el --- lib/tools/emacs/erlang-start.el | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) (limited to 'lib/tools/emacs/erlang-start.el') diff --git a/lib/tools/emacs/erlang-start.el b/lib/tools/emacs/erlang-start.el index 160057e179..66bd3dd3a2 100644 --- a/lib/tools/emacs/erlang-start.el +++ b/lib/tools/emacs/erlang-start.el @@ -39,7 +39,7 @@ ;; ;; Please state as exactly as possible: ;; - Version number of Erlang Mode (see the menu), Emacs, Erlang, -;; and of any other relevant software. +;; and of any other relevant software. ;; - What the expected result was. ;; - What you did, preferably in a repeatable step-by-step form. ;; - A description of the unexpected result. @@ -60,7 +60,7 @@ ;; (autoload 'erlang-mode "erlang" "Major mode for editing Erlang code." t) -(autoload 'erlang-version "erlang" +(autoload 'erlang-version "erlang" "Return the current version of Erlang mode." t) (autoload 'erlang-shell "erlang" "Start a new Erlang shell." t) (autoload 'run-erlang "erlang" "Start a new Erlang shell." t) @@ -68,7 +68,7 @@ (autoload 'erlang-compile "erlang" "Compile Erlang module in current buffer." t) -(autoload 'erlang-man-module "erlang" +(autoload 'erlang-man-module "erlang" "Find manual page for MODULE." t) (autoload 'erlang-man-function "erlang" "Find manual page for NAME, where NAME is module:function." t) @@ -108,7 +108,7 @@ A function suitable for `eldoc-documentation-function'.\n\n(fn)" nil nil) ;; ;; Associate files using interpreter "escript" with Erlang mode. -;; +;; ;;;###autoload (add-to-list 'interpreter-mode-alist (cons "escript" 'erlang-mode)) @@ -123,10 +123,10 @@ A function suitable for `eldoc-documentation-function'.\n\n(fn)" nil nil) (while erl-ext (let ((cie completion-ignored-extensions)) (while (and cie (not (string-equal (car cie) (car erl-ext)))) - (setq cie (cdr cie))) + (setq cie (cdr cie))) (if (null cie) - (setq completion-ignored-extensions - (cons (car erl-ext) completion-ignored-extensions)))) + (setq completion-ignored-extensions + (cons (car erl-ext) completion-ignored-extensions)))) (setq erl-ext (cdr erl-ext)))) @@ -136,4 +136,9 @@ A function suitable for `eldoc-documentation-function'.\n\n(fn)" nil nil) (provide 'erlang-start) +;; Local variables: +;; coding: utf-8 +;; indent-tabs-mode: nil +;; End: + ;; erlang-start.el ends here. -- cgit v1.2.3 From 1607c07f41a8ff0d87d982fefab6e0c0009d83c3 Mon Sep 17 00:00:00 2001 From: Johan Claesson Date: Fri, 30 Dec 2016 12:20:01 +0100 Subject: Emacs: Consider arity when jumping to definitions Only the xref front-end introduced in Emacs 25 consider arity. It is not implemented for older emacsen. Look for manual page files in lib/erlang/man in erlang-root-dir. Also do not give up in erlang-man-module when not finding the manual page file. Call manual-entry as a fallback. Do not bother to populate menu-bar with man pages when menu-bar-mode is nil. Add erlang extensions also to dired-omit-extensions. Remove some support for Emacs 18 and 19. --- lib/tools/emacs/erlang-start.el | 11 ++++------- 1 file changed, 4 insertions(+), 7 deletions(-) (limited to 'lib/tools/emacs/erlang-start.el') diff --git a/lib/tools/emacs/erlang-start.el b/lib/tools/emacs/erlang-start.el index 66bd3dd3a2..c35f280bf4 100644 --- a/lib/tools/emacs/erlang-start.el +++ b/lib/tools/emacs/erlang-start.el @@ -115,18 +115,15 @@ A function suitable for `eldoc-documentation-function'.\n\n(fn)" nil nil) ;; ;; Ignore files ending in ".jam", ".vee", and ".beam" when performing -;; file completion. +;; file completion and in dired omit mode. ;; ;;;###autoload (let ((erl-ext '(".jam" ".vee" ".beam"))) (while erl-ext - (let ((cie completion-ignored-extensions)) - (while (and cie (not (string-equal (car cie) (car erl-ext)))) - (setq cie (cdr cie))) - (if (null cie) - (setq completion-ignored-extensions - (cons (car erl-ext) completion-ignored-extensions)))) + (add-to-list 'completion-ignored-extensions (car erl-ext)) + (when (boundp 'dired-omit-extensions) + (add-to-list 'dired-omit-extensions (car erl-ext))) (setq erl-ext (cdr erl-ext)))) -- cgit v1.2.3