unofficial mirror of bug-gnu-emacs@gnu.org 
 help / color / mirror / code / Atom feed
From: Mauro Aranda <maurooaranda@gmail.com>
To: Stefan Kangas <stefankangas@gmail.com>, 65852@debbugs.gnu.org
Cc: "Mattias Engdegård" <mattiase@acm.org>
Subject: bug#65852: 30.0.50; image-auto-resize :type has choices in wrong order
Date: Sun, 10 Sep 2023 11:47:23 -0300	[thread overview]
Message-ID: <adb0a850-2fd5-8ad9-5d10-9b1228b1b5fe@gmail.com> (raw)
In-Reply-To: <CADwFkmmPgXF+QFt63kg4dihSOUNpkTiznpL0wu5TdDVLGq_8yg@mail.gmail.com>

[-- Attachment #1: Type: text/plain, Size: 573 bytes --]

On 10/9/23 11:24, Stefan Kangas wrote:
 >> I worked on something like that for elint.el, based on the wishlist on
 >> Bug#2591: https://debbugs.gnu.org/cgi/bugreport.cgi?bug=2591
 >>
 >> But I know it might be better to make it so that the byte-compiler
 >> warns, so I never posted it.
 >
 > I'm not sure if elint.el is used all that much, but I might be wrong.

A shame, if you ask me.  It helped me find two more options with this
problem: font-lock-verbose and message-openpgp-header.  I attach an
updated patch, but let me know if you prefer a separate bug report.


[-- Attachment #2: 0001-Fix-order-of-other-choice-in-defcustom-type.patch --]
[-- Type: text/x-patch, Size: 2445 bytes --]

From b2d5fcecec57b6c2c7f26fdc2b070c14c7eac112 Mon Sep 17 00:00:00 2001
From: Mauro Aranda <maurooaranda@gmail.com>
Date: Sun, 10 Sep 2023 10:45:04 -0300
Subject: [PATCH] Fix order of `other' choice in defcustom :type

* lisp/font-lock.el (font-lock-verbose)
* lisp/image-mode.el (image-auto-resize)
* lisp/gnus/message.el (message-openpgp-header): Arrange for 'other'
to be the last choice.  (Bug#65852)
---
 lisp/font-lock.el    | 4 ++--
 lisp/gnus/message.el | 6 +++---
 lisp/image-mode.el   | 4 ++--
 3 files changed, 7 insertions(+), 7 deletions(-)

diff --git a/lisp/font-lock.el b/lisp/font-lock.el
index f8815c1698a..3df63f82fa1 100644
--- a/lisp/font-lock.el
+++ b/lisp/font-lock.el
@@ -299,8 +299,8 @@ font-lock-verbose
   "If non-nil, means show status messages for buffer fontification.
 If a number, only buffers greater than this size have fontification messages."
   :type '(choice (const :tag "never" nil)
-		 (other :tag "always" t)
-		 (integer :tag "size"))
+		 (integer :tag "size")
+                 (other :tag "always" t))
   :group 'font-lock
   :version "24.1")
 \f
diff --git a/lisp/gnus/message.el b/lisp/gnus/message.el
index fe27927be7e..b8ea529d51c 100644
--- a/lisp/gnus/message.el
+++ b/lisp/gnus/message.el
@@ -2840,11 +2840,11 @@ message-openpgp-header
 			(const :tag "No ID" nil))
 		(choice (string :tag "Key")
 			(const :tag "No Key" nil))
-		(choice (other :tag "None" nil)
-			(const :tag "Unprotected" "unprotected")
+                (choice (const :tag "Unprotected" "unprotected")
 			(const :tag "Sign" "sign")
 			(const :tag "Encrypt" "encrypt")
-			(const :tag "Sign and Encrypt" "signencrypt"))))
+                        (const :tag "Sign and Encrypt" "signencrypt")
+                        (other :tag "None" nil))))
   :version "28.1")
 
 (defun message-add-openpgp-header ()
diff --git a/lisp/image-mode.el b/lisp/image-mode.el
index dce35ff72da..ecc7d73dd9e 100644
--- a/lisp/image-mode.el
+++ b/lisp/image-mode.el
@@ -69,8 +69,8 @@ image-auto-resize
 Resizing will always preserve the aspect ratio of the image."
   :type '(choice (const :tag "No resizing" nil)
                  (const :tag "Fit to window" fit-window)
-                 (other :tag "Scale down to fit window" t)
-                 (number :tag "Scale factor" 1))
+                 (number :tag "Scale factor" 1)
+                 (other :tag "Scale down to fit window" t))
   :version "29.1"
   :group 'image)
 
-- 
2.34.1


  reply	other threads:[~2023-09-10 14:47 UTC|newest]

Thread overview: 11+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-09-10 13:40 bug#65852: 30.0.50; image-auto-resize :type has choices in wrong order Mauro Aranda
2023-09-10 13:48 ` Mauro Aranda
2023-09-10 13:49 ` Stefan Kangas
2023-09-10 13:58   ` Mauro Aranda
2023-09-10 14:24     ` Stefan Kangas
2023-09-10 14:47       ` Mauro Aranda [this message]
2023-09-10 15:38         ` Stefan Kangas
2023-09-10 15:38       ` Mattias Engdegård
2023-09-12 14:42         ` Mattias Engdegård
2023-09-17 15:20           ` Mattias Engdegård
2023-09-17 21:53             ` Mauro Aranda

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

  List information: https://www.gnu.org/software/emacs/

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=adb0a850-2fd5-8ad9-5d10-9b1228b1b5fe@gmail.com \
    --to=maurooaranda@gmail.com \
    --cc=65852@debbugs.gnu.org \
    --cc=mattiase@acm.org \
    --cc=stefankangas@gmail.com \
    /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 public inbox

	https://git.savannah.gnu.org/cgit/emacs.git

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).