From: Stefan Kangas <stefan@marxist.se>
To: 35918@debbugs.gnu.org
Subject: bug#35918: [PATCH] bookmark.el: Make bookmark-maybe-message obsolete
Date: Sun, 26 May 2019 14:45:36 +0200 [thread overview]
Message-ID: <CADwFkm=gOh4eAKiTkdGcsN81MJ3TF2Mq=1_EXepp4fkYeaNq1Q@mail.gmail.com> (raw)
[-- Attachment #1.1: Type: text/plain, Size: 246 bytes --]
The `bookmark-maybe-message' function checks the `baud-rate' variable before
displaying a message. I don't believe this is necessary nowadays.
I therefore suggest that we make it an obsolete function alias for
`message'.
Thanks,
Stefan Kangas
[-- Attachment #1.2: Type: text/html, Size: 318 bytes --]
[-- Attachment #2: 0001-Make-bookmark-maybe-message-obsolete.patch --]
[-- Type: text/x-patch, Size: 2570 bytes --]
From a030df951f35f9accc9138728c3968f512084efe Mon Sep 17 00:00:00 2001
From: Stefan Kangas <stefankangas@gmail.com>
Date: Sun, 26 May 2019 14:32:55 +0200
Subject: [PATCH] Make bookmark-maybe-message obsolete
* bookmark.el (bookmark-maybe-message): Redefine as obsolete function
alias for `message'.
---
lisp/bookmark.el | 19 ++++++-------------
1 file changed, 6 insertions(+), 13 deletions(-)
diff --git a/lisp/bookmark.el b/lisp/bookmark.el
index b1fe690dac..9b93c099af 100644
--- a/lisp/bookmark.el
+++ b/lisp/bookmark.el
@@ -745,16 +745,10 @@ bookmark-insert-file-format-version-stamp
;;; end file-format stuff
\f
-;;; Generic helpers.
-
-(defun bookmark-maybe-message (fmt &rest args)
- "Apply `message' to FMT and ARGS, but only if the display is fast enough."
- (if (>= baud-rate 9600)
- (apply 'message fmt args)))
-
-\f
;;; Core code:
+(define-obsolete-function-alias 'bookmark-maybe-message 'message "27.1")
+
(defvar bookmark-minibuffer-read-name-map
(let ((map (make-sparse-keymap)))
(set-keymap-parent map minibuffer-local-map)
@@ -1429,7 +1423,7 @@ bookmark-save
\f
(defun bookmark-write-file (file)
"Write `bookmark-alist' to FILE."
- (bookmark-maybe-message "Saving bookmarks to file %s..." file)
+ (message "Saving bookmarks to file %s..." file)
(with-current-buffer (get-buffer-create " *Bookmarks*")
(goto-char (point-min))
(delete-region (point-min) (point-max))
@@ -1468,8 +1462,7 @@ bookmark-write-file
(file-error (message "Can't write %s" file)))
(setq bookmark-file-coding-system coding-system-for-write)
(kill-buffer (current-buffer))
- (bookmark-maybe-message
- "Saving bookmarks to file %s...done" file)))))
+ (message "Saving bookmarks to file %s...done" file)))))
(defun bookmark-import-new-list (new-list)
@@ -1527,7 +1520,7 @@ bookmark-load
(if (not (file-readable-p file))
(error "Cannot read bookmark file %s" file)
(if (null no-msg)
- (bookmark-maybe-message "Loading bookmarks from %s..." file))
+ (message "Loading bookmarks from %s..." file))
(with-current-buffer (let ((enable-local-variables nil))
(find-file-noselect file))
(goto-char (point-min))
@@ -1553,7 +1546,7 @@ bookmark-load
(error "Invalid bookmark list in %s" file)))
(kill-buffer (current-buffer)))
(if (null no-msg)
- (bookmark-maybe-message "Loading bookmarks from %s...done" file))))
+ (message "Loading bookmarks from %s...done" file))))
\f
--
2.11.0
next reply other threads:[~2019-05-26 12:45 UTC|newest]
Thread overview: 4+ messages / expand[flat|nested] mbox.gz Atom feed top
2019-05-26 12:45 Stefan Kangas [this message]
2019-05-30 12:44 ` bug#35918: [PATCH] bookmark.el: Make bookmark-maybe-message obsolete Basil L. Contovounesios
2019-05-30 19:51 ` Stefan Kangas
2019-06-09 23:40 ` Paul Eggert
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to='CADwFkm=gOh4eAKiTkdGcsN81MJ3TF2Mq=1_EXepp4fkYeaNq1Q@mail.gmail.com' \
--to=stefan@marxist.se \
--cc=35918@debbugs.gnu.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
Code repositories for project(s) associated with this external index
https://git.savannah.gnu.org/cgit/emacs.git
https://git.savannah.gnu.org/cgit/emacs/org-mode.git
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.