From 51e78e91464601fc9adef1ca9c1c5ff0a23043ef Mon Sep 17 00:00:00 2001 From: Mauro Aranda Date: Fri, 5 Mar 2021 14:18:32 +0100 Subject: Fix qualifiers order for loadhist-unload-element in elp.el * lisp/emacs-lisp/elp.el (loadhist-unload-element): The :extra qualifier is expected to come before the other qualifiers, so do that (bug#46917). --- lisp/emacs-lisp/elp.el | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'lisp/emacs-lisp/elp.el') diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index cc2927caf40..411ea2af69c 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -583,7 +583,7 @@ displayed." ;; continue standard unloading nil) -(cl-defmethod loadhist-unload-element :before :extra "elp" ((x (head defun))) +(cl-defmethod loadhist-unload-element :extra "elp" :before ((x (head defun))) "Un-instrument before unloading a function." (elp-restore-function (cdr x))) -- cgit v1.2.3 From 43c154404e1f0361d18c1d80caecf4b62ce7b74e Mon Sep 17 00:00:00 2001 From: Stefan Kangas Date: Thu, 29 Apr 2021 17:17:50 +0200 Subject: * lisp/emacs-lisp/elp.el: Doc fixes. --- lisp/emacs-lisp/elp.el | 30 ++++++++++++++---------------- 1 file changed, 14 insertions(+), 16 deletions(-) (limited to 'lisp/emacs-lisp/elp.el') diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 4fb4a438b26..1be46ae7e3d 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -1,7 +1,6 @@ ;;; elp.el --- Emacs Lisp Profiler -*- lexical-binding: t -*- -;; Copyright (C) 1994-1995, 1997-1998, 2001-2021 Free Software -;; Foundation, Inc. +;; Copyright (C) 1994-2021 Free Software Foundation, Inc. ;; Author: Barry A. Warsaw ;; Maintainer: emacs-devel@gnu.org @@ -30,8 +29,8 @@ ;; hacks those functions so that profiling information is recorded ;; whenever they are called. To print out the current results, use ;; M-x elp-results. If you want output to go to standard-output -;; instead of a separate buffer, setq elp-use-standard-output to -;; non-nil. With elp-reset-after-results set to non-nil, profiling +;; instead of a separate buffer, set `elp-use-standard-output' to +;; non-nil. With `elp-reset-after-results' set to non-nil, profiling ;; information will be reset whenever the results are displayed. You ;; can also reset all profiling info at any time with M-x ;; elp-reset-all. @@ -40,12 +39,12 @@ ;; the package follows the GNU coding standard of a common textual ;; prefix. Use M-x elp-instrument-package for this. ;; -;; If you want to sort the results, set elp-sort-by-function to some +;; If you want to sort the results, set `elp-sort-by-function' to some ;; predicate function. The three most obvious choices are predefined: -;; elp-sort-by-call-count, elp-sort-by-average-time, and -;; elp-sort-by-total-time. Also, you can prune from the output, all +;; `elp-sort-by-call-count', `elp-sort-by-average-time', and +;; `elp-sort-by-total-time'. Also, you can prune from the output, all ;; functions that have been called fewer than a given number of times -;; by setting elp-report-limit. +;; by setting `elp-report-limit'. ;; ;; Elp can instrument byte-compiled functions just as easily as ;; interpreted functions, but it cannot instrument macros. However, @@ -95,11 +94,11 @@ ;; Note that there are plenty of factors that could make the times ;; reported unreliable, including the accuracy and granularity of your -;; system clock, and the overhead spent in lisp calculating and +;; system clock, and the overhead spent in Lisp calculating and ;; recording the intervals. I figure the latter is pretty constant, ;; so while the times may not be entirely accurate, I think they'll ;; give you a good feel for the relative amount of work spent in the -;; various lisp routines you are profiling. Note further that times +;; various Lisp routines you are profiling. Note further that times ;; are calculated using wall-clock time, so other system load will ;; affect accuracy too. @@ -405,15 +404,15 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." (defvar elp-et-len nil) (defun elp-sort-by-call-count (vec1 vec2) - ;; sort by highest call count. See `sort'. + "Predicate to sort by highest call count. See `sort'." (>= (aref vec1 0) (aref vec2 0))) (defun elp-sort-by-total-time (vec1 vec2) - ;; sort by highest total time spent in function. See `sort'. + "Predicate to sort by highest total time spent in function. See `sort'." (>= (aref vec1 1) (aref vec2 1))) (defun elp-sort-by-average-time (vec1 vec2) - ;; sort by highest average time spent in function. See `sort'. + "Predicate to sort by highest average time spent in function. See `sort'." (>= (aref vec1 2) (aref vec2 2))) (defsubst elp-pack-number (number width) @@ -471,13 +470,13 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." "Keymap used on the function name column." ) (defun elp-results-jump-to-definition (&optional event) - "Jump to the definition of the function under the point." + "Jump to the definition of the function at point." (interactive (list last-nonmenu-event)) (if event (posn-set-point (event-end event))) (find-function (get-text-property (point) 'elp-symname))) (defun elp-output-insert-symname (symname) - ;; Insert SYMNAME with text properties. + "Insert SYMNAME with text properties." (insert (propertize symname 'elp-symname (intern symname) 'keymap elp-results-symname-map @@ -588,7 +587,6 @@ displayed." "Un-instrument before unloading a function." (elp-restore-function (cdr x))) - (provide 'elp) ;;; elp.el ends here -- cgit v1.2.3 From d51e6af9a70fac29881edf4e303d4f1ef4ec2b4a Mon Sep 17 00:00:00 2001 From: Lars Ingebrigtsen Date: Mon, 31 May 2021 08:17:00 +0200 Subject: Put ELP results in a special-mode buffer * lisp/emacs-lisp/elp.el (elp-results): Make `q' work in ELP results buffer (bug#14104). (elp-results-mode): Define as an empty special mode derivation. --- lisp/emacs-lisp/elp.el | 18 ++++++++++-------- 1 file changed, 10 insertions(+), 8 deletions(-) (limited to 'lisp/emacs-lisp/elp.el') diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 2ee19a35b23..7c7961c4d5a 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -483,6 +483,10 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." 'face 'link 'help-echo "mouse-2 or RET jumps to definition"))) +(define-derived-mode elp-results-mode special-mode "ELP" + "Mode for ELP results" + :interactive nil) + ;;;###autoload (defun elp-results () "Display current profiling results. @@ -490,11 +494,12 @@ If `elp-reset-after-results' is non-nil, then current profiling information for all instrumented functions is reset after results are displayed." (interactive) - (let ((curbuf (current-buffer)) - (resultsbuf (if elp-recycle-buffers-p - (get-buffer-create elp-results-buffer) - (generate-new-buffer elp-results-buffer)))) - (set-buffer resultsbuf) + (pop-to-buffer + (if elp-recycle-buffers-p + (get-buffer-create elp-results-buffer) + (generate-new-buffer elp-results-buffer))) + (elp-results-mode) + (let ((inhibit-read-only t)) (erase-buffer) ;; get the length of the longest function name being profiled (let* ((longest 0) @@ -565,9 +570,6 @@ displayed." (if elp-sort-by-function (setq resvec (sort resvec elp-sort-by-function))) (mapc 'elp-output-result resvec)) - ;; now pop up results buffer - (set-buffer curbuf) - (pop-to-buffer resultsbuf) ;; copy results to standard-output? (if (or elp-use-standard-output noninteractive) (princ (buffer-substring (point-min) (point-max))) -- cgit v1.2.3 From 4784b6eb9a8d0d54b56db0805732ffc5e71332d3 Mon Sep 17 00:00:00 2001 From: "Basil L. Contovounesios" Date: Tue, 1 Jun 2021 17:59:46 +0100 Subject: ; End recently added sentences with a period. --- etc/NEWS | 2 +- lisp/emacs-lisp/elp.el | 2 +- lisp/whitespace.el | 2 +- 3 files changed, 3 insertions(+), 3 deletions(-) (limited to 'lisp/emacs-lisp/elp.el') diff --git a/etc/NEWS b/etc/NEWS index 914e6890321..d0f903ffa67 100644 --- a/etc/NEWS +++ b/etc/NEWS @@ -534,7 +534,7 @@ indentation is done using SMIE or with the old ad-hoc code. ** Icomplete +++ -*** New minor mode 'icomplete-vertical-mode', alias 'fido-vertical-mode' +*** New minor mode 'icomplete-vertical-mode', alias 'fido-vertical-mode'. This mode is intended to be used with Icomplete ('M-x icomplete-mode') or Fido ('M-x fido-mode'), to display the list of completions candidates vertically instead of horizontally. When used with diff --git a/lisp/emacs-lisp/elp.el b/lisp/emacs-lisp/elp.el index 7c7961c4d5a..c2b026dc822 100644 --- a/lisp/emacs-lisp/elp.el +++ b/lisp/emacs-lisp/elp.el @@ -484,7 +484,7 @@ original definition, use \\[elp-restore-function] or \\[elp-restore-all]." 'help-echo "mouse-2 or RET jumps to definition"))) (define-derived-mode elp-results-mode special-mode "ELP" - "Mode for ELP results" + "Mode for ELP results." :interactive nil) ;;;###autoload diff --git a/lisp/whitespace.el b/lisp/whitespace.el index b45d595cc26..aaa56835cdd 100644 --- a/lisp/whitespace.el +++ b/lisp/whitespace.el @@ -1040,7 +1040,7 @@ See also `whitespace-newline' and `whitespace-display-mappings'." ;; sync states (running a batch job) (setq global-whitespace-newline-mode global-whitespace-mode))) (make-obsolete 'global-whitespace-newline-mode - "Use `global-whitespace-mode' with `whitespace-style' set to `(newline-mark newline)' instead" + "use `global-whitespace-mode' with `whitespace-style' set to `(newline-mark newline)' instead." "28.1") -- cgit v1.2.3