[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[elpa] 114/287: condition-case->ignore-errors ergoemacs-translate.el
From: |
Matthew Fidler |
Subject: |
[elpa] 114/287: condition-case->ignore-errors ergoemacs-translate.el |
Date: |
Wed, 02 Jul 2014 14:45:09 +0000 |
mlf176f2 pushed a commit to branch externals/ergoemacs-mode
in repository elpa.
commit 58f731f6f5a138fbdb30d79da2c337dcb67d5640
Author: Matthew L. Fidler <address@hidden>
Date: Tue Jun 17 11:01:36 2014 -0500
condition-case->ignore-errors ergoemacs-translate.el
---
ergoemacs-translate.el | 86 ++++++++++++++++++++++++-----------------------
1 files changed, 44 insertions(+), 42 deletions(-)
diff --git a/ergoemacs-translate.el b/ergoemacs-translate.el
index f619e1d..832e484 100644
--- a/ergoemacs-translate.el
+++ b/ergoemacs-translate.el
@@ -50,8 +50,12 @@
;;
;;; Code:
+(eval-when-compile (require 'cl))
+(eval-when-compile (require 'ergoemacs-macros (expand-file-name
"ergoemacs-macros" default-directory)))
+
;;; ergoemacs pretty keys
+
(defvar ergoemacs-display-char-list nil
"List of characters and fonts and if they display or not.")
@@ -60,28 +64,27 @@
(defun ergoemacs-display-char-p (char)
"Determines if CHAR can be displayed."
- (condition-case err
- (let* (ret
- (buf (current-buffer))
- (face (font-xlfd-name (face-attribute 'default :font)))
- (found (assoc (list face char window-system)
ergoemacs-display-char-list)))
- (if found
- (nth 0 (cdr found))
- (switch-to-buffer (get-buffer-create " *ergoemacs-display-char-p*")
t)
- (delete-region (point-min) (point-max))
- (insert char)
- (let ((display (describe-char-display (point-min) (char-after
(point-min)))))
- (if (display-graphic-p (selected-frame))
- (if display
- (setq ret t))
+ (ignore-errors
+ (let* (ret
+ (buf (current-buffer))
+ (face (font-xlfd-name (face-attribute 'default :font)))
+ (found (assoc (list face char window-system)
ergoemacs-display-char-list)))
+ (if found
+ (nth 0 (cdr found))
+ (switch-to-buffer (get-buffer-create " *ergoemacs-display-char-p*") t)
+ (delete-region (point-min) (point-max))
+ (insert char)
+ (let ((display (describe-char-display (point-min) (char-after
(point-min)))))
+ (if (display-graphic-p (selected-frame))
(if display
- (setq ret t))))
- (switch-to-buffer buf)
- ;; Save it so the user doesn't see the buffer popup very much
- ;; (if at all).
- (add-to-list 'ergoemacs-display-char-list (list (list face char
window-system) ret))
- ret))
- (error nil)))
+ (setq ret t))
+ (if display
+ (setq ret t))))
+ (switch-to-buffer buf)
+ ;; Save it so the user doesn't see the buffer popup very much
+ ;; (if at all).
+ (add-to-list 'ergoemacs-display-char-list (list (list face char
window-system) ret))
+ ret))))
(defvar ergoemacs-use-unicode-char t
"Use unicode characters when available.")
@@ -245,28 +248,27 @@ This assumes `ergoemacs-use-unicode-char' is non-nil.
When
(defun ergoemacs-display-char-p (char)
"Determines if CHAR can be displayed."
- (condition-case err
- (let* (ret
- (buf (current-buffer))
- (face (font-xlfd-name (face-attribute 'default :font)))
- (found (assoc (list face char window-system)
ergoemacs-display-char-list)))
- (if found
- (nth 0 (cdr found))
- (switch-to-buffer (get-buffer-create " *ergoemacs-display-char-p*")
t)
- (delete-region (point-min) (point-max))
- (insert char)
- (let ((display (describe-char-display (point-min) (char-after
(point-min)))))
- (if (display-graphic-p (selected-frame))
- (if display
- (setq ret t))
+ (ignore-errors
+ (let* (ret
+ (buf (current-buffer))
+ (face (font-xlfd-name (face-attribute 'default :font)))
+ (found (assoc (list face char window-system)
ergoemacs-display-char-list)))
+ (if found
+ (nth 0 (cdr found))
+ (switch-to-buffer (get-buffer-create " *ergoemacs-display-char-p*") t)
+ (delete-region (point-min) (point-max))
+ (insert char)
+ (let ((display (describe-char-display (point-min) (char-after
(point-min)))))
+ (if (display-graphic-p (selected-frame))
(if display
- (setq ret t))))
- (switch-to-buffer buf)
- ;; Save it so the user doesn't see the buffer popup very much
- ;; (if at all).
- (add-to-list 'ergoemacs-display-char-list (list (list face char
window-system) ret))
- ret))
- (error nil)))
+ (setq ret t))
+ (if display
+ (setq ret t))))
+ (switch-to-buffer buf)
+ ;; Save it so the user doesn't see the buffer popup very much
+ ;; (if at all).
+ (add-to-list 'ergoemacs-display-char-list (list (list face char
window-system) ret))
+ ret))))
;;; Actual Translations
(defvar ergoemacs-dir
- [elpa] 138/287: Make the test directory., (continued)
- [elpa] 138/287: Make the test directory., Matthew Fidler, 2014/07/02
- [elpa] 109/287: Add ergoemacs-macros for all macros., Matthew Fidler, 2014/07/02
- [elpa] 121/287: Remove cl dependence for ergoemacs-theme-engine.el, Matthew Fidler, 2014/07/02
- [elpa] 107/287: Remove save-variable-state, Matthew Fidler, 2014/07/02
- [elpa] 197/287: Merge branch 'master' of github.com:ergoemacs/ergoemacs-mode, Matthew Fidler, 2014/07/02
- [elpa] 106/287: Fix many byte-compile warnings in ergoemacs-extras.el, Matthew Fidler, 2014/07/02
- [elpa] 95/287: Revert "Fixed shortcut keys.", Matthew Fidler, 2014/07/02
- [elpa] 90/287: Allow unset keys to work too, Matthew Fidler, 2014/07/02
- [elpa] 115/287: Take away warnings from ergoemacs-mode.el, Matthew Fidler, 2014/07/02
- [elpa] 192/287: Add ergoemacs-test-layout, Matthew Fidler, 2014/07/02
- [elpa] 114/287: condition-case->ignore-errors ergoemacs-translate.el,
Matthew Fidler <=
- [elpa] 92/287: Fix keys, Matthew Fidler, 2014/07/02
- [elpa] 125/287: Added documentation and always respect file in ergoemacs-open-in-external-app, Matthew Fidler, 2014/07/02
- [elpa] 195/287: Merge pull request #240 from akfoss/master, Matthew Fidler, 2014/07/02
- [elpa] 130/287: Advice key-binding to look at global keys without ergoemacs-mode, Matthew Fidler, 2014/07/02
- [elpa] 142/287: Makefile fixes, Matthew Fidler, 2014/07/02
- [elpa] 194/287: Fix Issue #238, Matthew Fidler, 2014/07/02
- [elpa] 201/287: Modify apps-copy test to use ert should instead of shoud ret, Matthew Fidler, 2014/07/02
- [elpa] 122/287: Fix byte-compile files, Matthew Fidler, 2014/07/02
- [elpa] 123/287: Add w32-shell-execute for ignoring linux byte-compile errors, Matthew Fidler, 2014/07/02
- [elpa] 99/287: Remove ergoemacs-test.el, Matthew Fidler, 2014/07/02