From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Stefan Monnier Newsgroups: gmane.emacs.devel Subject: Re: doc-view compilation warnings Date: Tue, 23 Oct 2007 17:53:46 -0400 Message-ID: References: <87wsth6vk5.fsf@catnip.gol.com> <878x5wrgnv.fsf@baldur.tsdh.de> <87prz6yn1c.fsf@baldur.tsdh.de> <200710231430.l9NEUk8x012690@oogie-boogie.ics.uci.edu> <87ejflzv18.fsf@baldur.tsdh.de> <200710231607.l9NG7EoD016139@oogie-boogie.ics.uci.edu> <87abq9zpnz.fsf@baldur.tsdh.de> <200710231835.l9NIZ7HB025212@oogie-boogie.ics.uci.edu> <87640xzn9p.fsf@baldur.tsdh.de> <871wblzjn3.fsf@baldur.tsdh.de> NNTP-Posting-Host: lo.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: ger.gmane.org 1193176569 9673 80.91.229.12 (23 Oct 2007 21:56:09 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Tue, 23 Oct 2007 21:56:09 +0000 (UTC) Cc: Richard Stallman To: emacs-devel@gnu.org Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Tue Oct 23 23:56:10 2007 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([199.232.76.165]) by lo.gmane.org with esmtp (Exim 4.50) id 1IkRjM-0002P3-GT for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 23:56:08 +0200 Original-Received: from localhost ([127.0.0.1] helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkRjE-0005Qx-Ju for ged-emacs-devel@m.gmane.org; Tue, 23 Oct 2007 17:56:00 -0400 Original-Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1IkRhl-00041I-VV for emacs-devel@gnu.org; Tue, 23 Oct 2007 17:54:30 -0400 Original-Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1IkRhh-0003xi-HZ for emacs-devel@gnu.org; Tue, 23 Oct 2007 17:54:27 -0400 Original-Received: from [199.232.76.173] (helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1IkRhg-0003xM-UK for emacs-devel@gnu.org; Tue, 23 Oct 2007 17:54:24 -0400 Original-Received: from chene.dit.umontreal.ca ([132.204.246.20]) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1IkRhc-0001sL-KS; Tue, 23 Oct 2007 17:54:20 -0400 Original-Received: from ceviche.home (vpn-132-204-232-81.acd.umontreal.ca [132.204.232.81]) by chene.dit.umontreal.ca (8.14.1/8.14.1) with ESMTP id l9NLsIJ9009424; Tue, 23 Oct 2007 17:54:18 -0400 Original-Received: by ceviche.home (Postfix, from userid 20848) id 0C3B7B4A74; Tue, 23 Oct 2007 17:53:46 -0400 (EDT) In-Reply-To: <871wblzjn3.fsf@baldur.tsdh.de> (Tassilo Horn's message of "Tue\, 23 Oct 2007 22\:00\:16 +0200") User-Agent: Gnus/5.11 (Gnus v5.11) Emacs/23.0.50 (gnu/linux) X-NAI-Spam-Score: -2.5 X-NAI-Spam-Rules: 2 Rules triggered BAYES_00=-2.5, HAS_X_HELO=0 X-detected-kernel: by monty-python.gnu.org: Linux 2.6 (newer, 3) X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Original-Sender: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.devel:81596 Archived-At: >>>> > +(push '("\\.[eE]?[pP][sS]\\'" . doc-view-mode-maybe) auto-mode-alist) >>>> > +(push '("\\.[Dd][Vv][Ii]\\'" . doc-view-mode-maybe) auto-mode-alist) >>>> > +(push '("\\.[Pp][Dd][Ff]\\'" . doc-view-mode-maybe) auto-mode-alist) >>>> >>>> In general loading a file should not have side effects like this. >>>> IMHO, it is not idea to do things this way... >> >>> So what would you suggest? A function `doc-view-initialize' that >>> does this? >> >> You could put it directly into files.el. > That would load doc-view unconditionally when a user opens a pdf/ps/dvi > file. That's ok with me, but others might think different. > But someone should decide: Is loading doc-view when opening ps/pdf/dvi > files ok? It doesn't look like a problem to me, as long as it doesn't show PS files using doc-view by default. Note that it may be simpler to setup auto-mode-alist to map *.ps to ps-mode and dvi and pdf files to doc-view-mode and then change ps-mode to activate doc-view-minor-mode explicitly and unconditionally. That will save you from defining doc-view-mode-maybe. I'd also be very happy to get rid of the doc-view-clean-auto-mode-alist monstrosity by just saying "if you're not using doc-view-minor-mode, then toggling off doc-view puts you in fundamental-mode", or if you want to be fancier, then save the previous major-mode when entering doc-view-mode (when possible) and reuse that value when exiting it (like picture-mode does). Stefan