xemacs-base / annotations.el

Diff from to

annotations.el

 The function `annotation-glyph' returns the current glyph."
   (if (not (annotationp annotation))
       (error "%s is not an annotation" annotation)
-    (progn
-      (if (not layout)
-	  (setq layout (or (extent-begin-glyph-layout annotation)
-			   (extent-end-glyph-layout annotation))))
-      (if (or (eq side 'right)
-	      (and (not (eq side 'left))
-		   (eq (annotation-side annotation) 'right)))
-	  (set-extent-end-glyph annotation glyph layout)
-	(set-extent-begin-glyph annotation glyph layout))
-      (aset (extent-property annotation 'annotation) 3 glyph)
-      (if (eq side 'right)
-	  (aset (extent-property annotation 'annotation) 5 t))
-      (if (eq side 'left)
-	  (aset (extent-property annotation 'annotation) 5 nil))
-      (annotation-glyph annotation))))
+    ;; else
+    (or layout (setq layout (annotation-layout annotation)))
+    (or side   (setq side   (annotation-side   annotation)))
+    (cond ((eq side 'left)
+	   (set-extent-begin-glyph annotation glyph layout)
+	   (set-extent-end-glyph annotation nil)
+	   (aset (extent-property annotation 'annotation) 5 nil))
+	  ((eq side 'right)
+	   (set-extent-end-glyph annotation glyph layout)
+	   (set-extent-begin-glyph annotation nil)
+	   (aset (extent-property annotation 'annotation) 5 nil)))
+    (aset (extent-property annotation 'annotation) 3 glyph)
+    (annotation-glyph annotation)))
 
 (defun annotation-down-glyph (annotation)
   "If ANNOTATION is of type `string' return the down string.  Otherwise,
Tip: Filter by directory path e.g. /media app.js to search for public/media/app.js.
Tip: Use camelCasing e.g. ProjME to search for ProjectModifiedEvent.java.
Tip: Filter by extension type e.g. /repo .js to search for all .js files in the /repo directory.
Tip: Separate your search with spaces e.g. /ssh pom.xml to search for src/ssh/pom.xml.
Tip: Use ↑ and ↓ arrow keys to navigate and return to view the file.
Tip: You can also navigate files with Ctrl+j (next) and Ctrl+k (previous) and view the file with Ctrl+o.
Tip: You can also navigate files with Alt+j (next) and Alt+k (previous) and view the file with Alt+o.