unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: Lars Hansen <larsh@soem.dk>
Cc: Eli Zaretskii <eliz@gnu.org>,
	raeburn@raeburn.org, ams@gnu.org, emacs-devel@gnu.org
Subject: Re: --no-desktop broken?
Date: Mon, 23 Jan 2006 09:24:08 +0100	[thread overview]
Message-ID: <43D492A8.2090501@soem.dk> (raw)
In-Reply-To: <87fynf32w8.fsf@jurta.org>

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


>Only the first solution loads desktop.el, and I agree that it is not
>a good solution.  The remaining two solutions don't load desktop.el.
>They use the autoload cookie.  This means that at the time startup.el
>starts processing command switches, it already has "--no-desktop"
>in `command-switch-alist' without loading desktop.el.  The effect is
>exactly the same as adding "--no-desktop" to the local variable
>`longopts' in `command-line-1'.  I think not using package-specific
>switches in startup.el gives better modularity.
>
I like your last solution. It works right and has better modularity.
Also I think the '"--no-desktop" ignored' message is more confusing than
helpful.
So I suggest the attached patch. If there are no objections, I will
install in a couple of days.

[-- Attachment #2: patch.diff --]
[-- Type: text/x-patch, Size: 2072 bytes --]

*** /home/lh/cvsroot/emacs/lisp/desktop.el.~1.97.~	2006-01-23 08:13:25.000000000 +0100
--- /home/lh/cvsroot/emacs/lisp/desktop.el	2006-01-23 08:28:12.766853621 +0100
***************
*** 1156,1161 ****
--- 1156,1162 ----
  ;; after finishing loading the init file.
  ;; We cannot use `command-switch-alist' to process "--no-desktop" because these
  ;; functions are processed after `after-init-hook'.
+ ;;;###autoload
  (add-hook
    'after-init-hook
    '(lambda ()
*** /home/lh/cvsroot/emacs/lisp/startup.el.orig	2006-01-23 08:13:25.714942861 +0100
--- /home/lh/cvsroot/emacs/lisp/startup.el	2006-01-23 08:23:20.391560955 +0100
***************
*** 1632,1638 ****
            (longopts
             (append '(("--funcall") ("--load") ("--insert") ("--kill")
                       ("--directory") ("--eval") ("--execute") ("--no-splash")
!                      ("--find-file") ("--visit") ("--file") ("--no-desktop"))
                     (mapcar (lambda (elt)
                               (list (concat "-" (car elt))))
                             command-switch-alist)))
--- 1632,1638 ----
            (longopts
             (append '(("--funcall") ("--load") ("--insert") ("--kill")
                       ("--directory") ("--eval") ("--execute") ("--no-splash")
!                      ("--find-file") ("--visit") ("--file"))
                     (mapcar (lambda (elt)
                               (list (concat "-" (car elt))))
                             command-switch-alist)))
***************
*** 1732,1744 ****
                  ((equal argi "-kill")
                   (kill-emacs t))
  
- 		;; This is for when they use --no-desktop with -q, or
- 		;; don't load Desktop in their .emacs.  If desktop.el
- 		;; _is_ loaded, it will handle this switch, and we
- 		;; won't see it by the time we get here.
- 		((equal argi "-no-desktop")
- 		 (message "\"--no-desktop\" ignored because the Desktop package is not loaded"))
- 
                  ((string-match "^\\+[0-9]+\\'" argi)
                   (setq line (string-to-number argi)))
  
--- 1732,1737 ----

[-- Attachment #3: Type: text/plain, Size: 142 bytes --]

_______________________________________________
Emacs-devel mailing list
Emacs-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/emacs-devel

  reply	other threads:[~2006-01-23  8:24 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-01-21  0:48 --no-desktop broken? Alfred M. Szmidt
2006-01-21  9:35 ` Eli Zaretskii
2006-01-21  9:38 ` Lars Hansen
2006-01-21 23:53   ` Ken Raeburn
2006-01-22 11:32     ` Lars Hansen
2006-01-23  1:51       ` Juri Linkov
2006-01-23  5:00         ` Eli Zaretskii
2006-01-23  6:18           ` Juri Linkov
2006-01-23  8:24             ` Lars Hansen [this message]
2006-01-23 22:54               ` Eli Zaretskii
2006-01-23 23:43                 ` Lars Hansen
2006-01-24  4:24                   ` Eli Zaretskii
2006-01-24 15:02                     ` Lars Hansen
2006-01-23 23:00             ` Eli Zaretskii

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=43D492A8.2090501@soem.dk \
    --to=larsh@soem.dk \
    --cc=ams@gnu.org \
    --cc=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=raeburn@raeburn.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 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).