]> git.eshelyaron.com Git - emacs.git/commitdiff
(gpm-mouse-mode): Rename from t-mouse-mode. Rewrite.
authorStefan Monnier <monnier@iro.umontreal.ca>
Fri, 28 Sep 2007 20:13:31 +0000 (20:13 +0000)
committerStefan Monnier <monnier@iro.umontreal.ca>
Fri, 28 Sep 2007 20:13:31 +0000 (20:13 +0000)
(t-mouse-mode): New compatibility alias.

doc/misc/ChangeLog
lisp/ChangeLog
lisp/t-mouse.el

index a703097fd43727dc8ea96f49bc69213a834d23ed..74820aa539d5cb70634797be2a7fb5e0ea02ad89 100644 (file)
@@ -1,3 +1,12 @@
+2007-09-26  Carsten Dominik  <dominik@science.uva.nl>
+
+       * org.texi: Change links to webpage and maintained email.
+       (Remember): Promote to Chapter, significant changes.
+       (Fast access to TODO states): New section.
+       (Faces for TODO keywords): New section.
+       (Export options): Example for #+DATE.
+       (Progress logging): Section moved.
+
 2007-09-26  Bill Wohler  <wohler@newt.com>
 
        * mh-e.texi (HTML): Mention binding of S-mouse-2 to
index 0befa154ee1f29bec58dac2e114742c6e4d0166f..9695526fbc1322cb5cae2b6ad14aa4f6b193c391 100644 (file)
@@ -1,3 +1,8 @@
+2007-09-28  Stefan Monnier  <monnier@iro.umontreal.ca>
+
+       * t-mouse.el (gpm-mouse-mode): Rename from t-mouse-mode.  Rewrite.
+       (t-mouse-mode): New compatibility alias.
+
 2007-09-28  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * server.el (server-delete-client): Only delete the terminal if it
 
        * net/tramp-cache.el (tramp-cache-print): Pacify byte-compiler.
 
-       * net/tramp-fish.el (tramp-fish-handle-expand-file-name): Apply
-       `tramp-completion-mode-p'.
+       * net/tramp-fish.el (tramp-fish-handle-expand-file-name):
+       Apply `tramp-completion-mode-p'.
        (tramp-fish-handle-set-file-times)
        (tramp-fish-handle-executable-find)
        (tramp-fish-handle-process-file, tramp-fish-get-file-entries)
        (tramp-fish-retrieve-data): Pacify byte-compiler.
 
-       * net/tramp-gw.el (tramp-gw-basic-authentication): Call
-       `tramp-read-passwd' with first parameter `nil'.
+       * net/tramp-gw.el (tramp-gw-basic-authentication):
+       Call `tramp-read-passwd' with first parameter `nil'.
 
 2007-09-28  Glenn Morris  <rgm@gnu.org>
 
 
 2007-09-26  Bastien Guerry  <bzg@altern.org>
 
-       * org-export-latex.el (org-export-latex-tables-verbatim): New
-       function.
-       (org-export-latex-remove-from-headlines): Name changed because of
-       typo.
+       * org-export-latex.el (org-export-latex-tables-verbatim): New function.
+       (org-export-latex-remove-from-headlines): Name changed because of typo.
        (org-export-latex-quotation-marks-convention): Option removed.
        (org-export-latex-make-preamble): Handle the DATE option.
        (org-export-latex-cleaned-string): Now the only cleaning function,
        (org-archive-subtree): No need to split return of `org-get-tags'.
        (org-set-tags, org-entry-properties): Call `org-get-tags-string'
        instead of `org-get-tags'.
-       (org-agenda-format-date): Renamed from `org-agenda-date-format'.
-       (org-time-from-absolute, org-agenda-format-date-aligned): New
-       functions.
+       (org-agenda-format-date): Rename from `org-agenda-date-format'.
+       (org-time-from-absolute, org-agenda-format-date-aligned): New funs.
        (org-compatible-face): New argument INHERITS.  Inherit from this
        face if possible.
        (org-level-1, org-level-2, org-level-3, org-level-4)
        (org-get-location): Complete rewrite.
        (org-goto-exit-command): New variable.
        (org-goto-selected-point): New variable.
-       (org-goto-ret, org-goto-left, org-goto-right, org-goto-quit): Set
-       the new variables.
+       (org-goto-ret, org-goto-left, org-goto-right, org-goto-quit):
+       Set the new variables.
        (org-paste-subtree): Whitespace insertion strategy revised.
        (org-remember-apply-template): Protect v-A from the possibility
        that v-a might be nil.
        (org-up-heading-safe): New function.
        (org-entry-get-with-inheritance): Use `org-up-heading-safe'.
 
-       * org.texi: Change links to webpage and maintained email.
-       (Remember): Promoted to Chapter, significant changes.
-       (Fast access to TODO states): New section.
-       (Faces for TODO keywords): New section.
-       (Export options): Example for #+DATE.
-       (Progress logging): Section moved.
-
 2007-09-26  Dan Nicolaescu  <dann@ics.uci.edu>
 
        * progmodes/cc-cmds.el (c-indent-line-or-region): Only indent the
index 821bad4e819380cbf030b11b95d35996db59db66..e88067b7fe511322f083583238532f0cc2a480f7 100644 (file)
 ;;; Code:
 
 ;;;###autoload
-(define-minor-mode t-mouse-mode
-  "Toggle t-mouse mode to use the mouse in Linux consoles.
-With prefix arg, turn t-mouse mode on if arg is positive, otherwise turn it
-off.
+(define-obsolete-function-alias 't-mouse-mode 'gpm-mouse-mode "23.1")
+;;;###autoload
+(define-minor-mode gpm-mouse-mode
+  "Toggle gpm-mouse mode to use the mouse in GNU/Linux consoles.
+With prefix arg, turn gpm-mouse mode on if arg is positive,
+otherwise turn it off.
 
-This allows the use of the mouse when operating on a Linux console, in the
-same way as you can use the mouse under X11.
-It requires the `mev' program, part of the `gpm' utilities."
+This allows the use of the mouse when operating on a GNU/Linux console,
+in the same way as you can use the mouse under X11.
+It relies on the `gpm' daemon being activated."
   :global t :group 'mouse
-  (if window-system
-      (error "t-mouse only works in the console on GNU/Linux")
-    (if t-mouse-mode
-       (progn
-         (unless (fboundp 'term-open-connection)
-           (progn
-             (setq t-mouse-mode nil)
-             (error "Emacs must be built with Gpm to use this mode")))
-         (unless (term-open-connection)
-           (progn
-             (setq t-mouse-mode nil)
-             (error "Can't open mouse connection"))))
-      ;; Turn it off
-      (term-close-connection))))
+  (let ((activated nil))
+    (unwind-protect
+        (progn
+          (unless (fboundp 'gpm-mouse-start)
+            (error "Emacs must be built with Gpm to use this mode"))
+          (when gpm-mouse-mode
+            (gpm-mouse-start)
+            (setq activated t)))
+      ;; If the user asked to turn it off do that.
+      ;; If something failed to turn it on, try to turn it off as well,
+      ;; just in case.
+      (when (and (fboundp 'gpm-mouse-stop) (not activated))
+        (setq gpm-mouse-mode nil)
+        (gpm-mouse-stop)))))
 
 (provide 't-mouse)