[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Emacs-diffs] /srv/bzr/emacs/trunk r102122: ns-win.el trivia.
From: |
Glenn Morris |
Subject: |
[Emacs-diffs] /srv/bzr/emacs/trunk r102122: ns-win.el trivia. |
Date: |
Tue, 26 Oct 2010 23:48:04 -0700 |
User-agent: |
Bazaar (2.0.3) |
------------------------------------------------------------
revno: 102122
committer: Glenn Morris <address@hidden>
branch nick: trunk
timestamp: Tue 2010-10-26 23:48:04 -0700
message:
ns-win.el trivia.
* term/ns-win.el: (ns-handle-nxopen): Optionally handle the temp-case.
(ns-handle-nxopentemp): Just call ns-handle-nxopen.
(ns-insert-file, ns-find-file): Use `pop'.
modified:
lisp/ChangeLog
lisp/term/ns-win.el
=== modified file 'lisp/ChangeLog'
--- a/lisp/ChangeLog 2010-10-27 06:42:15 +0000
+++ b/lisp/ChangeLog 2010-10-27 06:48:04 +0000
@@ -4,6 +4,9 @@
* term/ns-win.el: Restore require of cl when compiling.
(menu-bar-final-items): Remove non-existent `windows' menu.
+ (ns-handle-nxopen): Optionally handle the temp-case.
+ (ns-handle-nxopentemp): Just call ns-handle-nxopen.
+ (ns-insert-file, ns-find-file): Use `pop'.
2010-10-26 Glenn Morris <address@hidden>
=== modified file 'lisp/term/ns-win.el'
--- a/lisp/term/ns-win.el 2010-10-27 03:48:28 +0000
+++ b/lisp/term/ns-win.el 2010-10-27 06:48:04 +0000
@@ -47,7 +47,7 @@
(eval-when-compile (require 'cl)) ; lexical-let
-;; Documentation-purposes only: actually loaded in loadup.el
+;; Documentation-purposes only: actually loaded in loadup.el.
(require 'frame)
(require 'mouse)
(require 'faces)
@@ -66,14 +66,14 @@
;; nsterm.m.
(defvar ns-input-file)
-(defun ns-handle-nxopen (switch)
- (setq unread-command-events (append unread-command-events '(ns-open-file))
+(defun ns-handle-nxopen (switch &optional temp)
+ (setq unread-command-events (append unread-command-events
+ (if temp '(ns-open-temp-file)
+ '(ns-open-file)))
ns-input-file (append ns-input-file (list (pop x-invocation-args)))))
(defun ns-handle-nxopentemp (switch)
- (setq unread-command-events (append unread-command-events
- '(ns-open-temp-file))
- ns-input-file (append ns-input-file (list (pop x-invocation-args)))))
+ (ns-handle-nxopen switch t))
(defun ns-ignore-1-arg (switch)
(setq x-invocation-args (cdr x-invocation-args)))
@@ -154,7 +154,7 @@
(define-key global-map [kp-prior] 'scroll-down)
(define-key global-map [kp-next] 'scroll-up)
-;;; Allow shift-clicks to work similarly to under Nextstep
+;; Allow shift-clicks to work similarly to under Nextstep.
(define-key global-map [S-mouse-1] 'mouse-save-then-kill)
(global-unset-key [S-down-mouse-1])
@@ -396,8 +396,7 @@
(let ((str (buffer-string)))
(delete-region (point-min) (point-max))
(insert (ns-convert-utf8-nfd-to-nfc str))
- (- (point-max) (point-min))
- ))))
+ (- (point-max) (point-min))))))
(define-coding-system 'utf-8-nfd
"UTF-8 NFD (decomposed) encoding."
@@ -421,12 +420,11 @@
"Insert contents of file `ns-input-file' like insert-file but with less
prompting. If file is a directory perform a `find-file' on it."
(interactive)
- (let ((f))
- (setq f (car ns-input-file))
- (setq ns-input-file (cdr ns-input-file))
+ (let (f)
+ (setq f (pop ns-input-file))
(if (file-directory-p f)
(find-file f)
- (push-mark (+ (point) (car (cdr (insert-file-contents f))))))))
+ (push-mark (+ (point) (cadr (insert-file-contents f)))))))
(defvar ns-select-overlay nil
"Overlay used to highlight areas in files requested by Nextstep apps.")
@@ -479,7 +477,6 @@
(add-hook 'first-change-hook 'ns-unselect-line)
-
;;;; Preferences handling.
(declare-function ns-get-resource "nsfns.m" (owner name))
@@ -530,12 +527,11 @@
(defun ns-find-file ()
"Do a `find-file' with the `ns-input-file' as argument."
(interactive)
- (let ((f) (file) (bufwin1) (bufwin2))
- (setq f (file-truename (car ns-input-file)))
- (setq ns-input-file (cdr ns-input-file))
- (setq file (find-file-noselect f))
- (setq bufwin1 (get-buffer-window file 'visible))
- (setq bufwin2 (get-buffer-window "*scratch*" 'visibile))
+ (let (f file bufwin1 bufwin2)
+ (setq f (file-truename (pop ns-input-file))
+ file (find-file-noselect f)
+ bufwin1 (get-buffer-window file 'visible)
+ bufwin2 (get-buffer-window "*scratch*" 'visibile))
(cond
(bufwin1
(select-frame (window-frame bufwin1))
@@ -648,7 +644,6 @@
(error "Cancelled")))
(print-buffer)))
-
;;;; Font support.
;; Needed for font listing functions under both backend and normal
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [Emacs-diffs] /srv/bzr/emacs/trunk r102122: ns-win.el trivia.,
Glenn Morris <=